对拍

make

 1 #include<bits/stdc++.h>
 2 #define rg register
 3 #define go(i,a,b) for(rg int i=a;i<=b;i++)
 4 #define back(i,a,b) for(rg int i=a;i>=b;i--)
 5 #define db double
 6 #define ll long long
 7 #define il inline
 8 #define pf printf
 9 const int modn=10000;
10 const int modm=20000;
11 int main(){
12     //freopen("","r",stdin);
13     freopen("1.in","w",stdout);
14     srand(time(0));
15     int n=rand()%modn;
16     while(n==0) n=rand()%modn;
17     int m=rand()%modm;
18     pf("%d %d\n",n,m);
19     go(i,1,m){
20         int a=rand()%n+1;
21         int b=rand()%n+1;
22         while(a==b) b=rand()%n+1;
23         pf("%d %d\n",a,b);
24     }
25     return 0;
26 }

check

 1 #include<bits/stdc++.h>
 2 #define rg register
 3 #define go(i,a,b) for(rg int i=a;i<=b;i++)
 4 #define back(i,a,b) for(rg int i=a;i>=b;i--)
 5 #define db double
 6 #define ll long long
 7 #define il inline
 8 #define pf printf
 9 int main(){
10     //freopen("","r",stdin);
11     //freopen("","w",stdout);
12     int cases=0;
13     while(!system("diff 1.out 2.out")){
14         if(cases) pf("#%d AC\n",cases);
15         cases++;system("./make");
16         system("./1");system("./2");
17     }
18     pf("#%d WA\n",cases);
19     return 0;
20 }
21 //1.cpp里放暴力代码,2.cpp里放要核对的代码
posted @ 2019-09-26 17:03  小叽居biubiu  阅读(123)  评论(0编辑  收藏  举报