Testdata doesn't satisfy the constraints mentioned in the problem statement, you can check yourself
Here's the code I used to test this:
# | User | Rating |
---|---|---|
1 | jiangly | 3898 |
2 | tourist | 3840 |
3 | orzdevinwang | 3706 |
4 | ksun48 | 3691 |
5 | jqdai0815 | 3682 |
6 | ecnerwala | 3525 |
7 | gamegame | 3477 |
8 | Benq | 3468 |
9 | Ormlis | 3381 |
10 | maroonrk | 3379 |
# | User | Contrib. |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | Dominater069 | 161 |
4 | atcoder_official | 160 |
5 | Um_nik | 159 |
6 | djm03178 | 157 |
7 | adamant | 153 |
8 | luogu_official | 151 |
9 | awoo | 149 |
10 | TheScrasse | 146 |
Testdata doesn't satisfy the constraints mentioned in the problem statement, you can check yourself
Here's the code I used to test this:
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://codeforces.net/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://codeforces.net/blog/entry/109892?#comment-979226