上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 31 下一页
摘要: 题目 题解 #include<bits/stdc++.h> using namespace std; typedef long long ll; ll n,k,m,p; ll pw(ll x,ll y){ ll z=1; for (;y;y>>=1,x=x*x%p) if (y&1) z=z*x%p 阅读全文
posted @ 2018-08-01 14:44 Mingoal 阅读(36) 评论(0) 推荐(0)
摘要: HDU 4185 Oil Skimmingpoj1469(hopcroft-karp算法)HDU 1507 Uncle Tom’s Inherited Land*ZOJ1654-Place the RobotsHDU 4751 Divide Groups HDU 4685 Prince and Pr 阅读全文
posted @ 2018-07-30 15:24 Mingoal 阅读(33) 评论(0) 推荐(0)
摘要: 学习博客 位运算转换为2-sat的方法: x表示x这个点是0,x’表示x这个点是1 如果a and b=0 连接a’->b b’->a 如果a and b=1 连接a->a’ b->b’ 如果a or b=0 连接a’->a b’->b 如果a or b=1 连接a->b’ b->a’ 如果a xo 阅读全文
posted @ 2018-07-30 15:10 Mingoal 阅读(16) 评论(0) 推荐(0)
摘要: upd:程序设计课写了个链表实现的实数加减乘除,输入格式要严格按照程序结尾的数据来(嫌麻烦没有压位) #include<bits/stdc++.h> using namespace std; #define gc getchar #define pc putchar typedef long lon 阅读全文
posted @ 2018-07-29 21:26 Mingoal 阅读(33) 评论(0) 推荐(0)
摘要: 题目 #Solution 根据裴蜀定理可得:容量为 v 1 , v 2 , . . . . . v k v1,v2,.....vk v1,v2,.....vk的 k k k个瓶子所能倒出的最小值为 g c d ( v 1 , v 2 , . . . , v k ) gcd(v1,v2,...,vk) 阅读全文
posted @ 2018-07-25 11:28 Mingoal 阅读(35) 评论(0) 推荐(0)
摘要: 题目 Solution 因为我们只关心相对大小,所以数字可以转为1,-1,0。要求覆盖b位置的总和为0的连续子序列数量 Code #include<bits/stdc++.h> using namespace std; typedef long long ll; int n,a,b,i,s,ri,s 阅读全文
posted @ 2018-07-25 08:29 Mingoal 阅读(34) 评论(0) 推荐(0)
摘要: 题目 题解 Solution 一道用线段树维护连通性的题。 第一做这种题,其实这类问题我们需要维护一下区间内的联通关系,再用我们维护的这些关系去查询。 对于这道题,我觉得可以有两种建树的方法: ①:以每一列为一个叶子节点。 ②:以每一个区间(就是每1条横向道路连接的左右两个节点)为一个叶子节点。 我 阅读全文
posted @ 2018-07-23 13:41 Mingoal 阅读(25) 评论(0) 推荐(0)
摘要: HDU 1695 GCDHDU 2204 Eddy’s爱好HDU 4407UVA11806 CheerleadersHDU 2841HDU 4135 POJ2773TopCoder - 10875 CarelessSecretaryTopCoder - 8470 CharmingTicketsEas 阅读全文
posted @ 2018-07-19 23:18 Mingoal 阅读(65) 评论(0) 推荐(0)
摘要: 凸包: https://blog.csdn.net/bone_ace/article/details/46239187 旋转卡壳算法: https://blog.csdn.net/wang_heng199/article/details/74477738 http://www.cnblogs.com 阅读全文
posted @ 2018-07-19 23:03 Mingoal 阅读(58) 评论(0) 推荐(0)
摘要: Hint:输出要用%f,最好不要%lf,特别是poj上 文章目录 模板:[foj1015 土地划分](http://acm.fzu.edu.cn/problem.php?pid=1015)[POJ 2318 TOYS](http://poj.org/problem?id=2318)[POJ 3304 阅读全文
posted @ 2018-07-19 22:58 Mingoal 阅读(25) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 31 下一页