0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-09-20 09:45:25 +00:00
OI-codes/Luogu/P7687/data/checker.cpp

33 lines
830 B (Stored with Git LFS)
C++

#include "testlib.h"
#include<bits/stdc++.h>
using namespace std;
int main(int argc,char* argv[])
{
registerTestlibCmd(argc,argv);
int S=ans.readInt();
if(ouf.readInt()!=S)
quitf(_wa,"The number of critical network lines in your answer is wrong.");
typedef pair<int,int> P;
map<P,bool> exist,vis;
for(int i=1;i<=S;++i)
{
int x=ans.readInt(),y=ans.readInt();
if(x>y)
swap(x,y);
exist[P(x,y)]=true;
}
for(int i=1;i<=S;++i)
{
int x=ouf.readInt(),y=ouf.readInt();
if(x>y)
swap(x,y);
if(!exist[P(x,y)])
quitf(_wa,"Your answer includes non-critical network lines.");
if(vis[P(x,y)])
quitf(_wa,"Your answer includes the same critical network lines.");
vis[P(x,y)]=true;
}
quitf(_ok,"Your answer is correct.");
return 0;
}