这个比赛不正经,但是我可以一本正经的写代码啊

A. Quirky Quantifiers
time limit per test

2 seconds

memory limit per test

64 megabytes

input

standard input

output

standard output

Input

The input contains a single integer a (10 ≤ a ≤ 999).

Output

Output 0 or 1.

Examples
input

Copy

13

output
1

input

Copy

927

output
1

input

Copy

48

output
0

蛇皮,题目什么都没,0和1,反正是A,猜奇偶吧

#include<bits/stdc++.h>
using namespace std;
int main()
{int n;cin>>n;cout<<(n&1);return 0;
}

B. A Map of the Cat
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.

However, some cats won't tolerate this nonsense from the humans. Here is a map of a grumpy cat.

You have met a cat. Can you figure out whether it's normal or grumpy?

Interaction

This is an interactive problem. Initially you're not given any information about the cat. Instead, the cat is divided into ten areas, indexed from 0 to 9.

In one query you can choose which area you'll pet and print the corresponding index to standard out. You will get the cat's response, as depicted on the corresponding map, via standard in. For simplicity all responses are written in lowercase.

Once you're certain what type of cat you're dealing with, output "normal" or "grumpy" to standard out.

Note

Please make sure to use the stream flushing operation after each query in order not to leave part of your output in some buffer.

B就直接阅读理解了么,这个脑洞大,让我组合的应该,不做这个

C. Ravioli Sort
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Everybody knows of spaghetti sort. You decided to implement an analog sorting algorithm yourself, but as you survey your pantry you realize you're out of spaghetti! The only type of pasta you have is ravioli, but you are not going to let this stop you...

You come up with the following algorithm. For each number in the array ai, build a stack of ai ravioli. The image shows the stack for ai = 4.

Arrange the stacks in one row in the order in which the corresponding numbers appear in the input array. Find the tallest one (if there are several stacks of maximal height, use the leftmost one). Remove it and add its height to the end of the output array. Shift the stacks in the row so that there is no gap between them. Repeat the procedure until all stacks have been removed.

At first you are very happy with your algorithm, but as you try it on more inputs you realize that it doesn't always produce the right sorted array. Turns out when two stacks of ravioli are next to each other (at any step of the process) and differ in height by two or more, the top ravioli of the taller stack slides down on top of the lower stack.

Given an input array, figure out whether the described algorithm will sort it correctly.

Input

The first line of input contains a single number n (1 ≤ n ≤ 10) — the size of the array.

The second line of input contains n space-separated integers ai (1 ≤ ai ≤ 100) — the elements of the array.

Output

Output "YES" if the array can be sorted using the described procedure and "NO" if it can not.

Examples
input

Copy

31 2 3

output
YES

input

Copy

33 1 2

output
NO

Note

In the second example the array will change even before the tallest stack is chosen for the first time: ravioli from stack of height 3 will slide on the stack of height 1, and the algorithm will output an array {2, 2, 2}.

做nmh,读不懂,我还是补线段树好了

转载于:https://www.cnblogs.com/BobHuang/p/8689958.html

April Fools Contest 2018相关推荐

  1. April Fools Contest 2018[cf 愚人节专场题解]

    大家一起打愚人节的比赛还是挺有意思的!~~ 然而没有学弟留下来打比赛真是有点点小遗憾呢~ A:题目不要怕,只要胆子大 %2就好了 B: 给了两只猫,每只猫分为九个部分,有部分相同,有部分不同,你去摸猫 ...

  2. April Fools Contest 2017 题解源码(A,数学 B,数学 C,数学 D,字符串 E,数字逻辑 F,排序,卡时间,G,数学)...

    A. Numbers Joke time limit per test:2 seconds memory limit per test:64 megabytes input:standard inpu ...

  3. April Fools Contest 2017 题解

    趁着上课无聊,来补一补-- A. Numbers Joke 直接oeis就好了:http://oeis.org/search?q=numbers+joke&language=english&a ...

  4. Codeforces April Fools Day Contest 2021-A. Is it rated - 2-题解

    目录 Codeforces April Fools Day Contest 2021-A. Is it rated - 2 Interaction Example Input OutPut 题目大意 ...

  5. SoundHound Inc. Programming Contest 2018[C. Ordinary Beauty]

    SoundHound Inc. Programming Contest 2018 -Masters Tournament-[C. Ordinary Beauty] 打表找规律的. \(n = 1\) ...

  6. AtCoder SoundHound Inc. Programming Contest 2018 E + Graph (soundhound2018_summer_qual_e)

    原文链接https://www.cnblogs.com/zhouzhendong/p/AtCoder-SoundHound-Inc-Programming-Contest-2018-E.html 题目 ...

  7. Sichuan University Programming Contest 2018 Preliminary

    嗯为了防止大家AK,所以这次的A题和K题我们就当做不存在好了! 经历了昨天写了两个多小时的博客没保存的心态炸裂,今天终于下了个Markdown.所以我猜这篇的格式应该会更好看一点! 好吧废话不多说 题 ...

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

  9. 【最小费用最大流】N. April Fools' Problem (medium)

    http://codeforces.com/contest/802/problem/N [题解] 方法一: 1 #include<bits/stdc++.h> 2 using namesp ...

最新文章

  1. 数据结构笔记--二叉查找树概述以及java代码实现
  2. python的tkinter的用法_Python Tkinter图形工具使用方法及实例解析
  3. python新手代码-Python的初学者你现在可以自己“看”到代码的运行了!
  4. 连续处理函数reduce
  5. Struts2中的链接标签
  6. Activity-Service-Receiver-Provider
  7. FFmpeg编译出错_img_convert 找不到
  8. MyEclipse2014配置Git
  9. linux运维常见英文报错中文翻译(菜鸟必知)
  10. Win10安装Ubuntu18.04双系统,图文详解,全网最详细教程
  11. 校园信息发布平台网站源码
  12. 注塑机结构及辅助设备详解
  13. 考生必看:高中数学三角函数公式大全(史上最全)
  14. Activiti 入门学习笔记
  15. 将hustoj 数据从Ubuntu 14.04 成功迁移到 ubuntu 16.04
  16. Parabola 抛物线-简单公式实现
  17. 【日成海外营销】如何利用TikTok进行红人营销?
  18. 【从零开始玩量化1】AKShare: Python开源财经数据接口库
  19. [来源未知][Dp]permut
  20. 学习-输入正整数m,判断m是否是素数

热门文章

  1. C#图片处理常见方法性能比较
  2. I hope so 2016-Oct-10
  3. 什么是软件定义数据中心
  4. 什么是静态UItableView
  5. swift 通知中心 进入后台多久会通知用户关闭此功能
  6. LaTeX - 带圈数字
  7. 更换主版之后远程管理卡恢复操作
  8. [改善Java代码]用整数类型处理货币
  9. ios开发日记-18上传appStore时,遇到错误,代码为ERROR ITMS-90049
  10. Android自定义控件系列之基础篇