【bzoj1113】[Poi2008]海报PLA
来源:互联网 发布:淘宝掌柜热卖标签 编辑:程序博客网 时间:2024/04/29 23:46
#include<iostream>#include<cstdio>#include<stack>using namespace std;int n,a,ans;stack<int> s;inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x*=10;x+=ch-'0';ch=getchar();} return x*f;}int main(){n=read();for(int i=1;i<=n;i++){a=read();a=read();while(!s.empty()&&a<=s.top()){if(a==s.top())ans++;s.pop();}s.push(a);}printf("%d",n-ans);return 0;}
0 0
- 【bzoj1113】[Poi2008]海报PLA
- bzoj1113[Poi2008]海报PLA
- bzoj1113【poi2008】海报PLA
- 【Poi2008】【BZOJ1113】海报PLA
- bzoj1113: [Poi2008]海报PLA
- 【bzoj1113】 [Poi2008]海报PLA
- bzoj1113 [Poi2008]海报PLA
- Bzoj1113:[Poi2008]海报PLA:贪心+单调栈
- [BZOJ1113][Poi2008]海报PLA(单调栈)
- bzoj1113[Poi2008]海报PLA 单调栈
- [bzoj1113][POI2008]海报PLA(单调栈)
- bzoj1113 [Poi2008]海报PLA(单调栈)
- BZOJ1113 海报PLA
- 【单调栈】【bzoj1113】海报PLA
- 1113: [Poi2008]海报PLA
- POI2008 pla(poster)海报
- 1113: [Poi2008]海报PLA
- 【BZOJ 1113】 [Poi2008]海报PLA
- struts2之constant归纳
- PageView初始化时调用scrollToPage(x)显示不正确
- Android framework/base/core/res 中添加资源文件编译
- 020模式我们应该如何对待
- 重新发现Oracle太美之如何重新安装sqlplus help?
- 【bzoj1113】[Poi2008]海报PLA
- 一些有趣的网站
- 11.4.2
- IOS Notification 通知中心
- POJ 2446Chessboard(二分图最大匹配)
- Java中配置文件
- 代理模式
- java的软引用可以搞定oom问题 listview加载bitmap
- MFC问题集锦