A + B is often used as an example of the easiest problem possible to show some contest platform. However, some scientists have observed that sometimes this problem is not so easy to get accepted. Want to try?
The input contains two integers a and b (0 ≤ a, b ≤ 103), separated by a single space.
Output the sum of the given integers.
5 14
19
381 492
873
坑爹啊这题目,输出格式要求……我记得我年少无知时候刚打完各种A+B题目后参加比赛盼望A+B题目的出现..
今天看到了,WA了好多次。。重点就是输出后要多输个空格。。
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a+b<<" "<<endl; return 0; }
Two teams meet in The Game World Championship. Some scientists consider this game to be the most intellectually challenging game in the world. You are given two strings describing the teams' actions in the final battle. Figure out who became the champion.
The input contains two strings of equal length (between 2 and 20 characters, inclusive). Each line describes the actions of one team.
Output "TEAM 1 WINS" if the first team won, "TEAM 2 WINS" if the second team won, and "TIE" if there was a tie.
[]()[]8< 8<[]()8<
TEAM 2 WINS
8<8<() []8<[]
TIE还是水题一道。原理很简单。
"8<" > " [] "
"[ ] " > " ()"
"() " > "8<"
我本来以为我这么天真的想法是肯定WA了,但是题目的信息量真心低啊……硬着头皮交了,AC了……
#include<iostream> #include<cstdio> #include<cstring> #include<string> using namespace std; int main(){ string a,b; int A,B; A=0,B=0; cin>>a>>b; for(int i=0;i<a.length();i+=2){ if(a[i]==b[i]){ continue; }else{ if(a[i]=='8'&&b[i]=='['){ A++; }else if(a[i]=='['&&b[i]=='('){ A++; }else if(a[i]=='('&&b[i]=='8'){ A++; }else if(a[i]==b[i]){ A++; B++; }else{ B++; } } } if(A==B){cout<<"TIE"<<endl;} else if(A>B){cout<<"TEAM 1 WINS"<<endl;} else cout<<"TEAM 2 WINS"<<endl; return 0; }C - Magnum Opus
Salve, mi amice.
Et tu quidem de lapis philosophorum. Barba non facit philosophum. Labor omnia vincit. Non potest creatio ex nihilo. Necesse est partibus.
Rp:
I Aqua Fortis
I Aqua Regia
II Amalgama
VII Minium
IV Vitriol
Misce in vitro et æstus, et nil admirari. Festina lente, et nulla tenaci invia est via.
Fac et spera,
Vale,
Nicolas Flamel
The first line of input contains several space-separated integers ai (0 ≤ ai ≤ 100).
Print a single integer.
2 4 6 8 10
1
炼金术你懂不懂?真扯淡……题目写得无法读懂,是法文吗?反正我最多能看懂英文,中文,还有粤语~(没有粤语OJ啊!!!),百度了一下,就是炼金术的配方啊。。。
I Aqua Fortis 1分量的硝酸
I Aqua Regia 1分量的王水
II Amalgama 2分量的汞合金
VII Minium 7分量的四氧化三铅
IV Vitriol 4分量的硫酸盐
不知道我翻译错了没有,神配方啊!
给定ABCDE,求最多配出多少(?)。
这个41专场真心太坑。。
#include<iostream> #include<cstdio> #include<cstring> #include<string> using namespace std; int main(){ int A,B,C,D,E; cin>>A>>B>>C>>D>>E; C>>=1; D/=7; E>>=2; A= min(A,B); A= min(A,E); C= min(D,C); C= min(A,C); cout<<C<<endl; //cout<<res<<endl; return 0; }
You are given a mysterious language (codenamed "Secret") available in "Custom Invocation" tab. Figure out what this language is and write a program which prints its name. Note that the program must be written in this language.
This program has only one test (your program doesn't have to read anything).
Output the name of the mysterious language. Note that the name is case-sensitive and might contain digits and special characters.
Some scientists disagree on what should be considered as a language and what should be considered as a dialect.
write(*,*)"FORTRAN 77" END
Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the gift and decided to put some important facts to this array. Here are the first few of the facts:
The input will contain a single integer between 1 and 16.
Output a single integer.
#include<iostream> #include<cstdio> #include<cstring> #include<string> using namespace std; int main(){ int A; int B[]={0,1,0,0,1,0,1,0,1,1,1,0,0,1,0,1,0}; cin>>A; cout<<B[A]<<endl; //cout<<res<<endl; return 0; }
The input contains a single integer a (1 ≤ a ≤ 64).
Output a single integer.
2
1
4
2
27
5
42
6
第一次做没有题目详情的题目……
我相信绝大多部分人都跟我一样,看成是ceil(log(n)/log(n))的题目,之后陷入无限WA。。。
这个世界有一个A000001数列……
巨坑。。
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int A; int B[]={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 }; cin>>A; cout<<B[A]<<endl; //cout<<res<<endl; return 0; }