10 2015 档案

摘要:#include #include #include using namespace std;int C[1100];const int MAXN = 10;void update(int x, int ans){ C[x] = ans ; while(x 0){ ret... 阅读全文
posted @ 2015-10-21 20:27 Painting、时光 阅读(478) 评论(0) 推荐(0) 编辑
摘要:模拟水题/************************************************* Author :Powatr* Created Time :2015/10/21 12:53:05* File Name :B.cpp ***************... 阅读全文
posted @ 2015-10-21 14:07 Painting、时光 阅读(164) 评论(0) 推荐(0) 编辑
摘要:仔细观察就会发现K = pow(2, m) + pow(2, m-1) 数要翻转一次/************************************************* Author :Powatr* Created Time :2015/10/20 18:06:07... 阅读全文
posted @ 2015-10-20 21:03 Painting、时光 阅读(262) 评论(0) 推荐(0) 编辑
摘要:Bellman_ford:复杂度:O(VE) 边数用途:一条路,钱币的互换,寻找最小正权环,即一圈后能回到自己并且比自己大或者小,如果是大,d数组就开0,否则开inf适用条件:从源点到它的所有节点,适用于稀疏图(顶点多,边数少)原理:利用该顶点判断操作之后与操作之前的比较步骤:1.开一个d数组,以d... 阅读全文
posted @ 2015-10-10 20:29 Painting、时光 阅读(222) 评论(0) 推荐(0) 编辑
摘要:用来求组合数取模ll Lucas(ll n, ll m, int p){ return 1ll * comb(n%p, m%p) * Lucas(n/p, m/p, p);} 阅读全文
posted @ 2015-10-01 16:39 Painting、时光 阅读(135) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示