// 出自ICPC 2018网络赛C - Dream & D - Find Integer // 对大佬来讲的水题,本菜鸡尽量学会的防爆零题... // 今晚翻看vjudge昨日任务上的C题,发现好多人一发过了,我想它应该不难吧,但自己始终没想明白,到底该如何构造一种符合题意封闭的加法和乘法运算. // 参考了这里的说明,才完全弄懂了,写点东西记录学习成果. C - Dream (HDU 6440) 题目要求重新定义加法和乘法,对任意非负整数都满足:(m+n)p=mp+np,其中p为素数. 之前…
地址http://codeforces.com/contest/799 A. Carrot Cakes In some game by Playrix it takes t minutes for an oven to bake k carrot cakes, all cakes are ready at the same moment t minutes after they started baking. Arkady needs at least n cakes to complete a…
11.9 线段树 http://acm.hdu.edu.cn/showproblem.php?pid=6315 求逆序对个数 http://acm.hdu.edu.cn/showproblem.php?pid=6318 必赢博弈 http://acm.hdu.edu.cn/showproblem.php?pid=6312 欧拉回路 http://acm.hdu.edu.cn/showproblem.php?pid=6311 好难的构造题目 http://acm.hdu.edu.cn/showpr…
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-size: 10.5000pt } h1 { margin-top: 5.0000pt; margin-bottom: 5.0000pt; text-align: center; font-family: 宋体; color: rgb(26,92,200); font-weight: bold; fo…
Higher Math Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2219    Accepted Submission(s): 1219 Problem Description You are building a house. You’d prefer if all the walls have a precise right…
Friendship of Frog Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5578 Description N frogs from different countries are standing in a line. Each country is represented by a lowercase letter. The distance betwee…
A water problem 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named Haha and Xixi in the universe and they were created with the universe beginning. There is 73 days in Xixi a year and 137 days in Haha a year. Now you k…
L - House Building Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5538 Description Have you ever played the video game Minecraft? This game has been one of the world's most popular game in recent years. The wor…
做水题的感觉真好系列 HDU 2084 数塔 1: 12: 1 23: 1 2 34: 1 2 3 45: 1 2 3 4 5 dp[i][j]第i行第j个数取得的最大值dp[i][j] = max(dp[i-1][j-1], dp[i-1][j]) + a[i][j]. 代码: /********************************************************* Problem : 2084 ( 数塔 ) Judge Status : Accepted RunI…
这里是杭电hdu上的链接:http://acm.hdu.edu.cn/showproblem.php?pid=3999  Problem Description: As we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely: 1.  insert a key k to a empty tree, then the tree becom…