A - A CodeForces - 478A 注意点: 和为0时要特判一下. 代码: #include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e; cin>>a>>b>>c>>d>>e; int sum=0; sum=a+b+c+d+e; if(sum==0) { cout<<-1<<endl; } else { if(sum…
D - D CodeForces - 743A Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds: the question Vladik face now is to find the cheapest way to get to the olympiad. V…
D - Drinks Choosing Old timers of Summer Informatics School can remember previous camps in which each student was given a drink of his choice on the vechorka (late-evening meal). Or may be the story was more complicated? There are nn students living…
B - A Tide of Riverscape 题意:给出一组字符串,由'0','1',' . '组成,' . '可以换成 0或1,判断第 i 个和第 i+p 个字符是否可以不相等,如果可以则输出满足条件的字符串 题解:先把所有的' . '换成0或1,在判断 i 和i+p 以及i 和 i-p 是否一样,一样则把原来的' . '换成相反的1 或0 ,最后判断是否有一组周期为p的点不同 #include<bits/stdc++.h> using namespace std; int main(…
A - Marks CodeForces - 152A 题意:给出一个学生人数n,每个学生的m个学科成绩(成绩从1到9)没有空格排列给出.在每科中都有成绩最好的人或者并列,求出最好成绩的人数 思路:求每列成绩中最大的数的个数.求出每列成绩中的最大值,遍历每列的各行若值与最大值一样就用另一个数组标记出来,最后遍历标记数组记录下总个数,即为最终结果. 代码: #include<bits/stdc++.h> using namespace std; int main() { int n,m; cin…
B - B Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters. Let A be a set of positions in the string. Let's call it pretty if following conditions are met: lett…
今天第一场个人训练赛的题目有点恐怖啊,我看了半个小时多硬是一道都不会写.我干脆就直接补题去了.... 先补的都是简单题,难题等我这周末慢慢来吧... A Calandar Time Limit: 1 Second Memory Limit: 65536 KB http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4113 题目意思很明确:给出一个日期和对应的星期几,求出另一个所给的日期是星期几. 题目已经简化了,12个…
2018 HDU多校第三场赛后补题 从易到难来写吧,其中题意有些直接摘了Claris的,数据范围是就不标了. 如果需要可以去hdu题库里找.题号是6319 - 6331. L. Visual Cube 题意: 在画布上画一个三维立方体. 题解: 模拟即可. 代码: #include <bits/stdc++.h> using namespace std; int a, b, c, R, C; char g[505][505]; int main () { int T; cin >>…