Thank you Chris, later I decided that this would be cheating and I have to think about another algorithmic approach.
most of the competitive programming platforms provide python with a time limit of 5 times of c/c++ time limit. but in many cases like if the algorithms are recursive(like segment trees etc) that 5 factor is just not enough. but still I think it would be cool to be able to access internal c functions without any fuss. I can use such feature with heapq too(sift operations), -- https://mail.python.org/mailman/listinfo/python-list