$$ \newcommand{\seq}[2]{{#1}_{1},{#1}_{2},\cdots,{#1}_{#2}} \newcommand{\num}[1]{1,2,\cdots,#1} \newcommand{\stra}[2]{\begin{bmatrix}#1 \\ #2\end{bmatrix}} \newcommand{\strb}[2]{\begin{Bmatrix}#1 \\ #2\end{Bmatrix}} \newcommand{\dw}[1]{\underline{#1}} \newcommand{\up}[1]{\overline{#1}} $$
摘要: 1138 B 题意 给你两个01串 $a,b$ ,现在要选择 $n/2$ 个 $i$ 组成一个集合 $S$ ,使得 $\sum_{i\in S}a[i]=\sum_{j∉S}b[j]$ 。 $(2\le n\le 1500)$ Examples inputCopy 4 0011 0101 outpu 阅读全文
posted @ 2019-03-08 21:05 chc_1234567890 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1105 E 题意 给你 $k$ 段区间,每段中有 $a_i$ 个朋友(可能有相同的),在每一段区间内你只能让一个朋友看你的资料,一个朋友开心的条件是每一次他要看你的资料时都能看到,问你最多能让几个朋友开心。 朋友数 $\le 40$ Examples input 5 3 1 2 motarack 阅读全文
posted @ 2019-03-08 21:05 chc_1234567890 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1111 B 题意 有 $n$ 个人,每个人有一个属性 $a_i$ ,现在你可以进行 $m$ 次操作,每次你可以踢掉一个人或者将一个人的水平值+1,每个人最多加 $k$ 次,问最大可能的平均属性值。 $(1\le n\le 10^5)$ Examples input 2 4 6 4 7 output 阅读全文
posted @ 2019-03-08 21:04 chc_1234567890 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1013 B 题意 给你一个 $a$ 数组和一个整数 $x$ ,每次你可以把一个 $a_i$ 按位与上 $x$ ,问最少操作几次使得数组中存在相同元素 $(n,a_i\le 10^5)$ Examples input 4 3 1 2 3 7 output 1 input 2 228 1 1 outp 阅读全文
posted @ 2019-03-08 21:03 chc_1234567890 阅读(334) 评论(0) 推荐(0) 编辑