Hello Codeforces !
I can't do this problem. So I copy solution. And I submitted code with some changes, But it get TLE. I submit code without any changes, It get AC. And I delete only commentes in first submission.
And one question. Why?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Hello Codeforces !
I can't do this problem. So I copy solution. And I submitted code with some changes, But it get TLE. I submit code without any changes, It get AC. And I delete only commentes in first submission.
And one question. Why?
Название |
---|
It is not a magic . Submission time varies often a few ms .. Your second solution too just got lucky and had time of 2995 ms for a time limit of 3000ms and just passed .. .. If you try again submitting same code ,you may get TLE again
I submitted 6 same codes, All get AC.
1 — 32900249
2 — 32900259
3 — 32900265
4 — 32900269
5 — 32900282
6 — 32900287
Is it still luck?
Yes ,As far as I have seen you have almost submitted the same code 12 times with minor changes here and there(putting gaps etc ) . You got 3 TLEs and 9 Accepted .Besides that, The 9 Accepted are lingering around 3000 ms (2800-2950ms).
Look at the execution time of the second submission! 2995ms => this submission only barely got accepted.
A program will not execute with the same speed each time you call it. The execution time depends on a lot of variables, like the current load of the machine, the current clock frequency, current RAM/ROM usage, ...