题解 被你们虐了千百遍的题目和 OJ 也很累的,也想要休息,所以你们别想了,行行好放过它们,我们来看题解吧... A. 诡异的计数法 Description cgy 太喜欢质数了以至于他计数也需要用质数表示!在他看来,2(第一小质数)表示1,3(第二小质数)表示2--可正因为他的计数方法太奇葩,所以他的数学成绩非常差而且拖累了他的绩点. lxy 得知 cgy 的绩点排名之后打算告诉他,可是必须以极度麻烦的 cgy 质数计数法的方式表示. lxy 出重金 ¥(10000000 mod 10) 请你…
大厦 Time Limit : 4000/2000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other) Total Submission(s) : 25   Accepted Submission(s) : 7 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description 给你一个n(1<=n<=1000)层楼的大厦,每一楼里面有m(1&l…
矩阵 Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other) Total Submission(s) : 7   Accepted Submission(s) : 4 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description 假设你有一个矩阵,有这样的运算A^(n+1) = A^(n)*A (*代…
题目代号:HDU 6154 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6154 CaoHaha's staff Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 777    Accepted Submission(s): 438 Problem Description "You shal…
Deleting Edges Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 567    Accepted Submission(s): 210 Problem Description Little Q is crazy about graph theory, and now he creates a game about grap…
Happy Necklace Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1146    Accepted Submission(s): 491 Problem Description Little Q wants to buy a necklace for his girlfriend. Necklaces are single…
Graph Theory Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1796    Accepted Submission(s): 750 Problem Description Little Q loves playing with different kinds of graphs very much. One day he…
Building Shops Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 701 Accepted Submission(s): 265 Problem Description HDU’s n classrooms are on a line ,which can be considered as a number line. Eac…
/* HDU 6154 - CaoHaha's staff [ 构造,贪心 ] | 2017 中国大学生程序设计竞赛 - 网络选拔赛 题意: 整点图,每条线只能连每个方格的边或者对角线 问面积大于n的图形最少要几条线 分析: 可以发现面积相同的情况下,每条线都连对角的菱形是最优的 再考虑如何将 面积为x^2的菱形,每次扩展一条边, 按最优扩展为面积为(x+1)^2的菱形 然后就可以先二分,再判断了 */ #include <bits/stdc++.h> using namespace std;…
思路来自 ICPCCamp /* HDU 6150 - Vertex Cover [ 构造 ] | 2017 中国大学生程序设计竞赛 - 网络选拔赛 题意: 给了你一个贪心法找最小覆盖的算法,构造一组数据,使得这个程序跑出的答案是正解的三倍以上 分析: 构造一个二分图,左边 n 个节点 将左边的点进行 n 次分块,第 i 次分 n/i 块,每块的大小为 i,对于每一块都在右边建一个新的节点和这一块所有的点相连 则右边有 nlogn个节点,且每次一定优先选右边,最后取 nlogn >= 3n */…