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

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. Jenkins任务失败,发送邮件通知

    1.进入系统管理->系统设置,然后进行下面设置: 2.配置管理员邮件账号,需要和后面的邮件发送者一致.否则可能会发送不成功 3.配置基础的邮件发送的配置 4.配置邮件扩展配置--用来自定义邮件格 ...

  2. jsp另外五大内置对象之-out获取缓冲区大小

    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding= ...

  3. HDU 4507 吉哥系列故事——恨7不成妻 (数位DP)

    题意: 如果一个整数符合下面3个条件之一,那么我们就说这个整数和7有关: 1.整数中某一位是7: 2.整数的每一位加起来的和是7的整数倍: 3.这个整数是7的整数倍: 给定一个区间[L,R],问在此区 ...

  4. HDU 1847 Good Luck in CET-4 Everybody! 四级好运!(博弈)

    思路:先用P/N状态来找规律. N状态:1 2 4 6 8 16 P状态:3 5 因为3=1+2, 无论拿1或者2皆输.看看5,只要抽掉2就变成了3,所以是N状态.看看6,可以抽掉1 2 4,若抽1, ...

  5. 卓越管理的实践技巧(3)推动团队管理的要点 Facilitation Essentials for Managers

    Facilitation Essentials for Managers 前文卓越管理的秘密(Behind Closed Doors)最后一部分提到了总结的13条卓越管理的实践技巧并列出了所有实践技巧 ...

  6. Unity调用Windows窗口句柄,选择文件和目录

    T:2019-6-25 10:06:59 C:Scatt Kang using System; using System.Collections; using System.Collections.G ...

  7. “CTL_CODE”未定义

    C4013 “CTL_CODE”未定义:假设外部返回 int 要加入 #include<winioctl.h> 并且要放在#include<windows.h>的后面

  8. 在线聊天项目1.4版 使用Gson方法解析Json字符串以便重构request和response的各种请求和响应 解决聊天不畅问题 Gson包下载地址

    在线聊天项目结构图: 多用户登陆效果图: 多用户聊天效果图: 数据库效果图: 重新构建了Server类,使用了Gson方法,通过解析Json字符串,增加Info类,简化判断过程. Server类代码如 ...

  9. stringByAppendingString和stringByAppendingPathComponent

    NSString提供了两个拼串的方法: /** * @brief 简单的字符串拼接,头文件 NSString (NSStringExtensionMethods) * * @param aString ...

  10. d3.js--03(增删改查)

    选择元素 d3.select():是选择所有指定元素的第一个 d3.selectAll():是选择指定元素的全部 插入元素 append():在选择集末尾插入元素 insert():在选择集前面插入元 ...