摘要: Playing on Graph Description Input Output Sample Input 5 4 1 2 2 3 3 4 3 5 Sample Output 3 HINT n <= 1000, m <= 10^5 Solution 我们先考虑无解的情况。显然就是图中有奇环的时候无 阅读全文
posted @ 2017-10-17 18:01 BearChild 阅读(412) 评论(0) 推荐(0) 编辑
摘要: Valera and Number Description Input Output Sample Input 5 3 25 Sample Output 1.9218750000 HINT Solution 考虑运用DP。 Code 1 #include<iostream> 2 #include<s 阅读全文
posted @ 2017-10-17 17:48 BearChild 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Famil Door and Brackets Description Input Output Sample Input 4 1 ( Sample Output 4 HINT Solution 显然,我们考虑运用DP。先求出 f[i][j] 表示 长度为 i 的括号序列,“)” 比 “(” 多 j 阅读全文
posted @ 2017-10-17 17:44 BearChild 阅读(256) 评论(0) 推荐(0) 编辑