上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 36 下一页
摘要: 大水题 cpp include include using namespace std; int n, du[100005], hea[100005], cnt, uu, vv; double dp[100005]; struct Edge{ int too, nxt; }edge[200005]; 阅读全文
posted @ 2018-01-22 19:02 poorpool 阅读(186) 评论(0) 推荐(0)
摘要: 把前缀和换成树状数组 cpp include include include using namespace std; int n, m, a[10005], b[20005], rem, cnt, sum[2100005], lson[2100005], rson[2100005], rot[10 阅读全文
posted @ 2018-01-22 15:42 poorpool 阅读(157) 评论(3) 推荐(0)
摘要: 倘若存在 1,那么答案是 $n cnt_1$。 否则,设最短的公约数为 1 的区间长度为 $minlen$,答案是 $minlen 1+n 1$。 cpp include include using namespace std; int n, ans, gcd[2005][2005], cnt; i 阅读全文
posted @ 2018-01-21 22:05 poorpool 阅读(170) 评论(0) 推荐(0)
摘要: 明确几点 1. 假设有串 ab,那么 a 后头必须是 b,b 前头必须是 a,否则就不是最频繁的了。 2. 不可成环,aba是非法的。 cpp include include include include using namespace std; int n, len, ru[35], chu[3 阅读全文
posted @ 2018-01-21 20:33 poorpool 阅读(227) 评论(0) 推荐(0)
摘要: 区间上有 $n$ 个点,问你为达到目的:长度为 $m$ 的区间内点的个数都 $ include include include include using namespace std; int n, m, k, a[200005], cnt; queue q; int main(){ cin n m 阅读全文
posted @ 2018-01-20 21:53 poorpool 阅读(214) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2018-01-20 21:13 poorpool 阅读(5) 评论(0) 推荐(0)
摘要: 把 里的 前面那个 去掉,终端就有高亮啦qwq!(然后source一下 然后 然后加入 (为什么不改 呢?我 WC 的时候发现自己并不能 QAQ) 然后把终端背景改个好看的。NOI Linux 下背景在 (差不多是这个位置) 如果是 Windows 的 gVim 再加入 前两行设置了字体。顺便,把配 阅读全文
posted @ 2018-01-20 20:56 poorpool 阅读(444) 评论(0) 推荐(0)
摘要: 模板题 cpp include include include include using namespace std; int n, m, hea[5005], cnt, uu, vv, ans; double e, ww, dis[5005]; const double eps=1e 7; bo 阅读全文
posted @ 2018-01-20 11:02 poorpool 阅读(202) 评论(0) 推荐(0)
摘要: 注意把书拆成两份 cpp include include include include using namespace std; int nb, nc, na, hea[40005], cnt, cur[40005], ss, tt, uu, vv, ww, maxFlow; int lev[40 阅读全文
posted @ 2018-01-19 19:58 poorpool 阅读(140) 评论(0) 推荐(0)
摘要: 注意一个景点只能去一次。 cpp include include include include include using namespace std; int n, m, xx[205], yy[205], hea[205], ss, tt, cnt, lev[205], maxFlow; co 阅读全文
posted @ 2018-01-19 15:57 poorpool 阅读(161) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 36 下一页