代码-std=c++14 -O2 -static -Wall -Wextra -Wshadow -Wreturn-type -Werror=return-type -Wl,--stack=268435456
C++//快读模板(适配于任意整数,可选开启fread优化)
#include<iostream>
using namespace std;
int x,y;
#define G() (p1==p2&&(p2=(p1=buf)+fread(buf,1,L,stdin)),p1==p2?EOF:*p1++)
namespace FastIo{
static const int L=1<<20;
static char buf[L],*p1=buf,*p2=buf;
static bool sta=1;//开启fread优化
template<class T>
inline bool read(T &res){
res=0;
int c,f=1;
c=sta?G():getchar();
while(c<'0'||c>'9'){
if(c=='-') f=-1;
if(c==EOF) return 0;
c=sta?G():getchar();
}
while(c>='0'&&c<='9'){
res=res*10+c-'0';
c=sta?G():getchar();
}
res=res*(T)f;
return 1;
}
template<class T>
inline void write(T res){
if(res==0){
putchar('0');
return;
}
if(res<0) putchar('-'),res=-res;
char c[35];int tot=0;
while(res) c[++tot]=char(res%10+'0'),res/=10;
while(tot) putchar(c[tot--]);
}
}
using namespace FastIo;
Markdown:loop
gen.exe > input.txt
my.exe < input.txt > my.out
bf.exe < input.txt > bf.out
fc \w my.out bf.out
if not errorlevel 1 goto loop
pause