ural1494 Monobilliards
Monobilliards
Memory limit: 64 MB
Input
Output
Samples
| input | output |
|---|---|
2 |
Not a proof |
3 |
Cheater |
Notes
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
#define mod 1000000007
#define inf 0x3f3f3f3f
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pi acos(-1.0)
const int maxn=1e5+;
const int dis[][]={{,},{-,},{,-},{,}};
using namespace std;
ll gcd(ll p,ll q){return q==?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=;while(q){if(q&)f=f*p;p=p*p;q>>=;}return f;}
int n,m,k,t,now;
bool flag;
priority_queue<int>a;
int main()
{
int i,j;
now=;
scanf("%d",&n);
while(n--)
{
scanf("%d",&j);
while(now<=j)a.push(now),now++;
if(a.top()!=j)flag=true;
else a.pop();
}
if(flag)puts("Cheater");
else puts("Not a proof");
//system("pause");
return ;
}
ural1494 Monobilliards的更多相关文章
- 1494. Monobilliards(栈)
1494 之前记得数据结构试卷上有这种题 就是判断某一出栈顺序 是不是满足以1.2...n为入栈顺序 a1,a2,a3..an; 对于任意相邻a[i],a[i+1] 如果a[i]>a[i+1]+ ...
- ural 1494 Monobilliards
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; ],b ...
随机推荐
- PAC全自动脚本代理
Proxy 极低成本绕过GFW的一个PAC代理 Download proxy.zip Proxy 轻量级的FQ工具,不需要安装客户端.可以设置系统代理,也可以设置浏览器代理或者配合SS等插件使用. 免 ...
- nginx php mysql 集成安装包
经过多次的苦苦寻找,终于找到一款 集成了nginx 和mysql php的包.只需一键安装即可. 且可以修改其中的nginx mysql 与php的版本. 解压此文件lnmp???ɰ?n-1.6p-5 ...
- utf8 文件 错误保存为gbk 中文乱码 解决方法
用zend studio 将utf-8 格式的文件 保存为 gbk 了,之后无论怎么装换 中文都是乱码 用 beyond compare(文件比较工具 对编码支持的比较强大) 打开,改下编码,中文就 ...
- Tomcat服务器顶层结构和启动过程【转】
号外:2016 最流行的是哪一种 Java 应用服务器呢? 通过从部署的 1240 个 JVM 中得到的数据,我们能够确定出现了 862 个容器供应商,或者说是占到了运行环境的 70% 左右.这些容器 ...
- icon大小
ldpi mdpi hdpi xhdpi xxhdpi
- Petit FatFs
FatFs is a generic FAT/exFAT file system module for small embedded systems. The FatFs module is writ ...
- IIS express 7.5 设置默认文档
在C:\Users\[电脑用户名]\Documents\IISExpress\config 下面有个applicationhost.config文件,打开文件找到<system.webServe ...
- Spring Boot 系列教程16-数据国际化
internationalization(i18n) 国际化(internationalization)是设计和制造容易适应不同区域要求的产品的一种方式. 它要求从产品中抽离所有地域语言,国家/地区和 ...
- jquery 左边分类+插件
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- java 对象的上转型对象(父类)
Example5_10.java class 类人猿 { void crySpeak(String s) { System.out.println(s); } } class People exten ...