3.2 安装CYaRon包
在你的终端中输入pip install cyaron
,这里需要注意一一下你的环境
cyaron生成数据对拍
#!/usr/bin/env python from cyaron import * # 引入CYaRon的库 import random fout = open("a.in","w") a=randint(-100,100) b=randint(-100,100) c=randint(1,20) fout.write("%d %d\n%d"%(a,b,c)) fout.close()
:loop make.py baoli.exe>b.out std.exe>c.out fc b.out c.out if not errorlevel 1 goto loop pause
c++生成数据对拍
#include<bits/stdc++.h> #include<ctime> using namespace std; int rnd() { return rand() << 15 | rand(); } int tot; int main() { freopen("a.in", "w", stdout); srand((unsigned)time(0)); int N = (rand() % 300) +1;//[1, 30] cout << N << ' '; N = (rand() % 300) +1;//[1, 30] cout << N << ' '; N = (rand() % 300) +1;//[1, 30] cout << N <<endl; return 0; }
:loop rand.exe baoli.exe>b.out std.exe>c.out fc b.out c.out if not errorlevel 1 goto loop pause
原文链接: https://www.cnblogs.com/shiningrise/p/17129765.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/318721
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!