Codeforces 463B Caisa and Pylons(水题)
来源:互联网 发布:网络监控系统示意图 编辑:程序博客网 时间:2024/06/03 21:32
题目链接:Codeforces 463E Caisa and Pylons
题目大意:给定n个位置的高度,0的位置为0,每次移动一步时,需要消耗hi−hi+1的能量,一开始能量为0,过程中能量不能为负,一美元可以买一点能量,问说最小开销。
解题思路:水题,找最大值即可。
#include <cstdio>#include <cstring>#include <algorithm>using namespace std;int main () { int n, x, ans = 0; scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &x); ans = max(ans, x); } printf("%d\n", ans); return 0;}
0 0
- Codeforces 463B Caisa and Pylons(水题)
- codeforces-#463B. Caisa and Pylons
- codeforces 463 B Caisa and Pylons
- Codeforces 463B Caisa and Pylons【二分】
- codeforces 463B Caisa and Pylons
- 【CODEFORCES】 B. Caisa and Pylons
- 463B. Caisa and Pylons
- Codeforces Round #264 (Div. 2) 463B Caisa and Pylons
- codeforces B#264. Caisa and Pylons
- B. Caisa and Pylons
- Codeforces Round #264 (div2)B. Caisa and Pylons
- Codeforces Round #264 (Div. 2) B. Caisa and Pylons
- Codeforces Round #264 (Div. 2)-B. Caisa and Pylons
- Codeforce 264 B Caisa and Pylons(模拟)
- Caisa and Pylons
- Codeforces 463A Caisa and Sugar(水题)
- codeforces-#463A. Caisa and Sugar
- Codeforces 463E Caisa and Tree(暴力)
- 播布客里小布老师的全部视频收集
- Android调用系统相机、自定义相机、处理大图片
- wamp5配置问题
- HNU 12946 Sort Me
- XDOJ1270 - Rectangle Counting
- Codeforces 463B Caisa and Pylons(水题)
- Linux下ARM开发环境搭建
- spring ioc原理(看完后大家可以自己写一个spring)
- Android 探秘对话框
- MDCC智能硬件征集关键词:智能家居、机器人、健康生活
- Text-overflow,text-align,text-transform,text-decoration,text-shadow,text-fill-color,text-stroke的属性
- wikioi 1043 双向dfs
- quick-cocos2dx在mac下打不开player
- 设计模式总结: