Vedkribhu's blog

By Vedkribhu, history, 4 years ago, In English

I am new to c++. Please somebody help me in this Problem: 1296C - Yet Another Walking Robot. My submission 80772232. My approach is similar to the editorial but I suspect some implementation issue is causing TLE.

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Hi, i think the problem is the "update" function (copying string s is O(|s|), which means O(|s|^2) complexity)... you can just declare s as global (80775777) or replace the update function (80775535).

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You must code it faster.