2013 ACM 通化邀请赛 A. Tutor】的更多相关文章

A. Tutor Description Lilin was a student of Tonghua Normal University. She is studying at University of  Chicago now. Besides studying, she worked as a tutor teaching Chinese to Americans. So,  she can earn some money per month. At the end of the yea…
点击打开链接 D.D-City Description Luxer is a really bad guy. He destroys everything he met. One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-line  connects exactly two D-points. Luxer will destroy all the D-lines. The mayor of D-ci…
计算12个数的和的平均数.四舍五入,不能有后导0. 我的做法是,将答案算出后,乘以1000,然后看个位是否大于等于5,判断是否要进位…… #include<iostream> #include<cstdio> #include<string.h> #include<cmath> #include<algorithm> using namespace std; #define eps 1e-2 int main() { int cas; scanf…
dp[ba][ta][bb][tb]表示a堆牌从下面拿了ba张,从上面拿了ta张.b堆牌从下面拿了bb张,从上面拿了tb张.当前玩家能得到的最大的分数. 扩展方式有4种,ba+1,ta+1,bb+1,tb+1,用当前剩下牌的总分减掉它,取最大值,就是当前玩家的最高分. 记忆化搜索 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstrin…
题意:给定n个点和m条边,问你拆掉前i条边后,整个图的连同城市的数量. i从1到m. 思路:计算连通的城市,很容易想到并查集,但是题目里是拆边,所以我们可以反向去做. 存下拆边的信息,从后往前建边. #include <iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct node { int a,b; }Q[100005];…
http://acm.hdu.edu.cn/showproblem.php?pid=4710 Balls Rearrangement Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 735    Accepted Submission(s): 305 Problem Description Bob has N balls and A b…
http://acm.hdu.edu.cn/showproblem.php?pid=4708 Rotation Lock Puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description Alice was felling into a cave. She found a strange door with a number square m…
http://acm.hdu.edu.cn/showproblem.php?pid=4715 Difference Between Primes Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description All you know Goldbach conjecture.That is to say, Every even integer great…
http://acm.hdu.edu.cn/showproblem.php?pid=4712 Hamming Distance Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 1610    Accepted Submission(s): 630 Problem Description (From wikipedia) For bina…
hduoj 4706 Children's Day 2013 ACM/ICPC Asia Regional Online —— Warmup Herding Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2005    Accepted Submission(s): 563 Problem Description Little Joh…