April Fools Day Contest 2014 逗比的专场

April Fools Day Contest 2014    逗比的专场。。。。

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

石头,剪刀,布 像不像?

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

B. Mysterious Language
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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.


答案是:

 Write(*, "(A10)") "FORTRAN 77"
      End

C. Magnum Opus
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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

一个词都不认识,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;

F. 000001
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
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

绝对一坑: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;
}

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

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,不过得连续提交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;
}



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值