fix: fixed validator and added input file and checker.

This commit is contained in:
2026-05-02 12:53:43 -03:00
parent 3cfeb9a032
commit cec770f1f6
7 changed files with 8148 additions and 13 deletions

View File

@@ -1,12 +1,33 @@
#include "testlib.h"
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main(int argc, char* argv[]) {
setName("Set the name of your checker here");
int main(int argc, char *argv[]) {
setName("compare files as sequence of lines");
registerTestlibCmd(argc, argv);
return 0;
std::string strAnswer;
int n = 0;
while (!ans.eof()) {
std::string j = ans.readString();
if (j.empty() && ans.eof())
break;
strAnswer = j;
std::string p = ouf.readString();
n++;
if (j != p)
quitf(_wa, "%d%s lines differ - expected: '%s', found: '%s'", n, englishEnding(n).c_str(),
compress(j).c_str(), compress(p).c_str());
}
if (n == 1)
quitf(_ok, "single line: '%s'", compress(strAnswer).c_str());
quitf(_ok, "%d lines", n);
}