#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. I - Agri-Net - poj 1258

    貌似就是个裸的最小生成树啊 ******************************************************************************* #inclu ...

  2. CSS里的 no-repeat 是什么意思

    CSS里的 no-repeat是针对背景图片来说的.当你设置了no-repeat这个属性后,你的背景图片将不会被重复,再换一种说法,你在网站上所看到的背景图片就是你所添加的图片, 不会出现平铺或者重复 ...

  3. rpm与dpkg yum与apt-get详解

    由于自由软体的蓬勃发展,加上大型Unix-Like 主机的强大效能,让很多软体开发者将他们的软体使用Tarball 来释出. 后来Linux 发展起来后,由一些企业或社群将这些软体收集起来制作成为di ...

  4. finally与return

    finally关键字:和try块使用,一般做资源释放操作,比如关闭流.关闭数据库连接,释放锁. return:用于返回值. finally块可保证一定执行,当逻辑处理有返回值时,会首先执行finall ...

  5. Demon_接金币(三个掉落物品预设体,一接物体的工具)

    接物体的工具 using UnityEngine; using System.Collections; public class Tool : MonoBehaviour { float hor; V ...

  6. [置顶] Hash查找,散列查找

    //Hash.h #ifndef HASH_H #define HASH_H #define HASH_ARR_SIZE 100 #define FILL -1 #include <stdlib ...

  7. [AngularJS] ngPluralize

    ngPluralize is a directive that displays messages according to en-US localization rules. <script& ...

  8. Android各种颜色dawable.xml中定义

    < drawable name="white">#FFFFFF< /drawable>< !--白 --> < drawable name ...

  9. TinyXml高速入门(一)

    作者:朱金灿 来源:http://blog.csdn.net/clever101 对于xml文件,眼下我的工作仅仅是集中在配置文件和作为简单的信息文件来用,因此我不太喜欢使用msxml这样的重量级的x ...

  10. honeywell D6110开发的一个工厂仓库追溯识别

    近日.接触并开发了一个用honeywell D6110 二维扫描PDA的项目,应用也比較简单. 就是货品物料编码.通过中间码相应,然后中间码再依照不同OEM品牌须要生成各种商品条码并带有流水号. 要求 ...