By script, I mean what method do you use to stress test your solution(code maybe?)
# | 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 | 167 |
2 | -is-this-fft- | 165 |
3 | Dominater069 | 161 |
4 | atcoder_official | 160 |
5 | Um_nik | 159 |
6 | djm03178 | 156 |
7 | adamant | 153 |
8 | luogu_official | 151 |
9 | awoo | 149 |
10 | TheScrasse | 146 |
By script, I mean what method do you use to stress test your solution(code maybe?)
Name |
---|
i verify it on paper firstly even then if i get WA i try to think of corner cases most of the times it works
I do this only when the following is true (quite frankly, this happens often):
problem is about an array without special properties (that is, random array will be a valid input)
I came up with greedy algorithm or dp without a solid proof, and it gives WA
I can write a checker, i.e. check that my answer is correct -- for example if I have to output a number of transformations that will lead to something that is easy to check
Then I just replace each "read" statement with something like
rand() % max_value_for_this_variable
, and run all this in a loop of 1000 and see if there is a mistake somewhere.Sometimes I also do this if I know I have an integer overflow or out-of-bounds access, but cannot find where.