摘要: C - String Reconstruction 方法一:把确定的点的父亲节点设为下一个点,这样访问过的点的根节点都是没访问过的点。 代码: 方法二:把所有点放进set容器里,拜访过的点就删掉。 代码: 阅读全文
posted @ 2017-07-12 16:38 Wisdom+.+ 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 96C - Hockey 字符串处理 代码: 阅读全文
posted @ 2017-07-07 23:50 Wisdom+.+ 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 算法笔记 高精度乘法: 未完待续。。。 阅读全文
posted @ 2017-07-07 16:37 Wisdom+.+ 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 349B - Color the Fence 贪心 代码: 阅读全文
posted @ 2017-07-07 14:56 Wisdom+.+ 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 算法笔记 1.非连续最大子段和 如果不全为负数,最大子段和所有大于等于0的元素的和;如果全为负数,最大子段和为最大的负数。 2.连续最大子段和 ①无长度限制: 例题: 洛谷p1115最大子段和 思路:dp[i] = max(a[i], dp[i-1]+a[i]) 代码: #include<bits/ 阅读全文
posted @ 2017-07-06 17:44 Wisdom+.+ 阅读(426) 评论(0) 推荐(1) 编辑
摘要: 算法笔记 带权并查集大神详解:https://agatelee.cn/2017/05/%E5%B8%A6%E6%9D%83%E5%B9%B6%E6%9F%A5%E9%9B%86/ 贴几道题的代码: ①Poj1182食物链 这道题目不知道为啥用ios::sync_with_stdio(false)和c 阅读全文
posted @ 2017-07-05 15:25 Wisdom+.+ 阅读(3856) 评论(1) 推荐(0) 编辑
摘要: C. Mahmoud and a Message time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Mahmoud and 阅读全文
posted @ 2017-07-02 15:52 Wisdom+.+ 阅读(271) 评论(0) 推荐(0) 编辑
摘要: I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 75546 Accepted Submission(s): 29114 Pro 阅读全文
posted @ 2017-05-25 21:55 Wisdom+.+ 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 89077 Accepted Submission(s): 37522 Problem 阅读全文
posted @ 2017-05-25 21:53 Wisdom+.+ 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Fliptile Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10018 Accepted: 3717 Description Farmer John knows that an intellectually satisfie 阅读全文
posted @ 2017-05-06 20:55 Wisdom+.+ 阅读(191) 评论(0) 推荐(0) 编辑
摘要: D. Mike and distribution time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Mike and dis 阅读全文
posted @ 2017-04-23 16:03 Wisdom+.+ 阅读(503) 评论(0) 推荐(1) 编辑
摘要: C. Mike and gcd problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Mike and gcd 阅读全文
posted @ 2017-04-23 14:55 Wisdom+.+ 阅读(508) 评论(0) 推荐(0) 编辑
摘要: B. Mike and strings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Mike and strings 阅读全文
posted @ 2017-04-22 11:52 Wisdom+.+ 阅读(598) 评论(0) 推荐(0) 编辑
摘要: A. Mike and palindrome time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Mike and palin 阅读全文
posted @ 2017-04-22 11:24 Wisdom+.+ 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 畅通工程 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28744 Accepted Submission(s): 12633 Problem 阅读全文
posted @ 2017-04-21 21:30 Wisdom+.+ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 还是畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 44947 Accepted Submission(s): 20487 Proble 阅读全文
posted @ 2017-04-21 14:46 Wisdom+.+ 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 畅通工程 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input测试输入包含若干测试用例。每个测试用例的第1行给出 阅读全文
posted @ 2017-04-20 23:45 Wisdom+.+ 阅读(193) 评论(0) 推荐(0) 编辑
摘要: ios::sync_with_stdio(false); cin.tie(0); 把cin变得和scanf一样快。 阅读全文
posted @ 2017-04-20 23:40 Wisdom+.+ 阅读(967) 评论(1) 推荐(0) 编辑
摘要: B. The Little Match Girl time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. The Little Ma 阅读全文
posted @ 2017-04-20 17:42 Wisdom+.+ 阅读(483) 评论(0) 推荐(0) 编辑
摘要: A. Coins 题目链接:http://codeforces.com/gym/101102/problem/A time limit per test 3 seconds memory limit per test 256 megabytes input standard input output 阅读全文
posted @ 2017-04-20 17:37 Wisdom+.+ 阅读(396) 评论(0) 推荐(0) 编辑