Regarding Div3 D problem submission 1 submission 2 Here both the solution are same but the fact is one is hacked and other is not ,could u please suggest the input User Id link
# | User | Rating |
---|---|---|
1 | tourist | 3690 |
2 | jiangly | 3647 |
3 | Benq | 3581 |
4 | orzdevinwang | 3570 |
5 | Geothermal | 3569 |
5 | cnnfls_csy | 3569 |
7 | Radewoosh | 3509 |
8 | ecnerwala | 3486 |
9 | jqdai0815 | 3474 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 174 |
2 | awoo | 165 |
3 | adamant | 161 |
4 | TheScrasse | 160 |
5 | nor | 158 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 152 |
8 | orz | 146 |
9 | SecondThread | 145 |
9 | pajenegod | 145 |
Regarding Div3 D problem submission 1 submission 2 Here both the solution are same but the fact is one is hacked and other is not ,could u please suggest the input User Id link
Name |
---|
You don't need to worry. After the hacking stage is over, all solutions from all participants will be tested against all extra testcases discovered by hackers. If the second submission is still buggy, it will be rejected too.
bro i asking about reason why so??
The changes indeed seem to be just cosmetic:
But both are slow and very close to TLE. I suspect that memset of the
dp
array is killing performance. Ift
is very large, then the whole buffer gets cleared way too many times.Bro it got accepted in final testing
It got accepted after completing the 11th testcase in 1981 ms, which was only 19 ms away from failing (the time limit is 2 seconds). With some minor runtime speed fluctuations, it could either get accepted or fail.
What's your problem? Do you want to know why this solution takes almost 2 seconds? Or did you want it to get a TLE verdict very much?
Server load presumably the difference. Really, they both ought to fail — it's bad code. It is not good to do memset on dp[200005][2] for each of 10000 test cases — that's 4 billion operations.