1 2 3 4
摘要: #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<queue> #include<vector> #define maxn 300100 using namespace std; const int N = 110; const int base = 20010; int n, k, 阅读全文
posted @ 2019-10-23 21:45 Lesning 阅读(132) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; typedef long long ll; ll list[200010]; ll ans[200010]; ll g[200010]; ll f[200010]; int n,c; int main(){ scanf("%d %d",&n,&c); for(int i... 阅读全文
posted @ 2019-10-23 18:41 Lesning 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 学到了一份排列组合的公式 阅读全文
posted @ 2019-10-23 13:36 Lesning 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 推公式题,万万没想到斐波那契啊 阅读全文
posted @ 2019-10-22 14:31 Lesning 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/959/H来源:牛客网 C国有n个大城市和m条道路,每条道路连接这n个城市中的某两个城市。任意两个城市之间最多只有一条道路直接相连。这m条道路中有一部分为单向通行的道路,一部分为双向通行的道路,双向通行的道路在统计条数时也 阅读全文
posted @ 2019-10-21 19:27 Lesning 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 二分+最短路算法 阅读全文
posted @ 2019-10-17 22:02 Lesning 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 真的不会写的,累了,这题实在是太难了QAQ 阅读全文
posted @ 2019-10-17 11:49 Lesning 阅读(65) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<vector> #define maxn 2100 using namespace std; vector<int>G[maxn]; void insert(int be, int en) { G[be].push_back(en); 阅读全文
posted @ 2019-10-12 18:48 Lesning 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 利用树形DP可以有效解决该问题! 阅读全文
posted @ 2019-10-09 19:20 Lesning 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-10-08 19:51 Lesning 阅读(154) 评论(0) 推荐(0) 编辑