2013 ACM/ICPC 亚洲区 杭州站】的更多相关文章

题目链接  2013杭州区域赛 Problem A Problem B 这题我用的是SPFA+ mask dp 首先跑5次SPFA: 1次是求出每个起点和其他所有点的最短距离 4次是求出每个输入的点和其他所有点的最短距离 然后就是dp 设dp[mask][i]为,mask状态下,以i为终点的最优方案然后做一遍状压DP即可. #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i &l…
摘要 本文主要列举并求解了2016 ACM/ICPC亚洲区青岛站现场赛的部分真题,着重介绍了各个题目的解题思路,结合详细的AC代码,意在熟悉青岛赛区的出题策略,以备战2018青岛站现场赛. HDU 5984 Pocky 题意 给出一根棒子(可以吃的)的长度x和切割过程中不能小于的长度d,每次随机的选取一个位置切开,吃掉左边的一半,对右边的棒子同样操作,直至剩余的长度不大于d时停止.现在给出x和d,问切割次数的数学期望是多少. 解题思路 当看到第二个样例2 1时,结果是1.693147,联想到ln…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=5979 按AC顺序: I - Convex Time limit    1000 ms Memory limit 65536 kB OS Windows We have a special convex that all points have the same distance to origin point. As you know we can get N segments after linki…
F - Detachment In a highly developed alien society, the habitats are almost infinite dimensional space. In the history of this planet,there is an old puzzle. You have a line segment with x units’ length representing one dimension.The line segment can…
题目链接  2012金华区域赛 Problem A 按a/b从小到大的顺序排队进行体检即可 #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<algorithm> #include<cstring> #include<string> #include<vector> #include<map>…
A B C D E F G H I J K L M O O O O     $\varnothing$     $\varnothing$  $\varnothing$  $\varnothing$   $\varnothing$ [A. Relic Discovery] 签到 #include <bits/stdc++.h> int n; int main() { int T; scanf("%d", &T); while (T--) { scanf("…
A B C D E F G H I J K L M O O O $\varnothing$ $\varnothing$   $\varnothing$ $\varnothing$ $\varnothing$ $\varnothing$      $\varnothing$ [A. Thickest Burger] 签到. [B. Relative atomic mass] 签到 [C. Recursive sequence] $$f[i] = f[i - 1] + 2 * f[i - 2] +…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5558 Problem Description Alice wants to send a classified message to Bob. She tries to encrypt the message with her original encryption method. The message is a string S, which consists of Nlowercase let…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4803 Problem Description Jenny is a warehouse keeper. He writes down the entry records everyday. The record is shown on a screen, as follow:There are only two buttons on the screen. Pressing the button i…
Recursive sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 249    Accepted Submission(s): 140 Problem Description Farmer John likes to play mathematics games with his N cows. Recently, t…