上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
摘要: 不管 欧拉回路 还是 欧拉路径 无向图或者有向图(删除方向后)要联通 欧拉路径存在的判定条件 1 无向图 度数为奇数的点最多有两个 2 有向图 最多只能有两个点的入度不等于出度 且一个 入度-出度=1(终点) 另一个 出度-入度=1(起点) 欧拉回路存在的判定条件 1 无向图 度数为奇数的点最多有0 阅读全文
posted @ 2018-05-30 22:26 灬从此以后灬 阅读(120) 评论(0) 推荐(0) 编辑
摘要: C. Useful Decomposition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Useful Decompo 阅读全文
posted @ 2018-05-29 22:19 灬从此以后灬 阅读(151) 评论(0) 推荐(0) 编辑
摘要: https://www.nowcoder.com/acm/contest/124#question 题意 找第一个不小于K的数的下标,然后对它前一个数加一 解析 我们可以维护一个最大值数组 1到 i的 最大值 就是max[ i ] 二分找到最左边的值 但是 找到的前一个加1 要用线段树来维护最大值 阅读全文
posted @ 2018-05-24 22:01 灬从此以后灬 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 原题链接 https://www.nowcoder.com/test/8537209/summary 题意 n个数 q个 查询 L,R,K L到R区间内为K的数有多少个 数据范围 n <=300000,q<=300000 解析 对于每次查询必须要 O(logn) 复杂度才行 所以想到二分查找 因为数 阅读全文
posted @ 2018-05-24 17:34 灬从此以后灬 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 113159 Accepted Submission(s): 47413 Problem 阅读全文
posted @ 2018-05-21 21:26 灬从此以后灬 阅读(183) 评论(0) 推荐(0) 编辑
摘要: https://www.nowcoder.com/test/9763997/summary 牛牛准备参加学校组织的春游, 出发前牛牛准备往背包里装入一些零食, 牛牛的背包容量为w。 牛牛家里一共有n袋零食, 第i袋零食体积为v[i]。 牛牛想知道在总体积不超过背包容量的情况下,他一共有多少种零食放法 阅读全文
posted @ 2018-05-21 21:19 灬从此以后灬 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 typedef long long ll; 4 const ll mod=1000000007,maxn=5e4+50; 5 int n,m; 6 int main() 7 { 8 cin>>n; //集合大小 5 {0,1,2,3,4} 9 for(int i=0;i<(1<<n);i... 阅读全文
posted @ 2018-05-21 21:10 灬从此以后灬 阅读(255) 评论(0) 推荐(0) 编辑
摘要: C. Kuro and Walking Route time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Kuro and Wa 阅读全文
posted @ 2018-05-20 19:37 灬从此以后灬 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Recursive sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2882 Accepted Submission(s): 1 阅读全文
posted @ 2018-05-09 22:02 灬从此以后灬 阅读(547) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3233 题解 矩阵快速幂+二分等比数列求和 AC代码 阅读全文
posted @ 2018-05-07 01:46 灬从此以后灬 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页