April Fools Day Contest 2014

A、C、H三道题目

===================================================================

A. The Great Game

这题怎没看懂。。看了官方题解真是恍然大悟啊,原来是石头剪刀布啊!!!

8< 代表剪刀啊

() 代表石头啊

[] 代表布啊

真是逆天啊,这么一说还真觉得有点像。。。。尤其是那个剪刀。

给那个出题人的想象力跪了。

 /*
  * =====================================================================================
  *       Filename : TheGreatGame.cpp
  *    Description : So Funny
  *    Version     : 0.1
  *        Created : 04/29/14 07:58
  *         Author : Liu Xue Yang (LXY), liuxueyang457@163.com
  *         Motto  : How about today?
  * =====================================================================================
  */
 #include <cstdlib>
 #include <cstdio>
 #include <cstring>

 using namespace std;

 /*
  * ===  FUNCTION  ======================================================================
  *         Name:  judge
  *  Description:  who win?
  * =====================================================================================
  */
     int
 judge ( char a, char b )
 {
     if ( a=='[' ) {
         if ( b=='[' ) {
             ;
         }
         else if ( b=='(' ) {
             ;
         }
         else {
             ;
         }
     }
     if ( a=='(' ) {
         if ( b=='[' ) {
             ;
         }
         else if ( b=='(' ) {
             ;
         }
         else {
             ;
         }
     }
     ' ) {
         if ( b=='[' ) {
             ;
         }
         else if ( b=='(' ) {
             ;
         }
         else {
             ;
         }
     }
     ;
 }        /* -----  end of function judge  ----- */

 /*
  * ===  FUNCTION  ======================================================================
  *         Name: main
  * =====================================================================================
  */

     int
 main ( int argc, char *argv[] )
 {
     ], b[];
     scanf ( "%s%s", a, b );
     , winb = ;
     ; i < len; i+= ) {
         int tmp = judge(a[i], b[i]);
          ) {
             ++wina;
         }
          ) {
             ++winb;
         }
     }
     if ( wina > winb ) {
         printf ( "TEAM 1 WINS\n" );
     }
     else if ( wina < winb ) {
         printf ( "TEAM 2 WINS\n" );
     }
     else {
         printf ( "TIE\n" );
     }

         return EXIT_SUCCESS;
 }                /* ----------  end of function main  ---------- */

看了一下别人的python代码,挺简洁。

 #!/bin/python
 team1 = input().replace(')
 team2 = input().replace(')
 s = 0
 for i in range(0, len(team1), 2):
     if team1[i] > team2[i]:
         s += 1
     elif team1[i] < team2[i]:
         s -= 1
     ':
         s -= 2
     ':
         s += 2
 if s > 0:
     print("TEAM 1 WINS")
 elif s < 0:
     print("TEAM 2 WINS")
 else:
     print("TIE")

这个思路眼前一亮,把对应的字符赋值,比较,然后再修正。

C. Magnum Opus

同样的,开始我也没看懂,没错,是拉丁语。。。

官方题解说Google翻译一下这封信,可以发现这是一封很优美又充满讽刺的信。。

好吧,翻译之后也没看懂。需要注意前面的大写的罗马数字,然后猜想大概和配方的量有关系。

五种配方的量依次是:1 1 2 7 4

所以只需要让五种原料分别除以上面的五个数字,然后找到最小值,输出。

这得需要多丰富的想象力啊!!

 #!/bin/python

 a, b, c, d, e = list(map(int, input().split(' ')))
 result = (int)(min(a/1, b/1, c/2, d/7, e/4))
 print(result)

恩,用python写比较简单。

H. A + B Strikes Back

这道题嘛。绝。

官方题解说,提交的前五次系统是不会测试直接给WA!!!

我看到这句话就笑了啊!!!这也太有创意了吧,哈哈哈哈

 #!/bin/python
 a, b = list(map(int, input().split(' ')))
 print(a+b)

不愧是April Fool's Day,题目真有意思。。

April Fools Day Contest 2014的更多相关文章

  1. 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 ...

  2. 坑爹CF April Fools Day Contest题解

    H - A + B Strikes Back A + B is often used as an example of the easiest problem possible to show som ...

  3. April Fools Day Contest 2016 D. Rosetta Problem

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

  4. 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 ...

  5. 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 ...

  6. 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 ...

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

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

  8. April Fools Day Contest 2016 B. Scrambled

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

  9. April Fools Day Contest 2016 A. Da Vinci Powers

    A. Da Vinci Powers 题目连接: http://www.codeforces.com/contest/656/problem/A Description The input conta ...

随机推荐

  1. 转载:CDH5.X完全卸载步骤

    http://blog.csdn.net/wulantian/article/details/42706777 //CDH5.X完全卸载步骤 # by coco # 2015-01-14   1. 关 ...

  2. SQLServer存储过程和触发器学习记录及简单例子

     一.存储过程 存储过程即为能完成特定功能的一组SQL语句集.如果需要对查出的多条数据进行操作的话,这里需要理解游标(CURSOR)的概念,对于oracle有for each row命令,可以不用游标 ...

  3. redis缓存技术学习

    1 什么是redis redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串). list(链表).set(集合)和zset ...

  4. 使用CSS3各个属性实现小人的动画

    使用CSS3各个属性实现带有音乐小人的动画,完全不使用JS代码: 注:chrome浏览器效果最佳,最终效果静态图: HTML代码如下: <!DOCTYPE html> <html&g ...

  5. mysql 同一IP 产生太多终端的数据库连接导致阻塞

    问题:null, message from server: "Host 'ip' is blocked because of many connection errors; unblock ...

  6. Javascript闭包(狗血剧情,通俗易懂)

    我们先来看一个闭包的函数: function a() { var i = 0; function b() { alert(++i); } return b; } var c = a(); c(); c ...

  7. POJ 3683 Priest John's Busiest Day (2-SAT)

    题意:有n对新人要在同一天结婚.结婚时间为Ti到Di,这里有时长为Si的一个仪式需要神父出席.神父可以在Ti-(Ti+Si)这段时间出席也可以在(Di-Si)-Si这段时间.问神父能否出席所有仪式,如 ...

  8. entity framework 新手入门篇(1)-建立模型

    entity framework是微软官方免费提供给大家的一套ORM(Object Relational Mapping对象关系映射)解决方案.它不仅可以帮助我们解决数据缓存的问题,还能在最小的开销下 ...

  9. Appium学习笔记(一)--安装与配置

    移动自动化测试常用工具有两个:Appium和Robotium.正好最近自己开始负责客户端的工作,初来乍到需要熟悉下环境,正好学习新的东西. 移动自动化相对web来说,原理与操作过程是一样的,通过自动化 ...

  10. uboot(二): Uboot-arm-start.s分析

    声明:该贴是通过参考其他人的帖子整理出来,从中我加深了对uboot的理解,我知道对其他人一定也是有很大的帮助,不敢私藏,如果里面的注释有什么错误请给我回复,我再加以修改.有些部分可能还没解释清楚,如果 ...