ac.cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max_n=1e6+10;
int main(){
int n=100;
int a,b;
while(n--){
cin>>a>>b;
cout<<a+b<<endl;
}
return 0;
}
wa.cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max_n=1e6+10;
int main(){
int a,b,n=100;
while(n--){
cin>>a>>b;
cout<<a+b<<endl;
}
return 0;
}
data.cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max_n=1e6+10;
int main(){
srand(time(0));
int a,b; int n=100;
while(n--){
a=rand()%100+1;
b=rand()%100+1;
cout<<a<<" "<<b<<endl;
}
return 0;
}
对拍.cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max_n=1e6+10;
int main(){
int n=100;
while(n--){
system("data.exe>data.in");
system("ac.exe<data.in>ac.out");
system("wa.exe<data.in>wa.out");
if(system("fc ac.out wa.out")) break;
}
return 0;
}
test.cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max_n=1e6+10;
int main(){
#define test
#ifdef test
freopen("test.in","r",stdin);
freopen("test.out","w",stdout);
#endif
int a,b,n=2;
while(n--){
cin>>a>>b;
cout<<a+b<<endl;
}
return 0;
}
运行时间
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
clock_t startTime=clock();
for(int i=0;i<1000000;i++){
i++;
}
clock_t endTime=clock();
cout<<(double)(endTime-startTime)/CLOCKS_PER_SEC<<"s"<<endl;
return 0;
}