本文用于Linux下bash的脚本: brute为本目录的暴力程序。。 pro为优化过的程序 mak造数据的。。 #!/bin/bash while(true)do ./mak printf "mycode:\t" /usr/bin/time -f "%Us" ./pro < in > out printf "brute:\t" /usr/bin/time -f "%Us" .
转载 2021-08-11 13:32:49
203阅读
搞了一上午终于弄好了一个,估计以后调试会方便很多。#!/bin/bashwhile true; do./makedate>tmp.in ./XXXXXtmp.out ./XXXXXtmp2.outif diff tmp.out tmp2.out; then printf AC elseecho ... Read More
转载 2014-09-27 13:27:00
144阅读
2评论
在程序对应文件夹下存为.sh文件 在终端命令中进入相应文件夹,用 sh XXX.sh 调用
原创 2021-09-04 14:07:35
513阅读
最简单的程序(A + B Problem) 造数据 make.cpp: #include <bits/stdc++.h> using namespace std; int main() { srand(time(0)); printf("%d %d\n", rand() % 100000, ra ...
转载 2021-07-30 13:19:00
142阅读
2评论
随着主力回归Windows,也需要Windows下的脚本,于是从紫书附录上抄了一份。 @echo off :again data.exe > input me.exe < input > output.me std.exe < input > output.std fc output.me ou ...
转载 2021-09-08 21:08:00
258阅读
2评论
拍在oi中有很大的用处(我居然现在才会...) 首先我们先制作一个数据生成器 #include<iostream>#include<cstdio>#include<cstring>#include<string>#include<algorithm>#include<cctype>#include
转载 2018-04-27 19:58:00
124阅读
2评论
check: namespace Miracle{ int main(){ while(1){ system("rand.exe"); system("std.exe"); system("me.exe"); if(system("fc std.out me.out")) break; } retu
转载 2020-09-20 08:39:00
130阅读
2评论
前言 刚开始学 \(OI\) 的时候学过,但是后来基本上没有用过。 (暴力都不会写什么) 临近 \(CSP\) 稍微复习了一下,于是写一篇博客记录一下(以后忘了还可以看)。 正文 方法 1. 准备好你需要对的程序 a.cpp #include <iostream> #include <cs ...
转载 2021-10-21 19:53:00
151阅读
2评论
学习了,主要总结一下该咋么写,针对本人,出现了以下几点问题。 1.4个程序的文件名一定要起好,以后要固定分别为bf(暴力)brutal force 、sol(solution)、pai(的程序)、random(随机数据的产生)。 2.然后是bf和sol的输入和输出位置的所在地。都为 输出的位
转载 2018-12-20 13:37:00
136阅读
#include #include using namespace std; int main() { int t=100; while(t--) { system("data > a+b.in"); system("zj 1.out"); system("duipai 2.out"); if(syste...
转载 2017-06-05 21:29:00
96阅读
2评论
1 // File Name: duipai.cpp 2 // Author: darkdream 3 // Created Time: 2014年07月23日 星期三 20时21分37秒 4 5 #include<vector> 6 #include<list> 7 #include<map> 8 #include<set>
转载 2014-10-09 16:23:00
206阅读
2评论
步骤: 1.先写出自己的代码并运行 2.写出暴力代码并运行 3.写随机数生成器 #include<cstdlib> #include<ctime> #include<algorithm> #include<iostream> #include<cstring> #include<cstdio> ...
转载 2021-10-21 22:31:00
321阅读
2评论
四个程序 me.cpp check.cpp std.cpp makedata.cpp 步骤 \(\operatorname{me.cpp}\) 自己标算,大概长这样子: 要点大概就是在标算前加上: freopen("date.in","r",stdin); freopen("happy.out"," ...
转载 2021-10-31 21:30:00
131阅读
2评论
小技巧— 就是啦,没什么好说的。 直接放模板吧。 网上大多数的模板都是用bat写的。什么鬼看不懂我菜。 所以拿CPP写一发。 就当练练 #include<bits/stdc++.h> using namespace std; int main() { for(int i=1;i<=2
转载 2020-10-31 08:19:00
192阅读
2评论
众所周知,考试有两个,一个是暴力一个是正解。 排除有时候只有一个 暴力检验正解的正确性就是。 这是暴力 #include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<algorithm> #inclu ...
转载 2021-10-21 06:51:00
89阅读
2评论
· 因为u盘的离去造成了很多麻烦...所以开始重新整理记录。 ———————————————————————————————— 主程序 #include <iostream> #include <cstdio> #include <ctime> using namespace std; int ...
转载 2021-09-10 18:30:00
117阅读
2评论
#include<bits/stdc++.h> using namespace std; int main() { int T; scanf("%d", &T); while(T--) { system("data > input.txt"); system("a+b < input.txt > 1
转载 2017-04-22 11:53:00
90阅读
2评论
Windows下的程序 #include <bits/stdc++.h> using namespace std; signed main() { for(int T = 1;T <= 100000;T++){//组数 system("random.exe"); //随机数据生成器 doub ...
转载 2021-08-06 07:56:00
116阅读
2评论
其中data.cpp是用来生成数据的,数据保存在data.txtac.cpp是ac的源代码wrong.cpp是错误的代码,提前要进行编译a
原创 2021-01-13 16:32:55
62阅读
准备4个cpp文件ac.cpp(ac代码)wa.cpp(错误代码)data.cpp(生成数据用的)duipai.cpp(用来根据dat生成的
原创 2022-11-02 15:02:53
88阅读
  • 1
  • 2
  • 3
  • 4
  • 5