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.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3885 |
3 | jqdai0815 | 3682 |
4 | Benq | 3580 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3506 |
7 | ecnerwala | 3505 |
8 | Radewoosh | 3457 |
9 | Kevin114514 | 3377 |
10 | gamegame | 3374 |
# | User | Contrib. |
---|---|---|
1 | cry | 170 |
2 | Um_nik | 162 |
3 | -is-this-fft- | 161 |
3 | atcoder_official | 161 |
5 | djm03178 | 157 |
6 | Dominater069 | 156 |
7 | maomao90 | 155 |
8 | adamant | 154 |
9 | luogu_official | 153 |
10 | awoo | 152 |
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.
Name |
---|
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).
Or add 1 character just like :
void f(string &s)
.True
Thank you Nachia, rocks03.
You must code it faster.