
ACM_简单题
知足--常乐
这个作者很懒,什么都没留下…
展开
-
华东师范大学-E. 黑心啤酒厂
E. 黑心啤酒厂Time limit per test: 1.0 secondsTime limit all tests: 1.0 secondsMemory limit: 256 megabytesAccept / Submit: 849 / 2604黑心啤酒厂为了让大家买啤酒,会把一瓶酒设计成恰好能倒七杯。由于聚会时经常会有大家一起干杯这样的事情,干原创 2017-05-12 19:39:17 · 557 阅读 · 0 评论 -
哈尔滨理工大学第七届程序设计竞赛决赛 A 所有情况的和
题目描述 在acimo星球, tabris 是一名勇敢的屠龙勇士,在上绿岛屠龙前决定挑选N种装备武装自己,现在每种装备有两个,但每种装备tabris必须选择拿一个,不能多也不能少。 每件装备有自己的属性值,能给tabris属性加成。 对于不同种类的装备之间有叠加效果,如果选择多件装备,最终的属性加成为他们的乘积。 若tabris初始属性值为0,最后属性加成的期望是多少。 输入描述: 有多原创 2017-12-10 16:23:49 · 496 阅读 · 0 评论 -
哈尔滨理工大学第七届程序设计竞赛决赛 B 幸运大奖
题目描述 tabris实在是太穷了,为了发财,tabris去买了一张彩票,幸运地中了特别奖。 特别奖是这样的,不会直接给你发钱.会给你一串二进制数s,让你在s中选择一个不大于k的区间,这个区间表示的数就是获奖者的奖金数目. tabris中奖之后已经激动地蒙圈了,他不知道如何选择能获得最多的钱,你能帮帮他不? 输入描述: 输入一个整数T(T≤10),代表有T组数据. 每组数据占两行. 第原创 2017-12-10 16:26:22 · 331 阅读 · 0 评论 -
HDU 2700 Parity(签到)
Problem Description A bit string has odd parity if the number of 1’s is odd. A bit string has even parity if the number of 1’s is even.Zero is considered to be an even number, so a bit string with no原创 2017-12-03 14:54:40 · 332 阅读 · 1 评论 -
HDU 2212 DFS(打表)
传送门 : http://acm.hdu.edu.cn/showproblem.php?pid=2212 Problem Description A DFS(digital factorial sum) number is found by summing the factorial of every digit of a positive integer. For example ,consi原创 2017-11-25 16:23:32 · 270 阅读 · 0 评论 -
HDU 2097 Sky数(水题)
address : http://acm.hdu.edu.cn/showproblem.php?pid=2097 Problem Description Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,它的十六进制数BB0,其四位数字之和也为22,同时它的十二进制数表示1894,其原创 2017-11-25 16:26:29 · 341 阅读 · 0 评论 -
HDU 5104 Primes Problem(打表)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=5104Problem Description Given a number n, please count how many tuple(p1, p2, p3) satisfied that p1<=p2<=p3, p1,p2,p3 are primes and p1 + p2 + p3 = n.Inp原创 2017-11-25 16:35:20 · 347 阅读 · 0 评论 -
PAT L2-015. 互评成绩
传送门: https://www.patest.cn/contests/gplt/L2-015L2-015. 互评成绩 时间限制 250 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 学生互评作业的简单规则是这样定的:每个人的作业会被k个同学评审,得到k个成绩。系统需要去掉一个最高分和一个最低分,将剩下的分数取平均,原创 2018-01-18 18:09:48 · 493 阅读 · 0 评论 -
HDU 1020 Encoding
传送门 : http://acm.hdu.edu.cn/showproblem.php?pid=1020Problem Description Given a string containing only ‘A’ - ‘Z’, we could encode it using the following method: Each sub-string containing k same原创 2018-01-28 11:20:56 · 215 阅读 · 0 评论 -
HDU 1048 The Hardest Problem Ever(字符串处理)
Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of t原创 2018-01-28 11:25:02 · 212 阅读 · 0 评论 -
HDU 1235 统计同成绩学生人数
Problem Description 读入N名学生的成绩,将获得某一给定分数的学生人数输出。Input 测试输入包含若干测试用例,每个测试用例的格式为 第1行:N 第2行:N名学生的成绩,相邻两数字用一个空格间隔。 第3行:给定分数 当读到N=0时输入结束。其中N不超过1000,成绩分数为(包含)0到100之间的一个整数。Output 对每个测试用例,将获得给定分数的学生人数输出。原创 2018-01-28 11:44:44 · 231 阅读 · 0 评论 -
HDU 2561 第二小整数(水题)
第二小整数Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12781 Accepted Submission(s): 7725Problem Description 求n个整数中倒数第二小的数。 每一个整数都独立看成一...原创 2018-03-07 18:51:16 · 304 阅读 · 0 评论 -
HDU 2548 两军交锋(水题)
两军交锋Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8466 Accepted Submission(s): 5223Problem Description 话说辽军与MCA相峙多年,终于在一个秋日的早晨爆发了一次大...原创 2018-03-07 18:54:24 · 332 阅读 · 0 评论 -
HDU 2549 壮志难酬
壮志难酬Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14448 Accepted Submission(s): 4719Problem Description 话说MCA山上各路豪杰均出山抗敌,去年曾在江湖威名显赫的...原创 2018-03-07 18:59:40 · 308 阅读 · 0 评论 -
HDU 2550 百步穿杨
百步穿杨Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12181 Accepted Submission(s): 4516Problem Description 时维九月,序属三秋,辽军大举进攻MCA山,战场上两军正交...原创 2018-03-07 20:38:51 · 265 阅读 · 0 评论 -
EOJ Monthly 2017.12 A. 唐纳德先生和假骰子
在进行某些桌游,例如 UNO 或者麻将的时候,常常会需要随机决定从谁开始。骰子是一种好方案。普通的骰子有六个面,分别是一点、二点、三点、四点、五点、六点,六面向上的概率相同。由于骰子只能产生六种情况,而实际桌游时,却常常有三到四人,所以,我们在掷骰子时,常常采用两颗骰子,这个「随机的选择」就由骰子向上点数之和直接决定。我们采用这么一种方案,将向上点数之和对 p(人数)取模,模出来的 0,1,…,p−原创 2017-12-09 16:16:49 · 759 阅读 · 0 评论 -
HDU 2501-Tiling_easy version(递推)
Problem Description 有一个大小是 2 x n 的网格,现在需要用2种规格的骨牌铺满,骨牌规格分别是 2 x 1 和 2 x 2,请计算一共有多少种铺设的方法。Input 输入的第一行包含一个正整数T(T<=20),表示一共有 T组数据,接着是T行数据,每行包含一个正整数N(N<=30),表示网格的大小是2行N列。Output 输出一共有多少种铺设的方法,每组数据的输出占一行原创 2017-11-04 16:19:26 · 382 阅读 · 0 评论 -
CodeForces - 828 Restaurant Tables
In a small restaurant there are a tables for one person and b tables for two persons.It it known that n groups of people come today, each consisting of one or two people.If a group consist of one perso原创 2017-07-22 10:20:32 · 463 阅读 · 0 评论 -
hdu 6066-RXD's date
链接: http://acm.hdu.edu.cn/showproblem.php?pid=6066 Problem Description As we all know that RXD is a life winner, therefore he always goes out, dating with his female friends. Nevertheless, it is a p原创 2017-08-01 19:12:27 · 560 阅读 · 0 评论 -
HDU 2017 多校联赛-1001 Add More Zero
Problem DescriptionThere is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thought-provoking problem on a specific type of supercom原创 2017-07-25 17:35:30 · 363 阅读 · 0 评论 -
HDU 6098-Inversion
Problem Description Give an array A, the index starts from 1. Now we want to know Bi=maxi∤jAj , i≥2.Input The first line of the input gives the number of test cases T; T test cases follow. Each cas原创 2017-08-10 15:12:25 · 938 阅读 · 0 评论 -
HDU 6106-Classes
Problem Description The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in these courses. Now the school wants to count the number of stu原创 2017-08-10 15:16:07 · 296 阅读 · 0 评论 -
hdu 6077-Time To Get Up
Problem Description Little Q’s clock is alarming! It’s time to get up now! However, after reading the time on the clock, Little Q lies down and starts sleeping again. Well, he has 5 alarms, and it’s j原创 2017-08-03 15:31:14 · 565 阅读 · 0 评论 -
hdu 6075-Questionnaire
Problem Description In order to get better results in official ACM/ICPC contests, the team leader comes up with a questionnaire. He asked everyone in the team whether to have more training.Picture fro原创 2017-08-03 15:50:02 · 352 阅读 · 0 评论 -
多校连萌(4)- GJJ的日常之再游戏
DescriptionGJJ和WJJ又开始了游戏,然而由于WJJ太强了,所以GJJ只好靠计谋取胜,而正因为WJJ太强,所以用过一次的计谋便无效了。 GJJ和WJJ一共玩了N场游戏,如果GJJ想要获胜,必须得赢的场数比Wjj多。 问:GJJ能否获胜? Input多实例,到文件尾结束 每个样例第一行一个N(1<=N<=50000),表示GJJ每场使用的计谋的数量; 第二行是N个数x,表示计谋的原创 2017-08-18 18:54:58 · 347 阅读 · 0 评论 -
多校连萌 (4) GJJ来签到
DescriptionGJJ每天都很忙碌, 他每天要上班, 还要回家烧饭洗衣服。GJJ的公司有个要求, 每天上班需要打卡,忙碌的GJJ有时候会忘记打卡签到了,导致他的缺勤记录里有对应N天未签到的记录。 Gjj可是认识管理部门的妹子琳, 琳给了他M张签到卡,每张都可以消除某一天的未签到记录。将原本未签到的一天变成已经签到的一天。 GJJ现在想要利用这些签到卡使自己连续签到的天数最长, 小伙伴们请帮帮原创 2017-08-18 18:56:49 · 291 阅读 · 0 评论 -
多校连萌(4)GJJ的日常之暴富梦
DescriptionGJJ有个暴富梦。 他梦想着有一天,他突然有了很多很多钱,他梦想着等他有钱了,要在自己的家里挖两个游泳池, 一个用来洗脸,一个用来洗脚。他梦想着等他有钱了,他要买两辆劳斯莱斯,每次出门时候自己 开一辆,车后面再拖一辆。 GJJ每天都沉浸在他的暴富梦中。这天他突然打听到,有个选秀节目冠军奖金100亿,他知道他的暴富梦 马上就要实现了。他去参加选秀了。 GJJ表演了一套原创 2017-08-18 18:57:48 · 300 阅读 · 0 评论 -
HDU 1039-Easier Done Than Said?(字符串)
Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-gen原创 2017-08-12 09:49:57 · 276 阅读 · 0 评论 -
HDU 1201-18岁生日(字符串)
Problem Description Gardon的18岁生日就要到了,他当然很开心,可是他突然想到一个问题,是不是每个人从出生开始,到达18岁生日时所经过的天数都是一样的呢?似乎并不全都是这样,所以他想请你帮忙计算一下他和他的几个朋友从出生到达18岁生日所经过的总天数,让他好来比较一下。Input 一个数T,后面T行每行有一个日期,格式是YYYY-MM-DD。如我的生日是1988-03-07原创 2017-08-13 10:08:23 · 365 阅读 · 0 评论 -
HDU 6130-Kolakoski(Kolakoski序列)
address :http://acm.hdu.edu.cn/showproblem.php?pid=6130Problem Description This is Kolakosiki sequence: 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1……. This sequence consists of 1 and 2, and its first term原创 2017-08-16 08:16:49 · 2112 阅读 · 0 评论 -
HDU 6124-Euler theorem
addresss:http://acm.hdu.edu.cn/showproblem.php?pid=6124Problem Description HazelFan is given two positive integers a,b, and he wants to calculate amodb. But now he forgets the value of b and only reme原创 2017-08-16 08:14:10 · 481 阅读 · 0 评论 -
PAT L2-009 抢红包
L2-009. 抢红包 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 没有人没抢过红包吧…… 这里给出N个人之间互相发红包、抢红包的记录,请你统计一下他们抢红包的收获。输入格式:输入第一行给出一个正整数N(<= 104),即参与发红包和抢红包的总人数,则这些人从1到N编号。随后N行,第i行...原创 2018-03-05 19:36:30 · 277 阅读 · 0 评论