跳到正文

剪贴板

剪贴板 ysi7bo0z

harmis_yz
原文
剪贴板信息

剪贴板信息

发布
收录
更新

对拍:

C++
il void solve(){
	int t = 100;
	while(t --){
		system("./gen > in.txt");
		system("./std < in.txt > a.txt");
		system("./brt < in.txt > b.txt");
		if(system("diff a.txt b.txt")){
			debug();return ;
		}
	}puts("OK");
	return ;
}
C++
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define re register
#define U(i, x, y) for(re int i = (x); i <= (y); ++ i)
#define D(i, x, y) for(re int i = (x); i >= (y); -- i)
#define UU(i, x, y) for(re int i = (x); i < (y); ++ i)
#define DD(i, x, y) for(re int i = (x); i > (y); -- i)
#define il inline
#define pii pair<int, int>
#define x first
#define y second
#define gc getchar()
#define rd read()
#define debug() puts("------------")

namespace yzqwq{
	il int read(){
		int x = 0, f = 1; char ch = gc;
		while(ch < '0' || ch > '9'){ if(ch == '-') f = -1; ch = gc;}
		while(ch >= '0' && ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = gc;
		return x * f;
	}
	il int qmi(int a, int b, int p){
		int ans = 1;
		while(b){
			if(b & 1) ans = ans * a % p;
			a = a * a % p, b >>= 1;
		}
		return ans;
	}
	il int gcd(int a, int b){
		if(!b) return a;
		return gcd(b, a % b);
	}
	il int lcm(int a, int b){
		return a / gcd(a, b) * b;
	}
	il void exgcd(int a, int b, int &x, int &y){
		if(! b) return x=1, y=0, void(0);
		exgcd(b, a % b, x, y);
		int t = x;
		x = y, y = t - a / b * x;
		return ;
	}
	mt19937 rnd(time(0));
}
using namespace yzqwq;

char b[1000005];
char cb[1000005];
il void m1(int x, int y){
	sprintf(b, "data%d-%d.in", x, y);
	freopen(b, "w", stdout);
}
il void work(){
	
}
il void m2(int x, int y){
	fclose(stdout);
	sprintf(cb, "./std < data%d-%d.in > data%d-%d.out", x, y, x, y);
	system(cb);
}
il void solve(){
	int l = 1, r = 10, cs = 0;
	U(i, l, r){
		m1(cs, i);
		work();
		m2(cs, i);
	}
	return ;
}

signed main(){
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);
	int t = 1; while(t--)
	solve();
	return 0;
}
C++
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define re register
#define il inline
#define pii pair<int,int>
#define x first
#define y second
#define gc getchar()
#define rd read()
#define debug() puts("------------")

namespace yzqwq{
	il int read(){
		int x=0,f=1;char ch=gc;
		while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=gc;}
		while(ch>='0'&&ch<='9') x=(x<<1)+(x<<3)+(ch^48),ch=gc;
		return x*f;
	}
	il int qmi(int a,int b,int p){
		int ans=1;
		while(b){
			if(b&1) ans=ans*a%p;
			a=a*a%p,b>>=1;
		}
		return ans;
	}
	il auto max(auto a,auto b){return (a>b?a:b);}
	il auto min(auto a,auto b){return (a<b?a:b);}
	il int gcd(int a,int b){
		if(!b) return a;
		return gcd(b,a%b);
	}
	il int lcm(int a,int b){
		return a/gcd(a,b)*b;
	}
	il void exgcd(int a,int b,int &x,int &y){
		if(!b) return x=1,y=0,void(0);
		exgcd(b,a%b,x,y);
		int t=x;
		x=y,y=t-a/b*x;
		return ;
	}
	mt19937 rnd(time(0));
}
#include<iostream>
#include<cstring>
#include<cstdio>
#include<string>
#include<queue>
#include<vector>
#include<algorithm>
#include<ctime>
#include<cmath>
#include<fstream>
using namespace yzqwq;

char b[1000005];
char cb[1000005];
il void makedata1(int i)
{
    sprintf(b,"data%d.in",i);
    freopen(b,"w",stdout);
}
il void makedata2(int i)
{
    fclose(stdout);
    sprintf(cb,"T1.exe < data%d.in > data%d.out",i,i); 
    system(cb);
}
int n,m;

il void solve(){
	for(re int ks=41;ks<=50;++ks){
		makedata1(ks);
		//数据输出 
		makedata2(ks);
	}
	return ;
}

signed main(){
	int t=1;while(t--)
	solve();
	return 0;
}