http://codeforces.com/contest/1278/problem/B for this my solution in giving TLE . can you help me out?

Please either format your code or link to your submission - the forum software has mangled it and it won’t compile! :slight_smile: