1
0

nval.cpp 587 B

123456789101112131415161718192021
  1. /**
  2. * Validates that the first line contains the integer between 1 and 10^5, inclusive.
  3. * The second line should contains space-separated sequence of integers between -10^15 and 10^15, inclusive.
  4. * Also validates that file ends with EOLN and EOF.
  5. */
  6. #include "testlib.h"
  7. using namespace std;
  8. int main(int argc, char *argv[]) {
  9. registerValidation(argc, argv);
  10. int n = inf.readInt(1, 100'000, "n");
  11. inf.readEoln();
  12. inf.readLongs(n, -1'000'000'000LL * 1'000'000LL, 1'000'000'000LL * 1'000'000LL, "a");
  13. inf.readEoln();
  14. inf.readEof();
  15. }