源程序:
/*
Problem:
OJ:
User: S.B.S.
Time:
Memory:
Length:
*/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<cstdlib>
#include<iomanip>
#include<cassert>
#include<climits>
#include<functional>
#include<bitset>
#include<vector>
#include<list>
#define F(i,j,k) for(int i=j;i<=k;++i)
#define M(a,b) memset(a,b,sizeof(a))
#define FF(i,j,k) for(int i=j;i>=k;i--)
#define maxn 10001
#define inf 0x3f3f3f3f
#define maxm 4001
#define mod 998244353
#define LOCAL
using namespace std;
int read(){
int x=,f=;char ch=getchar();
while(ch<''||ch>''){if(ch=='-')f=-;ch=getchar();}
while(ch>=''&&ch<=''){x=x*+ch-'';ch=getchar();}
return x*f;
}
long long n,m;
int main()
{
std::ios::sync_with_stdio(false);//cout<<setiosflags(ios::fixed)<<setprecision(1)<<y;
#ifdef LOCAL
freopen("in.txt","r",stdin);
freopen("out2.out","w",stdout);
#endif
cin>>n>>m;
cout<<n+m<<endl;
return ;
}
222
对拍码:
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<string>
#define rep(q,p) for(int q=1;q<=p;q++)
#define prt for (int i=l;i>0;i--) cout<<c[i]
using namespace std;
const int maxn=1e4+;
string sa,sb;
int la,lb,a[maxn],b[maxn],c[maxn],l;
bool ma,mb,m;
inline void addbig(string ta,string tb)
{
la=ta.length(); lb=tb.length();
for (int i=;i<=la;i++)
a[la-i+]=sa[i-]-'';
for (int i=;i<=lb;i++)
b[lb-i+]=sb[i-]-'';
l=max(la,lb);
rep(i,l)
{
c[i]+=a[i]+b[i];
c[i+]=c[i]/;
c[i]%=;
}
if (c[l+]) l++;
}
inline bool subbig(string ta,string tb)
{
la=ta.length(); lb=tb.length();
bool mark=false;
if (la<lb || (la==lb && tb>ta))
{
string tmp;
tmp=ta; ta=tb; tb=tmp;
swap(la,lb);
mark=true;
}
for (int i=;i<=la;i++)
a[la-i+]=ta[i-]-'';
for (int i=;i<=lb;i++)
b[lb-i+]=tb[i-]-'';
l=max(la,lb);
rep(i,la)
{
c[i]+=a[i]-b[i];
if (c[i]<) c[i]+=,c[i+]--;
c[i+]+=c[i]/;
c[i]%=;
}
while (l> && !c[l]) l--;
return mark;
}
inline void mulbig(string ta,string tb)
{
la=ta.length(); lb=tb.length();
for (int i=;i<=la;i++)
a[la-i+]=ta[i-]-'';
for (int i=;i<=lb;i++)
b[lb-i+]=tb[i-]-'';
rep(i,la) rep(j,lb)
{
c[i+j-]+=a[i]*b[j];
c[i+j]+=c[i+j-]/;
c[i+j-]%=;
}
l=la+lb;
while (!c[l] && l>) l--;
}
int main()
{
freopen("in.txt","r",stdin);
freopen("out1.out","w",stdout);
cin>>sa>>sb;
la=sa.length(); lb=sb.length();
if (sa[]=='-')
ma=,sa=sa.substr(,la);
if (sb[]=='-')
mb=,sb=sb.substr(,lb);
if (!ma xor mb)
{
addbig(sa,sb);
if (ma) cout<<'-';
prt;
}
else
if (ma)
{
if (subbig(sb,sa)) cout<<'-';
prt;
}
else
{
if (subbig(sa,sb)) cout<<'-';
prt;
}
return ;
}
111
datamaker:
/*
Problem:
OJ:
User: S.B.S.
Time:
Memory:
Length:
*/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<cstdlib>
#include<iomanip>
#include<cassert>
#include<climits>
#include<functional>
#include<bitset>
#include<vector>
#include<list> #include<ctime>
#define F(i,j,k) for(int i=j;i<=k;++i)
#define M(a,b) memset(a,b,sizeof(a))
#define FF(i,j,k) for(int i=j;i>=k;i--)
#define maxn 10001
#define inf 0x3f3f3f3f
#define maxm 4001
#define mod 998244353
#define LOCAL
using namespace std;
int read(){
int x=,f=;char ch=getchar();
while(ch<''||ch>''){if(ch=='-')f=-;ch=getchar();}
while(ch>=''&&ch<=''){x=x*+ch-'';ch=getchar();}
return x*f;
}
int n,m;
int main()
{
std::ios::sync_with_stdio(false);//cout<<setiosflags(ios::fixed)<<setprecision(1)<<y;
// freopen("data.in","r",stdin);
freopen("in.txt","w",stdout);
srand(time(NULL));
cout<<rand()%(<<)<<endl;
cout<<rand()%(<<)<<endl;
return ;
}
对拍:
/*
Problem:
OJ:
User: S.B.S.
Time:
Memory:
Length:
*/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<cstdlib>
#include<iomanip>
#include<cassert>
#include<climits>
#include<functional>
#include<bitset>
#include<vector>
#include<list>
#define F(i,j,k) for(int i=j;i<=k;++i)
#define M(a,b) memset(a,b,sizeof(a))
#define FF(i,j,k) for(int i=j;i>=k;i--)
#define maxn 10001
#define inf 0x3f3f3f3f
#define maxm 4001
#define mod 998244353
//#define LOCAL
using namespace std;
int read(){
int x=,f=;char ch=getchar();
while(ch<''||ch>''){if(ch=='-')f=-;ch=getchar();}
while(ch>=''&&ch<=''){x=x*+ch-'';ch=getchar();}
return x*f;
}
int n,m;
int main()
{
std::ios::sync_with_stdio(false);//cout<<setiosflags(ios::fixed)<<setprecision(1)<<y;
#ifdef LOCAL
freopen("data.in","r",stdin);
freopen("data.out","w",stdout);
#endif
int t=;
while(){
cout<<++t<<":"<<endl;
system("data.exe");
system("111.exe");
system("222.exe");
if(system("fc out1.out out2.out")) while();
}
return ;
}