Example | Input | Output |
0 | { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } | 1 |
1 | { 1, 6, 10, 20, 32, 49 } | 6 |
2 | { 2, 4, 5, 6, 8, 9, 10, 11, 12, 15 } | 4 |
3 | { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 } | 14 |
4 | { 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 25, 27, 28, 29, 30, 31, 32, 33 } | 4 |
5 | { 33 } | 1 |
If you compile your program to a.out, then running tests.sh should yield the exact same answer as answers.txt. The whole thing should take under a half of a second.
for (i = 1; i < arr.size(); i++) ...