#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. 对于AttributeError: 'Flask' object has no attribute 'cli'的解决办法

    版权声明:本文为博主原创文章,未经博主允许不得转载. 环境flask-script2.0.5.flask0.10.1 运行官方文档sample 出现问题 c:\kk\flask\examples\fl ...

  2. springmvc对jsonp的支持

    在与前端开发人员合作过程中,经常遇到跨域名访问的问题,通常我们是通过jsonp调用方式来解决.jsop百科:http://baike.baidu.com/link?url=JKlwoETqx2uuKe ...

  3. Android 开发经验

    学习社区 eoe移动开发者社区 (link) 链接:http://www.eoeandroid.com/ 环境配置 Cocos2d-x 3.x 全平台新手开发配置教程 链接:http://www.co ...

  4. ViewPager的setOnPageChangeListener方法详解

    http://www.eoeandroid.com/forum.php?mod=viewthread&tid=548173 ViewPage使用时,最关键的代码就是setOnPageChang ...

  5. Android手机令牌教程

    Android手机令牌教程 "沉下心,你不再是小孩子了.多看书,学做人"-JeffLi告诉自己 Written In The Font 花了一个天一夜,搞了这个小东西-安卓手机令牌 ...

  6. ios 中如何应对UIScrollView快速滑动(暴力用户,暴力测试)

    1.实现UIScrollViewDelegate 开始滑动: - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView 滑动 ...

  7. C#中的序列化与反序列化

    眼看XX鸟的课程关于C#的知识点就要学完了,翻看网络中流传的教程还是发现了一个课程中没有讲到的知识点:序列化与反序列化 无奈还是了解一下并操作一番,以备后用吧 介绍:就是将对象信息转化为二进制信息以便 ...

  8. hdu 1022

    // hdu1022 这题算是我做的第一道栈的题目,之前看过栈的一些内容,做这道题的时候,可以模拟出过程,但是具体的代码不会写...所以决定练习一些栈和队列的问题,大概思路就是有三个数组和一个栈,先把 ...

  9. Namespace declaration statement has to be the very first

    Namespace declaration statement has to be the very first statement in the script 我新建了一个Homea模块,并把Hom ...

  10. (转)Discuz!NT图文安装教程

    不同目录下的安装方法根据目前大家对论坛的使用需求,在安装上面大致有三种情况,站点根目录下安装,站点虚拟目录下安装和站点子目录下安装. 1.根目录安装 根目录安装是最简单也是稳定系数最高的安装和使用方式 ...