上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 36 下一页
摘要: 倒腾了一个小时 自己也没去看网上的 总算自己能写出来模板了 kruskal prim 阅读全文
posted @ 2017-08-26 15:02 Draymonder 阅读(198) 评论(0) 推荐(0)
摘要: 详细见:http://blog.csdn.net/nk_test/article/details/46242401 #include<bits/stdc++.h> using namespace std; const int maxn = 1e7; bool vis[maxn]; int prime 阅读全文
posted @ 2017-08-25 15:38 Draymonder 阅读(323) 评论(0) 推荐(0)
摘要: Two Paths Problem Description You are given a undirected graph with n nodes (numbered from 1 to n) and m edges. Alice and Bob are now trying to play a 阅读全文
posted @ 2017-08-25 10:13 Draymonder 阅读(268) 评论(0) 推荐(0)
摘要: 快速读入? 不知道 反正只是贴过来的 以后或许会用到? #define FI(n) FastIO::read(n) namespace FastIO { const int SIZE = 1 << 16; char buf[SIZE], obuf[SIZE], str[60]; int bi = S 阅读全文
posted @ 2017-08-24 22:01 Draymonder 阅读(405) 评论(0) 推荐(0)
摘要: Schedule Problem Description There are N schedules, the i-th schedule has start time si and end time ei (1 <= i <= N). There are some machines. Each t 阅读全文
posted @ 2017-08-24 21:46 Draymonder 阅读(343) 评论(0) 推荐(0)
摘要: 这种博弈题 都是打表找规律 可我连怎么打表都不会 这个是凑任务的吧....以后等脑子好些了 再琢磨吧 就是斐波那契数列中的数 是必败态 #include<bits/stdc++.h> using namespace std; map<long long ,int> mp; void init() { 阅读全文
posted @ 2017-08-23 13:22 Draymonder 阅读(205) 评论(0) 推荐(0)
摘要: Numbers Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 514 Accepted Submission(s): 270 Problem 阅读全文
posted @ 2017-08-23 10:51 Draymonder 阅读(151) 评论(0) 推荐(0)
摘要: A. Chess Tourney Berland annual chess tournament is coming! Organizers have gathered 2·n chess players who should be divided into two teams with n peo 阅读全文
posted @ 2017-08-22 11:18 Draymonder 阅读(258) 评论(0) 推荐(0)
摘要: 本来刚开始还是想用每一位 -1的个数 然后再乘以10 不断累加 后来发现 完全不是这回事啊 因为本身就是0 和 1 所以只要记录出现的最大的数字 就是答案 因为 n >= 1 // 所以不需要考虑 0 也是1的情况 #include<bits/stdc++.h> using namespace st 阅读全文
posted @ 2017-08-21 22:33 Draymonder 阅读(138) 评论(0) 推荐(0)
摘要: 就很简单很简单的dp 只能从右或者从下走 所以 dp方程直接看下面公式吧 反正也不难 #include<bits/stdc++.h> using namespace std; const int maxn = 550; int s[maxn][maxn]; int dp[maxn][maxn]; i 阅读全文
posted @ 2017-08-21 22:22 Draymonder 阅读(191) 评论(0) 推荐(0)
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 36 下一页