poj 2709 贪心 painter
来源:互联网 发布:台湾网络枪店 编辑:程序博客网 时间:2024/04/27 01:53
#include <iostream>#include <stdio.h>#include <algorithm>using namespace std;int main(){ int n; int gray,color[1001]; while(scanf("%d",&n)!=EOF) { if(n==0) break; for(int i=0;i<n;i++) scanf("%d",&color[i]); scanf("%d",&gray); sort(color,color+n); while(gray--) { color[0]++; color[1]++; color[2]++; sort(color,color+n); } sort(color,color+n); int max=color[n-1]; int ans=(max%50==0)? (max/50):(max/50+1); printf("%d\n",ans); } return 0;}
0 0
- POJ | 2709 Painter | 贪心
- POJ 2709 Painter 贪心
- poj 2709 贪心 painter
- poj 2709 Painter (贪心)
- POJ--2709:Painter (贪心)
- poj 2709 Painter(贪心)
- POJ-2709-Painter(贪心)
- POJ 2709 Painter 贪心详解
- poj 2709 Painter 坑爹贪心
- POJ—2709—Painter—【贪心】
- poj 2709 painter 贪心 2017.10.10 模拟赛
- POJ 2709 Painter
- poj 2709 Painter
- POJ 2709 Painter
- poj 2709 Painter
- poj 2709 Painter
- POJ 2709 painter
- poj 2709 - Painter
- openfire管理员向单点推送
- Linux内核驱动GPIO的使用
- Android 制作9.png图片
- MySQL 的数值数据类型
- java 排序算法(冒泡)
- poj 2709 贪心 painter
- googleMap 计算两个地址的距离
- 代码及UI价值观
- 关于DevicePolicyManager申请系统管理权限
- Windows下配置Git
- HLJU1043: 最大值最小化
- error LNK2019: 无法解析的外部符号 "wchar_t * _,该符号在函数中被引用
- Android中ProgressBar进度条
- hdu 4418 概率dp + gauss消元