Problem : 2535 ( Vote ) Judge Status : AcceptedRunId : 6068434 Language : G++ Author : qq1203456195Code Render Status : Rendered By HDOJ G++ Code Render Version 0.01 Beta
1 #include <cstdio>
2 #include <algorithm>
3 #include <iostream>
4 using namespace std;
5 int main()
6 {
7 int n,tn,v,i,c[
110];
8 while (scanf(
"%d",&
n),n)
9 {
10 tn=((n>>
1)+
1);
//需要的洲
11 for (i=
0;i<n;i++
)
12 scanf(
"%d",&
c[i]);
13 sort(c,c+
n);
14 v=
0;
15 for (i=
0;i<tn;i++)
//需要的人
16 v+=((c[i]>>
1)+
1);
17 printf(
"%d\n",v);
18 }
19 return 0;
20 }
转载于:https://www.cnblogs.com/CheeseZH/archive/2012/06/15/2550522.html
相关资源:数据结构—成绩单生成器
转载请注明原文地址: https://win8.8miu.com/read-1494652.html