data
C++#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main ()
{
mt19937 rnd (time (0));
freopen ("data.in" , "w" , stdout);
return 0;
}
dp
C++#include <bits/stdc++.h>
using namespace std;
signed main ()
{
system ("g++ std.cpp -o std -std=c++17 -O2");
system ("g++ mycode.cpp -o mycode -std=c++17 -O2");
system ("g++ data.cpp -o data -std=c++17 -O2");
int cnt = 0;
while (1)
{
++cnt ;
system ("./data; ./std; ./mycode");
if (system ("diff std.out mycode.out")) {
return cout << "WA on # " << cnt << "\n" , 0;
}
cout << "AC # " << cnt << "\n";
}
return 0;
}
mycode
C++#include <bits/stdc++.h>
using namespace std;
signed main ()
{
freopen ("data.in" , "r" , stdin);
freopen ("mycode.out" , "w" , stdout);
return 0;
}
std
C++#include <bits/stdc++.h>
using namespace std;
signed main ()
{
freopen ("data.in" , "r" , stdin);
freopen ("std.out" , "w" , stdout);
return 0;
}