随笔分类 - 水题
摘要:#include#include#include#includeusing namespace std;int bowl,plate;int n;int dish[1100];int main(){ int i,j; while(scanf("%d%d%d",&n,&bowl,&plat...
阅读全文
摘要:#includeint main(){ //int a[5]={1,2,4,7,15}; int a[5]; a[0]=1;a[1]=2;a[2]=4;a[3]=7;a[4]=15; int num,i; while(scanf("%d",&num)!=EOF) { for(i=4...
阅读全文
摘要:DescriptionThe summer training of ZJU ICPC in July is about to end. To celebrate this great and happy day, the coaches of ZJU ICPC TeamNaviandFancydec...
阅读全文
摘要:DescriptionConsider a football tournament wherenteams participate. Each team has two football kits: for home games, and for away games. The kit for ho...
阅读全文
摘要:DescriptionThe Saratov State University Olympiad Programmers Training Center (SSU OPTC) hasnstudents. For each student you know the number of times he...
阅读全文
摘要:C -Count 101Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 3485DescriptionYou know YaoYao is fond of his ch...
阅读全文
摘要:Revenge of Segment TreeTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 845Accepted Submission(s): ...
阅读全文
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=1106思路:虽然题目很水但是细节有点坑 输入一个字符串 标记起始下标和结束下标 从左向右枚举 当碰到‘5’ 或者到达结束下标又不是‘5’时 向左把当前表示的数求出 其中要注意 1。当起始位有多个‘5’ 时 要...
阅读全文
摘要:题意:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3600思路:注意精度向上进位#include#include#include#include#include#includeusing namespace std;int...
阅读全文
摘要:题意:有一个序列 要组成多个子序列 每个子序列必须单调递增 问最少组成多少个子序列思路1: 因为严格递增 所以每个数只能在一个子序列中出现一次 出现次数最多的数的次数就是答案 运用 upper_bound(a,a+n,a[i])-lower_bound(a,a+n,a[i]) 求出 (由于数据较水 ...
阅读全文
摘要:题意:有n个人 m对关系 如果两个人之间有不少于k个好友的话就会成为朋友 问 长此以往会有多少对新关系形成思路:一直暴力到没有新关系为止#include #include #include #include using namespace std;const int maxn = 100 + 1;b...
阅读全文
摘要:题意:n个人围成一个圈 从中选择连续的m个人 求他们的最大和思路:直接暴力枚举 注意取模 if(j>n) temp%=n;#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,s...
阅读全文
摘要:思路: lcm=a*b/gcd(a,b)#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,sizeof(a))#define ll __int64#define MAXN 1000#...
阅读全文
摘要:B - 报数游戏Time Limit:1000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionn个人站成一行玩一个报数游戏。所有人从左到右编号为1到n。游戏开始时,最左边的人报1,...
阅读全文
摘要:A - 一二三Time Limit:1000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64uSubmitStatusDescription你弟弟刚刚学会写英语的一(one)、二(two)和三(three)。他在纸上写了好些一二...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2015水题啦 直接贴代码#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,sizeof(a))#...
阅读全文
摘要:http://acm.fzu.edu.cn/problem.php?pid=2168Description部队中共有N个士兵,每个士兵有各自的能力指数Xi,在一次演练中,指挥部确定了M个需要防守的地点,按重要程度从低到高排序,依次以数字1到M标注每个地点的重要程度,指挥部将选择M个士兵依次进入指定地...
阅读全文
摘要:第一篇 先水一题吧Problem Description 大师兄在取得真经后,每天详读经书,认真完成读书笔记,理论联系实际,不断提高实践能力。假设大师兄开始修炼的第一天是星期一,至今已经修炼了N天,那么有多少天是星期六或者星期日,大师兄还在修炼呢?Input 每组输入数据包含一个整数N(0#in...
阅读全文

浙公网安备 33010602011771号