Testdata doesn't satisfy the constraints mentioned in the problem statement, you can check yourself
Here's the code I used to test this:
https://mirror.codeforces.com/contest/1771/submission/184796886
# | User | Rating |
---|---|---|
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 |
# | User | Contrib. |
---|---|---|
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 |
Testdata doesn't satisfy the constraints mentioned in the problem statement, you can check yourself
Here's the code I used to test this:
https://mirror.codeforces.com/contest/1771/submission/184796886
Name |
---|
Quite strange.
I agree, I wrote the sieve of Eratosthenes before <=1e9 and it did not go, although it should have, but it goes before <=1e10
The second data is:
and it is simply satisfying the constraints.
well, n = 1 is not satisfying the constraints
oh well, my fault.
As far as i remember this wasn't the second test case. Second test case was a single test case with large N. maybe test data was modified. Though not sure.
I had the same thing but with problem B. My complier showed me one Test 1 result(4 and 5), whereas the system displayed the other one(3 and 4). So, first, I had to rewrite my solution in python, then because of ML error develop one more algorithm in C++. That was quite strange.
I saw your code this is due to the garbage value in 'graph[][]' as you have not initialized it, here's your code with minor changes https://mirror.codeforces.com/contest/1771/submission/184817181, and RTE on test2 is due to the fact you are making a very large array of size ~1e10
Yes, we are sorry for it. Please, read https://mirror.codeforces.com/blog/entry/109892?#comment-979226