对拍

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

 

posted @   shiningrise  阅读(134)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2012-02-17 cisco4503端口镜像配置
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css
点击右上角即可分享
微信分享提示