
模拟 | 规律
文章平均质量分 72
YOONGI
这个作者很懒,什么都没留下…
展开
-
小数数字 HihoCoder - 1720
小数数字 HihoCoder - 1720 给定一个真分数P/Q(P < Q),请你求出它的小数部分都包括0~9中的哪些数字。 例如1/2=0.5,只包含数字5;1/3=0.33333……,只包含数字3,1/7=0.142857142857……,包含数字124578。Input两个整数P和Q,1 ≤ P < Q ≤ 1000000Output从小到大输出小数部分出现的所有数字Samp...原创 2018-04-11 19:17:58 · 416 阅读 · 0 评论 -
HDU-6667 Roundgod and Milk Tea (Hall’s Marriage Theorem定理)
Roundgod and Milk Tea题目链接:http://acm.hdu.edu.cn/listproblem.php?vol=57题目大意:有n个班,每个班有ai个人,bi杯奶茶,每个人不能和自己班做的奶茶且每人最多喝一杯,问最多有多少人可以喝到奶茶。思路:从1班开始喝n班的茶,如果bj的茶被喝完了,ai班还有人没喝,ans+=bj; j--; 如果ai班的人都喝过了i+...原创 2019-08-14 17:48:45 · 960 阅读 · 11 评论 -
ZOJ - 3736 Pocket Cube (模拟暴搜)
Pocket CubePocket Cube is a 3-D combination puzzle. It is a 2 × 2 × 2 cube, which means it is constructed by 8 mini-cubes. For a combination of 2 × 2 mini-cubes which sharing a whole cube face, y...原创 2019-08-02 09:43:30 · 187 阅读 · 0 评论 -
CodeForces - 916B Jamie and Binary Sequence (changed after round) (思维+模拟)
Jamie and Binary Sequence (changed after round)Jamie is preparing a Codeforces round. He has got an idea for a problem, but does not know how to solve it. Help him write a solution to the following ...原创 2019-08-05 10:16:43 · 367 阅读 · 1 评论 -
CodeForces - 721D Maxim and Array (贪心思维+模拟)
Maxim and ArrayRecently Maxim has found an array ofnintegers, needed by no one. He immediately come up with idea of changing it: he invented positive integerxand decided to add or subtract it...原创 2019-08-03 11:02:09 · 175 阅读 · 0 评论 -
NYOJ 超级台阶
超级台阶题目描述:有一楼梯共m级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第m级,共有多少走法?注:规定从一级到一级有0种走法。输入描述:输入数据首先包含一个整数n(1<=n<=100),表示测试实例的个数,然后是n行数据,每行包含一个整数m,(1<=m<=40), 表示楼梯的级数。输出描述:对于每个测试实例,请输出...原创 2018-05-18 09:52:50 · 147 阅读 · 0 评论 -
ZOJ - 3939 The Lucky Week (规律)
The Lucky Week题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3939Edward, the headmaster of the Marjar University, is very busy every day and always forgets the date.There was ...原创 2019-04-09 10:58:09 · 149 阅读 · 0 评论 -
CodeForces - 950C Zebras (模拟)
ZebrasOleg writes down the history of the days he lived. For each day he decides if it was good or bad. Oleg calls a non-empty sequence of days azebra, if it starts with a bad day, ends with a bad...原创 2019-04-08 16:15:36 · 174 阅读 · 0 评论 -
CodeForces - 832B Petya and Exam (模拟)
Petya and ExamIt's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help ...原创 2019-04-05 09:32:50 · 222 阅读 · 0 评论 -
Next Mayor Aizu - 1159
Next Mayor Aizu - 1159 Problem A:One of the oddest traditions of the town of Gameston may be that even the town mayor of the next term is chosen according to the result of a game. When...原创 2018-05-23 09:53:44 · 145 阅读 · 0 评论 -
Anton and currency you all know
Anton and currency you all knowBerland, 2016. The exchange rate of currency you all know against the burle has increased so much that to simplify the calculations, its fractional part was neglected an...原创 2018-03-30 20:56:22 · 347 阅读 · 0 评论 -
循环数组 HihoCoder - 1704
循环数组 HihoCoder - 1704 给定包含N个整数的数组A1, A2, ... AN,你可以选择任意一个Ai,将Ai旋转到数组第一项,即将数组变成:Ai, Ai+1, Ai+2, ... AN, A1, A2, ..., Ai-1 现在小Hi希望旋转之后的数组满足:对于任意K(1 ≤ i ≤ N),前K项的和都是正数。 例如对于A=[3, -5, 2, -2, 3, 0],旋转成[3...原创 2018-03-30 20:59:32 · 198 阅读 · 0 评论 -
字符串排序 HihoCoder - 1712
字符串排序 HihoCoder - 1712 一般我们在对字符串排序时,都会按照字典序排序。当字符串只包含小写字母时,相当于按字母表"abcdefghijklmnopqrstuvwxyz"的顺序排序。 现在我们打乱字母表的顺序,得到一个26个字母的新顺序。例如"bdceafghijklmnopqrstuvwxyz"代表'b'排在'd'前,'d'在'c'前,'c'在'e'前…… 给定N个字符串...原创 2018-03-31 11:03:36 · 334 阅读 · 0 评论 -
HRBUST - 2322 team
teamKim 正在玩一款手游,在这款游戏中,Kim可以选择若干个角色编成一队作战。为了挑战不同的关卡,Kim需要不断的调整编队阵容。然而随着游戏不断更新,队伍成员变得越来越多,Kim已经记不清哪些角色在队伍中,哪些角色不在队伍中了。请你写一个程序来帮助他。具体来说,Kim有三种可以执行的操作。1 x :把 x 号角色加入队伍。如果x号角色已经在队伍中,什么都不会发生。2 x :把 x 号角色...原创 2018-04-04 00:02:38 · 232 阅读 · 0 评论 -
数数字 51Nod - 1770
数数字 51Nod - 1770 统计一下 个aaa ⋯ aaa⏟n个a × b 的结果里面有多少个数字d,a,b,d均为一位数。样例解释:3333333333*3=9999999999,里面有10个9。Input多组测试数据。 第一行有一个整数T,表示测试数据的数目。(1≤T≤5000) 接下来有T行,每一行表示一组测试数据,有4个整数a,b,d,n。 (1≤a,b≤9,0≤d≤9,1≤n≤1...原创 2018-04-05 18:43:00 · 284 阅读 · 0 评论 -
HDU-6646 A + B = C
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6646题目大意:给出a,b,c ,如果存在 a*10^x + b*10^y = c*10^z 输出 x y z,不存在输出-1思路:先把a b c 的后面的0都去掉,现在a b c 长度为la lb lc,如果lc > la+lb 那就只存在两种情况: a在前中间为0b在后 或 b...原创 2019-08-12 17:52:45 · 729 阅读 · 1 评论