April Fools Day Contest 2014 逗比的专场。。。。
石头,剪刀,布 像不像?
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
char str1[40],str2[40];
int ck(char a,char b, char c,char d)
{
if(a==c&&b==d) return 2;
if(a=='['&&b==']')
{
if(c=='8'&&d=='<') return 0;
else if(c=='('&&d==')') return 1;
}
else if(a=='('&&b==')')
{
if(c=='8'&&d=='<') return 1;
else if(c=='['&&d==']') return 0;
}
else if(a=='8'&&b=='<')
{
if(c=='['&&d==']') return 1;
else if(c=='('&&d==')') return 0;
}
}
int main()
{
cin>>str1;
cin>>str2;
int n=strlen(str1);
int t1=0,t2=0;
for(int i=0;i+1<n;i+=2)
{
int t=ck(str1[i],str1[i+1],str2[i],str2[i+1]);
if(t==1) t1++;
else if(t==0) t2++;
}
if(t1>t2) puts("TEAM 1 WINS");
else if(t1<t2) puts("TEAM 2 WINS");
else puts("TIE");
return 0;
}
答案是:
Write(*, "(A10)") "FORTRAN 77"
End
一个词都不认识,google翻译过来也看不懂。。。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int a,b,c,d,e;
int main()
{
cin>>a>>b>>c>>d>>e;
int t=min(a,min(b,min(c/2,min(d/7,e/4))));
cout<<t<<endl;
return 0;
绝对一坑:oeis A000001
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
using namespace std;
int a[100]={0,1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2 };
int main()
{
int n;
cin>>n;cout<<a[n]<<endl;
return 0;
}
普通的A+B,不过得连续提交6次才行。。。。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
long long int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}