#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std; int a[],b[];
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
for(int i=; i<=n; i++)
scanf("%d",a+i);
int top=,top1=;
for(int i=; i<=n; i++)
{
b[++top]=i;
while(top&&b[top]==a[top1]){
top--;top1++;
}
}
if(top) printf("Cheater\n");
else printf("Not a proof\n");
}
return ;
}

ural 1494 Monobilliards的更多相关文章

  1. 1494. Monobilliards(栈)

    1494 之前记得数据结构试卷上有这种题 就是判断某一出栈顺序 是不是满足以1.2...n为入栈顺序 a1,a2,a3..an; 对于任意相邻a[i],a[i+1] 如果a[i]>a[i+1]+ ...

  2. 【BZOJ 1494】【NOI 2007】生成树计数

    http://www.lydsy.com/JudgeOnline/problem.php?id=1494 这道题..因为k很小,而且我们只关心连续的k个节点的连通性,所以把连续的k个点轮廓线上的连通性 ...

  3. 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome

    题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...

  4. ural 2071. Juice Cocktails

    2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...

  5. ural 2073. Log Files

    2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...

  6. ural 2070. Interesting Numbers

    2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...

  7. ural 2069. Hard Rock

    2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...

  8. ural 2068. Game of Nuts

    2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...

  9. ural 2067. Friends and Berries

    2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...

随机推荐

  1. Flask+Mysql搭建网站之数据库问题

    关于 SQLAlchemy (1.0.8) 和 Flask-SQLAlchemy (2.0) SQLALchemy 是Python语言的SQL工具包及对象关系映射(ORM)工具.Flask-SQLAL ...

  2. iOS--导航栏样式

    push返回按钮样式: UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBar ...

  3. 关于scanf的几种处理方法

    字符输入中,赋值顺序和缓存的联系 scanf是从标准输入缓冲区中读取输入的数据,假设连续输入两个%c格式的字符.而中间又要涉及回车,那么第二个字符将被赋予回车. 解决的方法: .清空输入缓冲区 第一个 ...

  4. 安装LVS安装LVS和配置LVS的工作比较繁杂

    安装LVS安装LVS和配置LVS的工作比较繁杂,读者在配置的过程中需要非常细心和耐心.在本节我们将对其进行详细地介绍.主要包括如下几个核心步骤:1.获取支持LVS的内核源代码如果读者需要使用LVS,需 ...

  5. 使用Intent实现Activity的隐式跳转

    相比于显式Intent,隐式Intent 则含蓄了许多,它并不明确指出我们想要启动哪一个活动,而是指定了一系列更为抽象的action 和category 等信息,然后交由系统去分析这个Intent,并 ...

  6. linux命令之partprobe

    使用fdisk工具只是将分区信息写入到磁盘,如果需要使用mkfs格式化并使用分区,则需要重新启动系统.partprobe 是一个可以修改kernel中分区表的工具,可以使kernel重新读取分区表而不 ...

  7. 在Linux系统安装VMware Tools

    --Install VMware Tools --复制VMware Tools-xxx.tar.gz到根目录 cd /tar -vzxf VMware Tools-xxx.tar.gzcd vmwar ...

  8. spring05配置文件之间的关系

    一:配置文件包含关系 1.创建对应的实体类 public class Student { //学生实体类 private String name; //姓名 private Integer age; ...

  9. 进阶C#?

    玩了几年的编程了,大四了.本来不想考研,我老师找我谈几次,最近准备考研.从一开始玩java,接触.net中的C#,aps.net,到接触linux,太多太多了. 本来我们专业不是纯计算机的,但是和计算 ...

  10. 搭建maven项目简介

    http://jingyan.baidu.com/album/9f7e7ec0b714ae6f29155465.html?picindex=1 Maven学习 (一) 搭建Maven环境 http:/ ...