April Fools Contest 2018
这个比赛不正经,但是我可以一本正经的写代码啊
2 seconds
64 megabytes
standard input
standard output
The input contains a single integer a (10 ≤ a ≤ 999).
Output 0 or 1.
13
1
927
1
48
0
蛇皮,题目什么都没,0和1,反正是A,猜奇偶吧
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
cout<<(n&);
return ;
}
1 second
256 megabytes
standard input
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?
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.
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就直接阅读理解了么,这个脑洞大,让我组合的应该,不做这个
1 second
256 megabytes
standard input
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.
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 "YES" if the array can be sorted using the described procedure and "NO" if it can not.
3
1 2 3
YES
3
3 1 2
NO
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的更多相关文章
- 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 ...
- Codeforces April Fools Contest 2017
都是神题,我一题都不会,全程听学长题解打代码,我代码巨丑就不贴了 题解见巨神博客 假装自己没有做过这套
- April Fools Contest 2017 题解
趁着上课无聊,来补一补-- A. Numbers Joke 直接oeis就好了:http://oeis.org/search?q=numbers+joke&language=english&a ...
- April Fools Contest 2017 F
Description You are developing a new feature for the website which sells airline tickets: being able ...
- April Fools Contest 2017 E
Description Input The input consists of four lines, each line containing a single digit 0 or 1. Outp ...
- April Fools Contest 2017 D
Description Input The only line of the input contains a string of digits. The length of the string i ...
- April Fools Contest 2017 C
Description DO YOU EXPECT ME TO FIND THIS OUT? WHAT BASE AND/XOR LANGUAGE INCLUDES string? DON'T BYT ...
- April Fools Contest 2017 B
Description Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it? Input The i ...
- April Fools Contest 2017 A
Description Input The input contains a single integer a (1 ≤ a ≤ 30). Output Output a single integer ...
随机推荐
- mac不限速下载百度网盘
本文转载自:https://blog.csdn.net/u010837612/article/details/80029212 相信大家都比较困惑,百度网盘客户端限速后一般只有几十K的下载速度,Win ...
- 命令方式重新签名apk
1.(每个指令之间要有一个空格) 注:拿到一个apk后,首先删除META-INF. 1.如果你的电脑装的是jdk1.6,就用下面的命令: 打开命令符,首先直接输入: Jarsigner -keysto ...
- POJ 3017 Cut the Sequence (单调队列优化DP)
题意: 给定含有n个元素的数列a,要求将其划分为若干个连续子序列,使得每个序列的元素之和小于等于m,问最小化所有序列中的最大元素之和为多少?(n<=105.例:n=8, m=17,8个数分别为2 ...
- SDUT 1309 不老的传说问题 (区间DP)
题意: 有一个环形序列,n个数字表示一种颜色,要求将白板环刷成一模一样的环,限制是每次最多只能刷连续的K个位置,问最少需要刷几次? 思路: 跟2008长春那道painter string 差不多.只是 ...
- 【Python图像特征的音乐序列生成】第一阶段的任务分配
从即日起到7月20号,项目成员进行了第一次任务分配. 赵同学A.岳同学.周同学,负责了图像数据的情感数据集制作,他们根据自己的经验,对图像进行了情绪提取. 赵同学B全权负责向量映射这一块的网络搭建. ...
- 【转载】UWP应用设置和文件设置:科普
数据有两个基本的分类,应用数据和用户数据,而用户数据则为由用户拥有的数据,如文档,音乐或电子邮件等,下面将大致的介绍一下应用数据的基本操作. 应用数据:应用数据包含APP的状态信息(如运行时状态,用户 ...
- Netweaver和CloudFoundry的服务器日志
Netweaver 事务码SMICM,Goto->HTTP Plug-In->Server Logs: CloudFoundry 假设我部署本地应用到CloudFoundry之后,应用的状 ...
- Android(java)学习笔记107:Relativelayout相对布局
1. Relativelayout相对布局案例: 我们看看案例代码,自己心领神会: <?xml version="1.0" encoding="utf-8" ...
- js原型,原型链的理解
1.所有引用类型(函数.数组.对象)都拥有_proto_属性(隐式原型) 2.所有函数拥有prototype属性(显式原型)(仅限函数) 3.原型对象:拥有prototype属性的对象,在定义函数时就 ...
- oc 数据类型转换
NSNumber转NSString: 假设现有一NSNumber的变量A,要转换成NSString类型的B 方法如下: NSNumberFormatter* numberFormatter = [[N ...