| 比赛 | 20160707 | 评测结果 | C |
|---|---|---|---|
| 题目名称 | 砍树 | 最终得分 | 0 |
| 用户昵称 | 瑆の時間~無盡輪迴·林蔭 | 运行时间 | 0.000 s |
| 代码语言 | C++ | 内存使用 | 0.00 MiB |
| 提交时间 | 2016-07-07 16:24:32 | ||
#include<iostream>
using namespace std;
int main()
{
int m,n;
int a[n];
cin>>n>>m;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int s=0,h;
for(h=0;h>a[n];h++)
{
for(int e=0;e<n;e++)
{
if(a[e]>h)
{
s=s+a[e]-h;
}
}
if(s=m)
{
break;
}
h++;
}
cout<<h;
return 0;
}