11729 - Command.o W.ar
来源:互联网 发布:交通事故2015数据统计 编辑:程序博客网 时间:2024/05/24 07:01
题目地址:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2829
#include<iostream>#include<algorithm>#include<vector>#include<cstdio>using namespace std;struct Job{int b,j;bool operator<(const Job &x)const{return j>x.j;}};int main(void){int n,b,j,ans=0,account=0,count=1;while(scanf("%d",&n)==1&&n){ans=account=0;vector<Job> soldier;for(int i=0;i<n;i++){cin>>b>>j;soldier.push_back((Job){b,j});}sort(soldier.begin(),soldier.end());for(int i=0;i<n;i++){account+=soldier[i].b;ans=max(account+soldier[i].j,ans);}printf("Case %d: %d\n",count++,ans);}return 0;}
0 0
- 11729 - Command.o W.ar
- linux/unix command : w
- 20-lines AR in OpenCV [w/code]
- Large File Viewer w/o OCX
- sed -e 's/\(.*\)\.\w/\1.o/'
- 多重背包 O(W * sigma(logCi)) 算法
- 多重背包问题的三种复杂度解法,O(n * w * c)、O(n*w*log c)和O(n * w)。
- AR
- AR
- AR
- AR
- ar
- ar
- [LeetCode] Permutations (Find all permutations of a integer array w/ or w/o duplicates)
- 【小熊刷题】reverse words in a string w. or w/o. allocating extra space
- Wi n d o w s的内存结构
- 常用的Wi n d o w s消息
- 2.8.4 Wi n d o w s字符串函数
- frame.center和bounds
- 2017从CSDN开始
- git+maven+nexus实现测试机自动发布项目
- java多线程实现三个字母顺序输出
- 内存学习(二)深拷贝,浅拷贝,完全拷贝
- 11729 - Command.o W.ar
- 完美的素数 (sdut oj)
- Captive Portal - 连接WiFi自动弹出认证页面
- Java遍历方法
- hdu 1671 Phone List(字典树)
- 两个链表的第一个公共结点
- 算法竞赛入门经典 第二版 习题4-8 特别困的学生 Extraordinarily Tired Students uva12108
- 软件测试的各个阶段
- ZooKeeper的:Curator框架应用