上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页
摘要: ##求最小值 while (l<r) { int mid= (l+r)>>1; if (check (mid)) r=mid; else l=mid+1; } ##求最大值 while (l<r) { int mid= (l+r+1)>>1; if (check (mid)) l=mid; else 阅读全文
posted @ 2020-08-24 19:11 Luglucky 阅读(189) 评论(0) 推荐(0) 编辑
摘要: ##Problem B ###题面 In Omkar's last class of math, he learned about the least common multiple, or LCM. LCM(a,b) is the smallest positive integer x which 阅读全文
posted @ 2020-08-24 13:13 Luglucky 阅读(187) 评论(0) 推荐(0) 编辑
摘要: ##题目 Problem Description Now, here is a fuction: F(x) = 6 * x7+8*x6+7x^3+5x^2-y*x (0 ⇐ x ⇐100) Can you find the minimum value when x is between 0 and 阅读全文
posted @ 2020-08-23 23:15 Luglucky 阅读(126) 评论(0) 推荐(0) 编辑
摘要: ##Problem A ###题面 Acacius is studying strings theory. Today he came with the following problem. You are given a string s of length n consisting of low 阅读全文
posted @ 2020-08-23 22:24 Luglucky 阅读(196) 评论(0) 推荐(0) 编辑
摘要: ##题目 (戳我)[https://www.luogu.com.cn/problem/P2765] ##思路 两种思路,第一种贪心很明显了,我们直接从第一个开始放球,可以放就放,不能放就新开一个。第二种的话建图,首先我们应该发现这个东西的特点,一个柱子可以放多个球,有多个柱子,但是每个柱子的球是不可 阅读全文
posted @ 2020-08-23 17:43 Luglucky 阅读(147) 评论(0) 推荐(0) 编辑
摘要: ##题面 戳我 ##思路 有蜥蜴连超级源点,可以出图的连超级汇点,不用说了,然后就是有高度的柱子裂点,边权为高度,然后可以互相跳的连边,跑dinic就好了。 ##代码实现 #include<cstdio> #include<algorithm> #include<vector> #include<q 阅读全文
posted @ 2020-08-22 23:14 Luglucky 阅读(122) 评论(0) 推荐(0) 编辑
摘要: ##Problem A ###题面 We have a point A with coordinate x=n on OX-axis. We'd like to find an integer point B (also on OX-axis), such that the absolute dif 阅读全文
posted @ 2020-08-22 17:18 Luglucky 阅读(238) 评论(0) 推荐(0) 编辑
摘要: ##题目 戳我 ##思路 三分图匹配,不过看上去裸匈牙利应该能过吧,我们考虑网络流,但是由于一本书只能匹配一次,那么我们考虑裂点来做流量限制,然后直接跑dinic就好了。 #代码实现 #include<cstdio> #include<algorithm> #include<vector> #inc 阅读全文
posted @ 2020-08-21 21:35 Luglucky 阅读(241) 评论(0) 推荐(0) 编辑
摘要: ##题目 链接 ##思路 看题目就知道是最小割了,但是不一样的是,我们一般求的最小割是割边,而这题让我们求的是割点,那么我们在原有的网络基础上在每个点和一个我们附加的点上连上一条边权为1的边限制流量就好了。 ##代码实现 #include<cstdio> #include<algorithm> #i 阅读全文
posted @ 2020-08-21 20:24 Luglucky 阅读(128) 评论(0) 推荐(0) 编辑
摘要: ##最大流 (洛谷 3376) #include<cstdio> #include<algorithm> #include<vector> #include<queue> #include<map> #include<set> #include<iostream> #include<cstring> 阅读全文
posted @ 2020-08-20 22:36 Luglucky 阅读(157) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页