摘要: 传送门:http://codeforces.com/problemset/problem/321/E 【题解】 首先有一个$O(n^2k)$的dp。 # include <stdio.h> # include <string.h> # include <iostream> # include <al 阅读全文
posted @ 2017-07-10 23:18 Galaxies 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://codeforces.com/problemset/problem/603/E 【题目大意】 给出$n$个点,$m$个操作,每个操作加入一条$(u, v)$长度为$l$的边。 对于每次操作后,求出一个边集,使得每个点度数均为奇数,且边集的最大边最小。 $n \leq 10^5, 阅读全文
posted @ 2017-07-10 22:37 Galaxies 阅读(780) 评论(1) 推荐(0) 编辑
摘要: 【题目大意】 求有多少区间只包含1个出现次数为1的数。 $1\leq n \leq 5*10^5, 0 \leq a_i \leq 10^9$ 【题解】 考虑枚举右端点,设这个数上一次出现位置为pre[i],那么就是$[pre[i]+1,i]$区间加1,$[pre[pre[i]]+1, pre[i] 阅读全文
posted @ 2017-07-10 15:03 Galaxies 阅读(190) 评论(0) 推荐(0) 编辑