A. Duff and Meat
来源:互联网 发布:java房卡麻将游戏源码 编辑:程序博客网 时间:2024/06/06 04:33
#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <algorithm>using namespace std;int a[100010];int p[100010];int main() {int n;cin >> n;memset(a, 0, sizeof(a));for (int i = 0; i<n; i++)cin >> a[i]>> p[i];int res = 0, min = p[0];for (int i = 0; i<n; i++) {if (p[i] < min)min = p[i];res += min*a[i];}cout << res<< endl;return 0;}
0 0
- A. Duff and Meat
- A. Duff and Meat
- 588A. Duff and Meat
- Codeforces#326-A - Duff and Meat-贪心
- Codeforces Round #326 A. Duff and Meat
- Codeforces 588 A. Duff and Meat
- CodeForces-588A Duff and Meat
- CodeForces 588A Duff and Meat 贪心
- Codeforces 558 A Duff and Meat
- codeforces 588 A Duff and Meat
- Codeforces 588A Duff and Meat 【dp】
- Codeforces 588.A Duff and Meat
- CodeForces 588A. Duff and Meat
- Duff and Meat
- coderforce 588A Duff and Meat(简单的贪心)
- Codeforces Round #326 (Div. 2) A. Duff and Meat
- Codeforces Round #326 (Div. 2) 588 A. Duff and Meat
- Code Forces 588 A. Duff and Meat(贪心)
- 大数据(1):RedHat虚拟机桥接
- 括号匹配检验
- 欢迎使用CSDN-markdown编辑器
- ictclas,ansj,结巴分词,StanfordNLP中文分词以及所用词性标注集
- 我为什么喜欢go语言
- A. Duff and Meat
- ajax上传form表单或者文件以及结合validate验证
- JEE行业命名规范
- java多进程中waitFor()的作用
- 如何解决Android sdk tool的下载不成功的问题
- ubuntu 安装jdk
- bzoj3892: [Usaco2014 Dec]Marathon
- 类之间互相引用
- git和github在ubuntu上的使用