By script, I mean what method do you use to stress test your solution(code maybe?)
№ | Пользователь | Рейтинг |
---|---|---|
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 |
By script, I mean what method do you use to stress test your solution(code maybe?)
Название |
---|
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.