0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-14 06:38:49 +00:00
OI-codes/S2OJ/1489/data/chk.cpp

38 lines
864 B (Stored with Git LFS)
C++

// Checker by Baoshuo <i@baoshuo.ren>
#include <algorithm>
#include <string>
#include <vector>
#include "testlib.h"
int main(int argc, char *argv[]) {
registerTestlibCmd(argc, argv);
int n = inf.readInt();
std::vector<int> a(n), b(n), c(n);
for (int &x : a) x = inf.readInt(1, n);
for (int &x : b) x = inf.readInt(1, n);
std::string j_ans = ouf.readToken();
std::string c_ans = ans.readToken();
if (j_ans != c_ans) quitf(_wa, "expected '%s', but got '%s'", c_ans.c_str(), j_ans.c_str());
if (j_ans == "No") quitf(_ok, "correct");
for (int &x : c) x = ouf.readInt(1, n);
for (int i = 0; i < n; i++) {
if (a[i] == c[i]) quit(_wa, "A[i] == C[i]");
}
std::sort(b.begin(), b.end());
std::sort(c.begin(), c.end());
if (b != c) quit(_wa, "B != C");
quit(_ok, "correct");
return 0;
}