首页 > 其他 > 详细

Luogu网校听课笔记向(自用

时间:2018-08-03 13:02:31      阅读:125      评论:0      收藏:0      [点我收藏+]

TG助学课——noilinux

Noi Linux的使用——darkflames的博客

技术分享图片
 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 #define _DO_CMDS(cmds) for(int _index=0;_index<sizeof(cmds)/4;++_index){system((cmds[(_index)]));}
 4 char *build[]{
 5     "g++ -o test test.cpp",
 6     "g++ -o rand rand.cpp -O2",
 7     "g++ -o std std.cpp -O2"
 8 };
 9 char *randata[]{
10     "./rand > a.in",
11     "./std < a.in > a.ans"
12 };
13 int main()
14 {
15     _DO_CMDS(build);
16     int runtime=100;
17     for(int i=1;i<=runtime;++i)
18     {
19         DO_CNMD(randata);
20         printf("Case %d:"i);
21         if(system("./test < a.in > a.out")!=0)
22         {cout<<"RE"<<endl;break;}
23         else if(system("diff -b a.out a.ans"))
24         {cout<<"WA"<<endl;break;}
25         else cout<<"AC"<<endl;
26     }
27     return 0;
28 }
自食用风格的对拍程序

 

Luogu网校听课笔记向(自用

原文:https://www.cnblogs.com/qwerta/p/9413228.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!