ccf+在于枚举时h的巧妙
来源:互联网 发布:阿里云服务器攻击 编辑:程序博客网 时间:2024/06/04 23:11
点击打开链接
#include <iostream>#include <cstdio>#include <string>#include <vector>#include <deque>#include <list>using namespace std;int main(){ int n; vector<int> a; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; a.push_back(x); } int ans = 0; for (int i = 0; i < n; i++) { int h = a[i]; for (int j = i; j < n; j++) { if (a[j] < h) h = a[j]; int s = (j - i + 1) * h; if (ans < s) ans = s; } } cout << ans << endl; return 0;}
0 0
- ccf+在于枚举时h的巧妙
- NYOJ 蛇形填数在于循环的合理巧妙
- 枚举USB设备时,cfgmgr32.h(122)错误的解决
- MFC关于*.rc和resource.h文件的巧妙运用
- MFC关于*.rc和resource.h文件的巧妙运用
- MFC关于*.rc和resource.h文件的巧妙运用
- Poj 2549 Sumsets【巧妙枚举】
- break的巧妙时用
- ccf工资计算 暴力枚举
- 在于自己的心
- HDU 5735 Born Slippy【巧妙暴力枚举】
- 暴力枚举H
- 人的差异在于业余时间
- 成功的秘诀在于坚持
- 创新的实现在于年轻
- 幸福的真谛在于分享
- 唐骏的成功在于?
- 人生的成长在于总结
- 我的征途是星辰大海
- 建立高效人际关系的五大方法
- Military Phonetic Alphabet
- C文件
- c++ std::getline
- ccf+在于枚举时h的巧妙
- 从薪资800一路爬到月薪过万,全靠这6条
- WPF布局学习总结
- 条款24 若所有参数皆需类型转换,请为此采用non-member函数
- 【扫盲】什么是Redis
- JAVA虚拟机(4)笔记
- Dos命令初阶--文件拷贝
- 厌倦了工作,可以这样调整
- Django学习笔记第6记