[Link]:http://acm.hdu.edu.cn/showproblem.php?pid=6043 [Description] 一个人壁橱里有n双袜子,每天早上取一双最小下标的袜子,然后晚上放到篮子里;当篮子里的袜子个数到达n-1的时候,他会把它们全部洗一遍,然后第二天再把这n-1双放到壁橱里(先取完最后那一只在壁橱里的再把n-1双放进去); [Solution] 可以模拟一下取袜子的序列,比如有4只袜子 1 2 3 4 1 2 3 1 2 4 1 2 3 1 2 4 可以发现; 一开始…
KazaQ's Socks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 338    Accepted Submission(s): 212 Sample Input 3 7 3 6 4 9 Sample Output Case #1: 3 Case #2: 1 Case #3: 2 Source 2017 Multi-Unive…
[Link]:http://acm.hdu.edu.cn/showproblem.php?pid=6034 [Description] 给你n个字符串; 每个字符串都仅由小写字母组成; 然后,你可以把每个小写字母都映射成0..25中的任意一个数字; (两个不同的字母不能映射成相同数字); 组成的26进制数; 问这n个26进制数的最大和是多少; [Solution] 记录每个字母在哪一位上出现过多少次; ->其实就是记录每个字母在某些位权上的系数; 然后; 把占的位权总和最多的字母优先往前放就好;…
[Link]: [Description] 让你求最大的k; 使得 10^k<=2^m-1 [Solution] 求出2^m-1的位数就好; [lg(2^m-1)] = lg(2^m) = m*lg2 [NumberOf WA] 1(没加case) [Reviw] [Code] #include <bits/stdc++.h> using namespace std; int n; int main(){ int kk = 0; while (~scanf("%d",…
Function Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 652    Accepted Submission(s): 267 Sample Input 3 2 1 0 2 0 1 3 4 2 0 1 0 2 3 1 Sample Output Case #1: 4 Case #2: 4 Source 2017 Multi-U…
FFF at Valentine Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1060    Accepted Submission(s): 506 Problem Description At Valentine's eve, Shylock and Lucar were enjoying their time as any oth…
Dying Light Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 513    Accepted Submission(s): 122 Problem Description LsF is visiting a local amusement park with his friends, and a mirror room su…
CSGO Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 127    Accepted Submission(s): 20 Problem Description Senior Pan is crazy about CSGO and she is so skilled. She can kill every enemy she sp…
Ch’s gift Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1354    Accepted Submission(s): 496 Problem Description Mr. Cui is working off-campus and he misses his girl friend very much. After a w…
Big binary tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 597    Accepted Submission(s): 207 Problem Description You are given a complete binary tree with n nodes. The root node is numbere…
Colorful Tree Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1539    Accepted Submission(s): 616 Sample Input 3 1 2 1 1 2 2 3 6 1 2 1 3 2 1 1 2 1 3 2 4 2 5 3 6 Sample Output Case #1: 6 Case #…
Balala Power! Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2668    Accepted Submission(s): 562 Problem Description Sample Input 1 a 2 aa bb 3 a ba abc Sample Output Case #1: 25 Case #2: 132…
Add More Zero Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 398    Accepted Submission(s): 283 Sample Input 1 64   Sample Output Case #1: 0 Case #2: 19   Source 2017 Multi-University Trainin…
Balala Power! Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 4124    Accepted Submission(s): 1004 Problem Description Talented Mr.Tang has n strings consisting of only lower case characters.…
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6069 题目: Counting Divisors Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1235    Accepted Submission(s): 433 Problem Description In mathem…
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6071 题目: Lazy Running Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 144    Accepted Submission(s): 62 Problem Description In HDU, you have…
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6060 题目: RXD and dividing Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 522    Accepted Submission(s): 219 Problem Description RXD has a tr…
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6058 题目: Kanade's sum Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 505    Accepted Submission(s): 176 Problem Description Give you an array …
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6035 题面: Colorful Tree Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1651    Accepted Submission(s): 675 Problem Description There is a tre…
学长讲座讲过的,代码也讲过了,然而,当时上课没来听,听代码的时候也一脸o((⊙﹏⊙))o 我的妈呀,语文不好是硬伤,看题意看了好久好久好久(死一死)... 数学+思维题,代码懂了,也能写出来,但是还是有一点不懂,明天继续. 感谢我的队友不嫌弃我是他的猪队友(可能他心里已经骂了无数次我是猪队友了_(:з」∠)_ ) Function Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Other…
学长好久之前讲的,本来好久好久之前就要写题解的,一直都没写,懒死_(:з」∠)_ Senior Pan Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1332    Accepted Submission(s): 533 Problem Description Senior Pan fails in his discrete ma…
Problem Description There 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 supercomputer which has ability to support calculations…
Regular polygon Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 177    Accepted Submission(s): 74 Problem Description On a two-dimensional plane, give you n integer points. Your task is to figur…
Funny Function Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1109    Accepted Submission(s): 527 Sample Input 2 2 2 3 3 Sample Output 2 33 Source 2017 Multi-University Training Contest - Team…
TrickGCD Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2097    Accepted Submission(s): 816 Sample Input 1 4 4 4 4 4 Sample Output Case #1: 17   Source 2017 Multi-University Training Contest…
Maximum Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1450    Accepted Submission(s): 673 Sample Input 4 8 11 8 5 3 1 4 2 Sample Output 27 Hint For the first sample: 1. Choose 2 from…
[Link]:http://acm.hdu.edu.cn/showproblem.php?pid=6053 [Description] 给你一个b数组,让你求一个a数组: 要求,该数组的每一位都小于等于b数组: 且这个b数组的n个数的gcd>=2 [Solution] 设f[i]表示gcd为i的a数组有多少个; 则从gcd大的开始,往gcd小的方向枚举gcd为i; 然后a的每个位置都可以为i的倍数; 则f[i] = a[1]/i * a[2] / i * a[3]/i - a[4]/i; 但是这…
[Link]:http://acm.hdu.edu.cn/showproblem.php?pid=6047 [Description] 给你一个数列a和一个数列b; 只告诉你a的前n项各是什么; 然后让你求第出a的第n+1..2*n项; 这里a的第i项等于max(a[j]-j)这里j∈[b[k]..i-1]; (i>n) 且,每个b只能用来推一次a. 让你求出∑2∗nn+1ai的最大值 [Solution] 一开始的a数组,对于ai也直接减去i就好; 这样在推的时候,直接取区间的最值就可以了,省…
[Link]: [Description] 给你n个点整数点; 问你这n个点,能够组成多少个正多边形 [Solution] 整点只能构成正四边形. 则先把所有的边预处理出来; 枚举每某两条边为对角线的情况; 看看这两条对角线能否组成一个正方形; 可以的话,递增答案. [NumberOf WA] 1 [Reviw] (排序的时候边的数目和点的弄混了) [Code] #include <bits/stdc++.h> #define int long long using namespace std…
[Link]: [Description] 两个人都做了完全一样的n道选择题,每道题都只有'A','B','C' 三个选项,,每道题答对的话得1分,答错不得分也不扣分,告诉你两个人全部n道题各自选的是什么,问你第一个人得X分,第二个人得Y分可不可能? [Solution] 我们可以倒着想这个问题; 第一个人答对一题,就让X减去1 第二个人答对一题,就让Y减去1 只要能让X和Y都变成0,那就可以了,因为剩余的题目,不管两个人答案 是什么,都可以让他们俩都错. 设xt,bxt是两人所有的题答案相同和…