1.首先将BL.cpp编写,再将AC.cpp编写出来,前提条件为BL一定是对的
2.将BL与AC的重定向进行更改,将.in指向make.out,将.out更改为文件名+number.out,运行两个程序,产生exe,out
3.编写一个数据生成器.cpp,用时间做种子srand(time(0)),注意随机函数要用<Cstdlib>,时间种子需要<ctime>,运行程序,产生exe,out
4.编写对拍核查程序
5.所有的文件输入输出与文件名必须是英文
以下适合Windows:
标准程序
#include<cstdio> #include<iostream> #define FORa(i,s,e) for(i=s;i<=e;i++) #define FORs(i,s,e) for(i=s;i>=e;i--) #define File(name) freopen(name".in","r",stdin); freopen(name".out","w",stdout); using namespace std; static char buf[100000],*pa=buf,*pb=buf; #define gc pa==pb&&(pb=(pa=buf)+fread(buf,1,100000,stdin),pa==pb)?EOF:*pa++ inline int read(); int main() { freopen("make.in","r",stdin); freopen("1.out","w",stdout); int a,b; a=read(),b=read(); cout<<a+b; return 0; } inline int read() { register int x(0);register int f(1);register char c(gc); while(c<'0'||c>'9')f=c=='-'?-1:1,c=gc; while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=gc; return f*x; }