So we compile our stress test and then we launch it and see what happens.
So we see, our screen was filled with a lot of lines.
Actually, those lines were words, OK, and some numbers,
like number n from 2 to 11, and input numbers, which are big.
And there are a lot of tests for which our solutions didn't differ, and
that all went pretty fast.
And then in the end, we have number 11, which is n, and
then 11 big numbers, which is the input test, and then the words,
Wrong answer and two very big numbers which are different, which are the answers
correspondingly of the first and the second solution we implemented.
So now,
we already have a test on which at least one of our solution runs incorrectly.
But it is very hard to work with this test because we have 11 numbers and
they are very big and the answer to this problem is even bigger.
So let us try to find a smaller test on which our solution still fails.
Usually we can create a very small test with this technique.
So let's go back to our code, stress_test.cpp.
And let's decrease the restrictions on n and on the numbers.
So, for example, we want our number n to be no more than 5,
then we first generate a random number modulo 4 so it will be from 0 to 3.
And then, after adding 2, it will be from 2 to 5.
And also, we want our numbers to be less than 10.
So we just generate numbers modulo ten.