Danganronpa 水题。
Danganronpa
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 304 Accepted Submission(s): 217
1. Each table will be prepared for a mysterious gift and an ordinary gift.
2. In order to reflect the Chisa Yukizome's generosity, the kinds of the ordinary gift on the adjacent table must be different.
3. There are no limits for the mysterious gift.
4. The gift must be placed continuously.
She wants to know how many students can get gifts in accordance with her idea at most (Suppose the number of students are infinite). As the most important people of her, you are easy to solve it, aren't you?
Each case contains one integer n. The next line contains n (1≤n≤10) numbers: a1,a2,...,an, (1≤ai≤100000).
2
3 2
比赛的时候水了一下, 就少了sum = 1的情况WA了。
代码:
#include<stdio.h>
#include<string.h>
#define N 110000
int main(void)
{
int sum, i, j, t, n;
int a[N];
j = 0;
scanf("%d", &t);
while(t--)
{
j++;
sum = 0;
scanf("%d", &n);
for(i = 0; i < n; i++)
{
scanf("%d", &a[i]);
sum += a[i];
}
if(sum == 1)
printf("Case #%d: 1\n", j);
else
printf("Case #%d: %d\n", j, sum / 2);
}
}
Danganronpa 水题。的更多相关文章
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ACM :漫漫上学路 -DP -水题
CSU 1772 漫漫上学路 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 154 Solved: 112[ ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
- gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,
1195: 相信我这是水题 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 821 Solved: 219 Description GDUT中有个风云人 ...
- BZOJ 1303 CQOI2009 中位数图 水题
1303: [CQOI2009]中位数图 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 2340 Solved: 1464[Submit][Statu ...
- 第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛 B - 大还是小? 字符串水题
B - 大还是小? Time Limit:5000MS Memory Limit:65535KB 64bit IO Format: Description 输入两个实数,判断第一个数大 ...
- ACM水题
ACM小白...非常费劲儿的学习中,我觉得目前我能做出来的都可以划分在水题的范围中...不断做,不断总结,随时更新 POJ: 1004 Financial Management 求平均值 杭电OJ: ...
- CF451C Predict Outcome of the Game 水题
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit ...
随机推荐
- load文件到hive,并保存
DataFrame usersDF = sqlContext.read().load("hdfs://spark1:9000/users.parquet"); usersDF.se ...
- NOIP复活了
众所周知,NOIP以一种奇葩而又不可避免的方式(CSP)复活了.
- 19徐州网络赛E 线段树加离散化
题目链接:https://nanti.jisuanke.com/t/41387 按wi的值建立权值线段树维护值为wi出现的最后位置,对于第i个人的答案,查询线段树[wi+m,max]区间的最大位置po ...
- Gitlab的介绍
什么是GitLab ?◆GitLab是一个开源分布式版本控制系统◆开发语言: Ruby◆功能:管理项目源代码.版本控制.代码复用与查找GitLab与GitHub的不同 ◆ Github分布式在线代码托 ...
- Excel大数据排查重复行内容方法,三步搞定!
首先第一步,我们找到一个空白列D输入公式“=A1&B1&C1”: 然后第二步,再选择下一空白列输入公式“=IF(COUNTIF(D:D,D1)>1,"重复", ...
- django restful 序列化
https://www.cnblogs.com/wt7018/p/11456440.html https://www.cnblogs.com/wt7018/p/11530962.html
- Java单体应用 - 开发工具 - 01.IntelliJ IDEA
原文地址:http://www.work100.net/training/monolithic-tools-intellij-idea.html 更多教程:光束云 - 免费课程 IntelliJ ID ...
- 「 深入浅出 」集合Set
系列文章 「 深入浅出 」集合List 「 深入浅出 」java集合Collection和Map Set继承自Collection接口,不能包含有重复元素.本篇文章主要讲Set中三个比较重要的实现类: ...
- 指定HTML标签属性 |Specifying HTML Attributes| 在视图中生成输出URL |高级路由特性 | 精通ASP-NET-MVC-5-弗瑞曼
结果呢: <a class="myCSSClass" href="/" id="myAnchorID">This is an o ...
- html恶搞之无限弹窗
啦啦啦啦啦 恶搞别人吗? 把下面代码做成html文件发给别人,用浏览器打开就可以看见效果了 <!DOCTYPE html> <html><head><meta ...