C++对拍程序
考場沒心態,擔心程序寫掛
這時寫一個對拍程序就可以大大降低你的擔心
所以背個板子就可以了:
#include<iostream> #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<algorithm> #include<windows.h> using namespace std; inline int min(int a,int b){return a<b?a:b;} inline int max(int a,int b){return a>b?a:b;} inline int rd(){int x=0,f=1;char ch=getchar();for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-1;for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';return x*f; } inline void write(int x){if(x<0) putchar('-'),x=-x;if(x>9) write(x/10);putchar(x%10+'0');return ; } int main(){while(1){system("make");//生成新數據 system("force");//運行暴力程序 system("a+b");//運行要對拍的程序 if(system("fc force.out a+b.out")) break;//比對文件 }return 0; }?
轉載于:https://www.cnblogs.com/WWHHTT/p/9865367.html
總結
- 上一篇: ABAP 7.53 中的ABAP SQL
- 下一篇: 总结PHP如何获取当前主机、域名、网址、