对拍板子(自用)

#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;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值