Pozhu: 挂分大赛
zerc: 我挂了 80,我说什么了么
所以有了对拍。
注:以下内容均在 Linux(WSL) 下进行。
#include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
const int N = 100;
int main() {
system("g++ data.cpp -O2 -o ./tmp/data");
system("g++ std.cpp -O2 -o ./tmp/std");
system("g++ sol.cpp -O2 -o ./tmp/sol");
for (int i = 1; i <= N; i++) {
system("./tmp/data > ./tmp/data.in");
if (system("./tmp/std < ./tmp/data.in > ./tmp/data.ans")) return cerr << "Runtime Error" << endl, 114514;
if (system("./tmp/sol < ./tmp/data.in > ./tmp/data.out")) return cerr << "Runtime Error" << endl, 114514;
cerr << "#" << setw(3) << i << ' ';
if (system("diff ./tmp/data.out ./tmp/data.ans")) {
return cerr << "Wrong Answer" << endl, 114514;
} else {
cerr << "Accepted" << endl;
}
}
}
#include <bits/stdc++.h>
using namespace std;
const int N = 3000;
mt19937 r(time(0));
int rd() {
return int(abs(int(r())));
}
int main() {
int n = rd() % N + 1;
int m = rd() % N + 1;
int T = rd() % 1000000 + 1;
printf("%d %d %d\n", n, m, T);
for (int i = 1; i <= T; i++) {
printf("%d %d %d %d\n",
rd() % n + 1, rd() % m + 1, rd() % n + 1, rd() % m + 1);
}
}