I try to solve this case http://www.spoj.com/problems/ELEVTRBL/ , but i got TLE error.
Please giving me your hand by instruct how to fix this bug ,
I have try to test with this data at my PC
1000000 1 1000000 1 1
it has worked properly.
This is my code. https://ideone.com/xL1kLQ
Thanks so much for your support,