So there was this great question in the ‘September-Cook-Off 2016’ called ‘Counting strings’ ie ‘TACNTSTR’
I tried two solutions for this -
- by using ‘tmp’ as a global variable - https://www.codechef.com/viewsolution/11566448
- by using ‘tmp’ as a local variable to the main() - https://www.codechef.com/viewsolution/11566447
Solution with ‘tmp as local to main’ got accepted, while solution with ‘tmp as global’ results in TLE.
Is that a bug in the system or something really really tricky happening ?
Can someone please help me understand whats happening ?