#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<ctime>
using namespace std; int main()
{
for(int t = ;;t ++)
{
system("data.exe");
system("a.exe");
system("std.exe");
if(!system("fc a.txt std.txt"))
{
printf("%d :AC\n",t);
}
else
{
printf("%d :WA\n",t);
break;
}
}
return ;
}
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<ctime>
using namespace std; int main()
{
for(int t = ;;t ++)
{
system("data.exe > in.txt");
system("a.exe < in.txt > out.txt");
system("std.exe < in.txt > ans.txt");
if(!system("fc out.txt ans.txt"))
{
printf("%d :AC\n",t);
}
else
{
printf("%d :WA\n",t);
break;
}
}
return ;
}

c++ —— .bat 对拍的更多相关文章

  1. 【模板】.bat对拍

    对拍是个很有用的东西,比如在验证贪心策略是否正确时,可以写上个暴力然后和贪心程序对拍上几个小时. 在c++里用system写对拍总是会出现一些莫名其妙的问题.. 比如my.out明明是1 fc的时候却 ...

  2. acm对拍程序 以及sublime text3的文件自动更新插件auto refresh

    acm等算法比赛常用---对拍 以及sublime text3的文件自动更新插件auto refresh 对拍 对拍即程序自动对比正确程序的运行结果和错误程序的运行结果之间的差异 废话少说, 直接上操 ...

  3. ZJOI2017 day1滚粗记

    这几天去温州作为外省选手参加了$ZJOI day1$.打了几天的酱油,考试也滚粗了.. $day -2$ 中午从学校出发,坐飞机去温州.到了温州以后吃完晚饭就回宾馆.把一直想做的糖果公园做完了以后就堕 ...

  4. CSP-S 2019 游记

    目录 CSP-S 2019 游记 DAY -1 Day 0 Day 1 Day 2 后记 CSP-S 2019 游记 机房段子: zr(老师):yyx我看你最近不错哦(此人外号拳皇 yyx:运气好运气 ...

  5. 对拍 bat命令快速模板

    对拍.bat @echo off :loop maker.exe > in.in wq.exe < in.in > out.out std.exe < in.in >st ...

  6. 对拍——>bat

    为了凸显对拍滴重要性.就拿来当置顶啦! ——本来是那样想的 ---------------------------------------------------------------------- ...

  7. 对拍老是忘记的看这里:bat代码

    需要写三个程序,makedata.exe 产生测试数据, program1.exe 是你要检测的程序,program2.exe 往往是一个正确但效率不高(暴力的居多)的程序. 代码很简单,稍作解释:l ...

  8. 对拍BAT

    :loop makedata.exe K.exe Kture.exe fc a.out b.out if %errorlevel%==0 goto loop pause

  9. 对拍 bat

    :loop maker.exe std.exe my.exe fc std.out my.out goto loop pause

随机推荐

  1. Python学习-KindEditor-富文本编辑框

    1.进入官网 2.下载 官网下载:http://kindeditor.net/down.php 本地下载:http://files.cnblogs.com/files/wupeiqi/kindedit ...

  2. ASP.NET Core [1]:Hosting(笔记)

    参考:http://www.cnblogs.com/RainingNight/p/hosting-in-asp-net-core.html

  3. 团队Alpha版本冲刺(六)

    目录 组员情况 组员1(组长):胡绪佩 组员2:胡青元 组员3:庄卉 组员4:家灿 组员5:凯琳 组员6:翟丹丹 组员7:何家伟 组员8:政演 组员9:黄鸿杰 组员10:刘一好 组员11:何宇恒 展示 ...

  4. (总结)Nginx 502 Bad Gateway错误触发条件与解决方法

    一些运行在Nginx上的网站有时候会出现“502 Bad Gateway”错误,有些时候甚至频繁的出现.以下是从Google搜集整理的一些Nginx 502错误的排查方法,供参考: Nginx 502 ...

  5. 替换localhost:8080(假域名,本地使用)

    1. 更改servers 的端口号为 80 (默认 8080),此时就不用再输入 8080了. 2. 找到 C:\Windows\System32\drivers\etc 下的 hosts 文件,用记 ...

  6. hdu 3499 Flight (最短路径)

    Flight Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Su ...

  7. MPSVPX 配置

    MPSVPX 配置 设置主机名,IP地址,掩码,网关,DNS服务器,时区(使用WebGUI界面设置). bash-2.05b# cat svm.conf arp -d -a route flush i ...

  8. gcc 编译器常用的命令行参数一览

    这些常用的 gcc/g++ 命令行参数,你都知道么? 1. gcc -E source_file.c -E,只执行到预编译.直接输出预编译结果. 2. gcc -S source_file.c -S, ...

  9. Codeforces 934.B A Prosperous Lot

    B. A Prosperous Lot time limit per test 1 second memory limit per test 256 megabytes input standard ...

  10. OPENCV mat类

    OpenCV参考手册之Mat类详解 目标 我们有多种方法可以获得从现实世界的数字图像:数码相机.扫描仪.计算机体层摄影或磁共振成像就是其中的几种.在每种情况下我们(人类)看到了什么是图像.但是,转换图 ...