case-nval.cpp 755 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Validates t (1 <= t <= 10) test cases.
  3. * The first line contains the integer between 1 and 10^4, inclusive.
  4. * The second line should contains space-separated sequence of integers between -1000 and 1000, inclusive.
  5. * Also validates that file ends with EOLN and EOF.
  6. */
  7. #include "testlib.h"
  8. using namespace std;
  9. int main(int argc, char *argv[]) {
  10. registerValidation(argc, argv);
  11. int testCaseCount = inf.readInt(1, 10, "t");
  12. inf.readEoln();
  13. for (int testCase = 1; testCase <= testCaseCount; testCase++) {
  14. setTestCase(testCase);
  15. int n = inf.readInt(1, 10000, "n");
  16. inf.readEoln();
  17. inf.readInts(n, -1000, 1000, "a");
  18. inf.readEoln();
  19. }
  20. inf.readEof();
  21. }