对拍

· · 个人记录

在同一个文件夹写如下代码

  1. 数据生成器
    
    //以a+b为例
    #include <bits/stdc++.h>
    using namespace std;

int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); srand(time(0)); int a=rand()%20000+1; int b=rand()%20000+1; cout<<a<<" "<<b<<"\n"; }

2. 暴力(对拍时用的正解,一定要写对)
3. 待对拍代码
以上三个代码写完后都要运行一下
4. 对拍.bai
```bat
:loop
    gen > 1.txt
    std < 1.txt > 2.txt
    bl < 1.txt > 3.txt
    fc 2.txt 3.txt
    if errorlevel 1 pause 
goto loop