CF 272 C. Dima and Staircase
来源:互联网 发布:英雄无敌3修改兵种数据 编辑:程序博客网 时间:2024/05/22 02:09
简单大水题,胡乱比较就可以:
#include<iostream>#include<cstdio>#include<algorithm>using namespace std;typedef long long ll;const int maxn=100002;ll h[maxn],hi,wi,mx;int n,m;int main(){ //freopen("D://input.txt","r",stdin); while(scanf("%d",&n)!=EOF){int i,j;for(mx=i=0;i<n;i++)cin>>h[i+1];scanf("%d",&m);while(m--){ cin>>wi>>hi;mx=max(mx,h[wi]);cout<<mx<<endl;mx=mx+hi;}}return 0;}
- CF 272 C. Dima and Staircase
- CF 272C Dima and Staircase(水题)
- codeforces 272C. Dima and Staircase(线段树)
- Codeforces 272C Dima and Staircase 思维 or 线段树
- Codeforces 272C Dima and Staircase【线段树】
- Codeforces 272C Dima and Staircase 线段树区间覆盖,最值查询
- Codeforces 272C Dima and Staircase (线段树区间更新 或 线性扫)
- CodeForces 272C-Dima and Staircase-线段树区间更新-RMQ
- CODEFORCES 272C Dima and Staircase <细节理解题+简单技巧>
- CodeForces - 272C Dima and Staircase (线段树区间更新)
- CF 273C C. Dima and Horses
- CF round167 Div1 C Dima and Horses
- cf-366C-Dima and Salad
- CF 366 C. Dima and Salad
- CF272C Dima and Staircase(线段树/贪心)
- CF 272B. Dima and Sequence
- CF 272 A. Dima and Friends
- CF 272 B. Dima and Sequence
- Sqlite
- Ubuntu下构建gstreamer开发环境
- MyEclipse8.6安装svn(非link方式)(插件安装)
- Cannot complete the install because one or more required items could not be found
- Stunnel使用详解
- CF 272 C. Dima and Staircase
- Java实现对ftp的读写文件(apache.commons.net.ftp)
- MVC学习二:MVC Action Result 返回类型扩展
- 英文词根
- Hadoop distcp拷贝
- 大型高性能网站的十项规则
- qt 嵌入 arm ,mips 得到与修改 系统时间
- 遭遇11gR2 bug:kewastUnPackStats(): bad magic 1
- yum错误:Cannot retrieve repository metadata (repomd.xml) for repository