Warm up 2 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 28    Accepted Submission(s): 8 Problem Description Some 1×2 dominoes are placed on a plane. Each dominoe is placed either horizontally…
Warm up Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 90    Accepted Submission(s): 12 Problem Description N planets are connected by M bidirectional channels that allow instant transportatio…
Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 94    Accepted Submission(s): 41 Problem Description   Sample Input 2   Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1. 2. The input fil…
借用题解上的话,就是乱搞题.. 题意理解错了,其实是坐标系画错了,人家个坐标系,我给当矩阵画,真好反了.对于题目描述和数据不符的问题,果断相信数据了(这是有前车之鉴的hdu 4612 Warm up,明明有重边,出题人欺骗我们的智商)然后就杯具了. 我是用并查集搞得. #include<stdio.h> #include<string.h> ; int mp[MAXN][MAXN]; ]; ]; int find(int x) { return p[x]==x?x:p[x]=fin…
Front compression Time Limit: 5000/5000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 158    Accepted Submission(s): 63 Problem Description Front compression is a type of delta encoding compression algorithm wher…
Terrorist’s destroy Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 24    Accepted Submission(s): 6 Problem Description There is a city which is built like a tree.A terrorist wants to destroy th…
Backup Plan Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 93    Accepted Submission(s): 36Special Judge Problem Description Makomuno has N servers and M databases. All databases are synchroniz…
Building Fence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 171    Accepted Submission(s): 25Special Judge Problem Description Long long ago, there is a famous farmer named John. He owns a bi…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4619 题意: 平面上有一些1×2的骨牌,每张骨牌要么水平放置,要么竖直放置,并且保证同方向放置的骨牌不会相互覆盖.水平放置的牌和竖直放置的牌可能相互覆盖,现在要移去一些牌,使得剩下的牌任何两张都不会相互覆盖,问桌面上最多能剩多少张牌. 分析: 如果把每张牌看作一个结点,则共有两类结点,容易联想到二分图.另外,同方向的牌不会相互覆盖,不同方向的可能相互覆盖,易想到二分图的一个重要性质:同类结点间不会连…
Warm up 2 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4619 Description Some 1×2 dominoes are placed on a plane. Each dominoe is placed either horizontally or vertically. It's guaranteed the dominoes in the same direction are not overlapped, but h…