摘要: After retirement as contestant from WHU ACM Team, flymouse volunteered to do the odds and ends such as cleaning out the computer lab for training as e 阅读全文
posted @ 2017-04-06 14:14 walfy 阅读(238) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/156688#problem/B 题目说了一大堆,前面的没有用,就是让你判断要加几条边才能强连通,用到缩点的知识 二重循环,判断邻接表下一个点是不是在强连通分量中,入度,出度分别保存下来,输出较大的那一个 阅读全文
posted @ 2017-04-01 14:33 walfy 阅读(174) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/156688#problem 为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房 阅读全文
posted @ 2017-03-31 20:42 walfy 阅读(287) 评论(0) 推荐(0) 编辑
摘要: vector当邻接表存图 C. Online Courses In BSU time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. 阅读全文
posted @ 2017-03-24 17:55 walfy 阅读(174) 评论(0) 推荐(0) 编辑
摘要: D. k-Interesting Pairs Of Integers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. k- 阅读全文
posted @ 2017-03-24 14:22 walfy 阅读(401) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/68966#problem/J 输出技巧很重要,也可以使用栈来保存后输出。 刚开始做就是没想到要排序 阅读全文
posted @ 2017-03-17 09:29 walfy 阅读(103) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/68966#problem/F 初始化就行了;dp【0】=0; 这题还要刚好装满背包,输出时进行判断 阅读全文
posted @ 2017-03-12 20:32 walfy 阅读(135) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/68966#problem/E dp【i】=a【i】这一步一定不能忘了!! 阅读全文
posted @ 2017-03-12 20:04 walfy 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #define ll long long using namespace std; const int N=100; int dp[N][N]; int main() { char s1[... 阅读全文
posted @ 2017-03-12 18:46 walfy 阅读(421) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/contest/150953#problem/D 此题关键 就是排序,刚开始按q排序结果想死都想不出来应该是q-p排 一维的dp 二维的dp 阅读全文
posted @ 2017-03-12 13:40 walfy 阅读(463) 评论(0) 推荐(0) 编辑