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

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&);
return ;
}
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
3
1 2 3
output
YES
input

Copy
3
3 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,读不懂,我还是补线段树好了

April Fools Contest 2018的更多相关文章

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

  2. Codeforces April Fools Contest 2017

    都是神题,我一题都不会,全程听学长题解打代码,我代码巨丑就不贴了 题解见巨神博客 假装自己没有做过这套

  3. April Fools Contest 2017 题解

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

  4. April Fools Contest 2017 F

    Description You are developing a new feature for the website which sells airline tickets: being able ...

  5. April Fools Contest 2017 E

    Description Input The input consists of four lines, each line containing a single digit 0 or 1. Outp ...

  6. April Fools Contest 2017 D

    Description Input The only line of the input contains a string of digits. The length of the string i ...

  7. April Fools Contest 2017 C

    Description DO YOU EXPECT ME TO FIND THIS OUT? WHAT BASE AND/XOR LANGUAGE INCLUDES string? DON'T BYT ...

  8. April Fools Contest 2017 B

    Description Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it? Input The i ...

  9. April Fools Contest 2017 A

    Description Input The input contains a single integer a (1 ≤ a ≤ 30). Output Output a single integer ...

随机推荐

  1. Android的bitmap和优化

    内存管理是个永恒的话题! 内存溢出:就是分配的内存不足以放下数据项序列.如在一个域中输入的数据超过了它的要求就会引发数据溢出问题,多余的数据就可以作为指令在计算机上运行.就是你要求分配的内存超出了系统 ...

  2. bootstrap-table学习

    参考学习  http://bootstrap-table.wenzhixin.net.cn/getting-started/ 包括Bootstrap库(如果你的项目没有使用它)和bootstrap-t ...

  3. 51nod 1101 换零钱

    基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 N元钱换为零钱,有多少不同的换法?币值包括1 2 5分,1 2 5角,1 2 5 10 20 50 100元.   ...

  4. [学习笔记] AD笔记

    Auto diff 深度学习基础知识,auto diff自动微分的笔记,tensorflow中的求导就是基于这个做的.多用于复杂神经网络求导.来自于一篇论文,没怎么看完,但是会算了,比较底层一点吧.. ...

  5. LeetCode 53题 最大子序和 -- JavaScript

    解题思路分析: 该题是在一个整数数组中找到一个和最大的连续子数组,并返回和值.那么如何找到一个和最大的连续子数组呢?我们知道,这肯定需要遍历数组才行:好,那我们就开始遍历数组.首先,我们初始化最大和 ...

  6. Mysql查询指定用户并列排名 类似rank函数

    SELECT total.* FROM ( SELECT obj.uid, obj.score, CASE WHEN @rowtotal = obj.score THEN @rownum WHEN @ ...

  7. Service Unavailable HTTP Error 503. The service is unavailable.

    原因: public void SetCurrentType(string[] projTypes) { _ProjTypes = _ProjTypes; } 确保没有无限递归或无限循环

  8. 采用maven 对tomcat 进行自动部署

    在工作过程中经常会遇到项目频繁发不到额过程,而且在这个过程中会一直进行一些简单但是繁琐的重复性工程 1.打war 包 2.停掉tomcat 3.copy war 包 4.启动tomcat 听说mave ...

  9. 27. Remove Element@python

    Given an array nums and a value val, remove all instances of that value in-place and return the new ...

  10. 转 Keras 保存与加载网络模型

    https://blog.csdn.net/qq_28413479/article/details/77367665