H - A + B Strikes Back

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?

Input

The input contains two integers a and
b (0 ≤ a, b ≤ 103), separated by a single space.

Output

Output the sum of the given integers.

Sample test(s)
Input
5 14
Output
19
Input
381 492
Output
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; }

A. The Great Game
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

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.

Input

The input contains two strings of equal length (between 2 and 20 characters, inclusive). Each line describes the actions of one team.

Output

Output "TEAM 1 WINS" if the first team won, "TEAM 2 WINS" if the second team won, and "TIE" if there was a tie.

Sample test(s)
Input
[]()[]8<
8<[]()8<
Output
TEAM 2 WINS
Input
8<8<()
[]8<[]
Output
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

Input

The first line of input contains several space-separated integers
ai (0 ≤ ai ≤ 100).

Output

Print a single integer.

Sample test(s)
Input
2 4 6 8 10
Output
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; }

B - Mysterious Language

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.

Input

This program has only one test (your program doesn't have to read anything).

Output

Output the name of the mysterious language. Note that the name is case-sensitive and might contain digits and special characters.

Sample test(s)
Note

Some scientists disagree on what should be considered as a language and what should be considered as a dialect.

这题目,必须先WA一次。看着CE来百度,发现是FORTRAN,写了N次,都是CE,无果,看别人AC代码,跪了。

       write(*,*)"FORTRAN 77"
END

不能少缩紧啊!!!!前面的空格不能没有。

D - Big Data

D. Big Data
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

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 highest mountain above sea level in the world is Mount Everest. Its peak rises to 8848 m.
  • The largest board game tournament consisted of 958 participants playing chapaev.
  • The largest online maths competition consisted of 12766 participants.
  • The Nile is credited as the longest river in the world. From its farthest stream in Burundi, it extends 6695 km in length.
  • While not in flood, the main stretches of the Amazon river in South America can reach widths of up to 1100 km at its widest points.
  • Angel Falls is the highest waterfall. Its greatest single drop measures 807 m.
  • The Hotel Everest View above Namche, Nepal — the village closest to Everest base camp – is at a record height of 31962 m
  • Uranium is the heaviest of all the naturally occurring elements. Its most common isotope has a nucleus containing 146 neutrons.
  • The coldest permanently inhabited place is the Siberian village of Oymyakon, where the temperature of -68°C was registered in the
    twentieth century.
  • The longest snake held in captivity is over 25 feet long. Its name is Medusa.
  • Colonel Meow holds the world record for longest fur on a cat — almost 134 centimeters.
  • Sea otters can have up to 10000 hairs per square inch. This is the most dense fur in the animal kingdom.
  • The largest state of USA is Alaska; its area is 663268 square miles
  • Alaska has a longer coastline than all of the other 49 U.S. States put together: it is 154103 miles long.
  • Lake Baikal is the largest freshwater lake in the world. It reaches 1642 meters in depth and contains around one-fifth of the world’s unfrozen fresh water.
  • The most colorful national flag is the one of Turkmenistan, with 106 colors.
Input

The input will contain a single integer between 1 and 16.

Output

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; }

F - 000001

Input

The input contains a single integer a (1 ≤ a ≤ 64).

Output

Output a single integer.

Sample test(s)
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
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; }

今天算是放松放松,开心开心,41专场真坑。。。

坑爹CF April Fools Day Contest题解的更多相关文章

  1. CF #April Fools Day Contest 2016 E Out of Controls

    题目连接:http://codeforces.com/problemset/problem/656/E 愚人节专场的E,整个其实就是个Floyd算法,但是要求代码中不能包含 definedoforfo ...

  2. April Fools Day Contest 2014

    April Fools Day Contest 2014 A.C.H三道题目 ============================================================= ...

  3. April Fools Day Contest 2014 H. A + B Strikes Back

    H. A + B Strikes Back time limit per test 1 second memory limit per test 256 megabytes input standar ...

  4. April Fools Day Contest 2016 D. Rosetta Problem

    D. Rosetta Problem 题目连接: http://www.codeforces.com/contest/656/problem/D Description ++++++++[>+& ...

  5. April Fools Day Contest 2016 G. You're a Professional

    G. You're a Professional 题目连接: http://www.codeforces.com/contest/656/problem/G Description A simple ...

  6. April Fools Day Contest 2016 F. Ace It!

    F. Ace It! 题目连接: http://www.codeforces.com/contest/656/problem/F Description Input The only line of ...

  7. April Fools Day Contest 2016 E. Out of Controls

    E. Out of Controls 题目连接: http://www.codeforces.com/contest/656/problem/E Description You are given a ...

  8. April Fools Day Contest 2016 C. Without Text 信号与系统

    C. Without Text 题目连接: http://www.codeforces.com/contest/656/problem/C Description You can preview th ...

  9. April Fools Day Contest 2016 B. Scrambled

    B. Scrambled 题目连接: http://www.codeforces.com/contest/656/problem/B Description Btoh yuo adn yuor roo ...

随机推荐

  1. POJ3750: 小孩报数问题+一道经典约瑟夫问题(猴子选大王)

    又一次因为一个小错误,POJ上Wrong Answer了无数次..... 在差不多要放弃的时候,发现了这个猥琐的不能再猥琐的bug,改完了提交就AC了,简直无语.... 本题wo采用模拟方法: 1 # ...

  2. 浅谈.NET的缓存(依赖和过期)

    Cache 线程安全,相当于static Arraylist. 缓存过期机制 1.设置过期时间 a.可设置过期时间 Cache.Insert());//设置10分钟过期 b.绝对过期时间 Cache. ...

  3. centos svn快速搭建

    搭建SVN服务,有效的管理代码,以下三步可以快速搞定. 1.安装 #yum install subversion 判断是否安装成功 [root@]# svnserve --version 有了SVN软 ...

  4. js http 请求 多个相同参数名传值

    最近在用js和api做对接的时候需要传参数类似于 rights=a1&rights=a2 因为有相同的参数名,试过很多方法都被覆盖了. 最后终于发现可以通过rights=[a1,a2]的方式, ...

  5. MVC模式网站编写经验总结

    单个网站使用MVC架构模式经验总结,包含具体网站包分类.包内类的编写.注意事项等方面.本人认为,按照如下包分类及编写方法,已经满足一个简单普通网站(主要针对java)的编写需求. MVC主要层级 数据 ...

  6. Cocos2d-x学习笔记之Cocos2d-x开发环境搭建

    作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz Cocos2d-x源码包下载地址: http://cocos2d-x.org/projects/cocos2d-x/ ...

  7. Mac RTX

    http://bbs.weiphone.com/read-htm-tid-1876850.html 公司的rtx还是2010的,如果是2011的就有mac版的了.直接到官网下. 那还是用2010的,尼 ...

  8. 深入理解jQuery插件开发(转)

    如果你看到这篇文章,我确信你毫无疑问会认为jQuery是一个使用简便的库.jQuery可能使用起来很简单,但是它仍然有一些奇怪的地方,对它基本功能和概念不熟悉的人可能会难以掌握.但是不用担心,我下面已 ...

  9. Design Of A Modern Cache

    http://highscalability.com/blog/2016/1/25/design-of-a-modern-cache.html MONDAY, JANUARY 25, 2016 AT ...

  10. php笔记06:http响应中的状态码

    首先我们看一个360浏览器中使用开发截图如下: 上面的Status Code:  OK (这个就是状态码) 1.状态码主要用于服务器对请求的处理结果,它是一个三位的十进制数.响应状态码分为5类,如下所 ...