#include<bits/stdc++.h>
using namespace std;
int main(){
int n=50;
for (int i = 1; i <= n; ++i){
system("data.exe > in.txt");
system("std.exe < in.txt > std.txt");
double begin=clock();
system("baoli.exe < in.txt > baoli.txt");
double end=clock();
double t=(end-begin);
if(system("fc std.txt baoli.txt")){
printf("Wrong Answer\n",i);
}
else if(t>1000){
printf("Time Limited Exceeded %.0lfms\n",t);
}
else{
printf("Accepted %.0lfms\n",t);
}
}
return 0;
}
随机数生成器
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll Random(ll mod){
ll ans=2147483647;
return ans*rand()%mod+1;
}
int main(){
struct _timeb(T);
_ftime(&T);
srand(T.millitm);
while(1){
ll n=Random(100000);//生成1~100000中的随机数
cout<<n<<endl;
}
return 0;
}