上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 66 下一页
摘要: Description夏令营有N个人,每个人的力气为M(i)。请大家从这N个人中选出若干人,如果这些人可以分成两组且两组力气之和完全相等,则称为一个合法的选法,问有多少种合法的选法?Input第一行一个整数N,表示人数。 接下来N行,每行一个整数M(i)Ou... 阅读全文
posted @ 2018-08-07 18:56 Monster_Qi 阅读(196) 评论(0) 推荐(0) 编辑
摘要: T1 Description给定一个n个点m条边的有向图,有k个标记点,要求从规定的起点按任意顺序经过所有标记点到达规定的终点,问最短的距离是多少。Input第一行5个整数n、m、k、s、t,表示点个数、边条数、标记点个数、起点编号、终点编号。接下来m行每... 阅读全文
posted @ 2018-08-06 18:57 Monster_Qi 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 题目描述现有n个砝码,重量分别为a1,a2,a3,……,an,在去掉m个砝码后,问最多能称量出多少不同的重量(不包括0)。输入输出格式输入格式: 输入文件weight.in的第1行为有两个整数n和m,用空格分隔第2行有n个正整数a1,a2,a3,……,an,... 阅读全文
posted @ 2018-08-05 20:31 Monster_Qi 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 5 Sec Memory Limit: 128 MB Submit: 387 Solved: 206 [Submit][Status][Discuss] Description农夫约翰的N(2 #include#include#i... 阅读全文
posted @ 2018-08-04 18:51 Monster_Qi 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 传送门解题思路正解好像是什么前缀和+二分,没想到。。就写了个线段树骗分,结果擦着边过了??线段树中维护一个区间和 and 最小值即可。代码#include#include#include#includeusing namespace std;const in... 阅读全文
posted @ 2018-08-03 09:18 Monster_Qi 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 传送门解题思路博弈论,发现每一行只有1#include#include#includeusing namespace std;inline int rd(){ int x=0,f=1;char ch=getchar(); while(!isdig... 阅读全文
posted @ 2018-08-01 18:06 Monster_Qi 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 题目描述Farmer John’s cows like to play coin games so FJ has invented with a new two-player coin game called Xoinc for them.Initially... 阅读全文
posted @ 2018-08-01 16:16 Monster_Qi 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19390 Accepted: 5224 DescriptionIn order to make their son... 阅读全文
posted @ 2018-07-29 19:12 Monster_Qi 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目描述Farmer John and his herd are playing frisbee. Bessie throws thefrisbee down the field, but it’s going straight to Mark the fi... 阅读全文
posted @ 2018-07-29 19:06 Monster_Qi 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 传送门解题思路这道题刚了一下午,主要就刚在set那里了。先写了一个暴力70分。。之后优化预处理,看着大佬神犇们都用的什么双向链表之类的东西,本蒟蒻不会,又懒得手写平衡树,就拿了个set搞了搞,感觉做麻烦了,我开了两个set,一个存正数一个存负数。因为STL只... 阅读全文
posted @ 2018-07-28 18:42 Monster_Qi 阅读(132) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 66 下一页