首页 > TAG信息列表 > painters

Codeforces 1548E Gregor and the Two Painters

题目链接 Codeforces 1548E Gregor and the Two Painters 题目大意 有两个序列 \(\{a\}\) 和 \(\{b\}\),长度分别为 \(n\) 和 \(m\),由此构造 \(n\times m\) 的网格,\((i,j)\) 处的权值为 \(a_i+b_j\),称格子 \((i,j)\) 是坏的若格子的权值 \(\leq X\)。求图中坏格子的连通块数量。 \(

【CF1548E】Gregor and the Two Painters

题目 题目链接:https://codeforces.com/contest/1548/problem/E 一个 \(n\times m\) 的网格,其中 \((i,j)\) 的权值为 \(a_i+b_j\)。 把所有权值不超过 \(X\) 的格子全部染成白色,大于 \(X\) 的染成黑色,求最后白色连通块的数量。 \(n,m,X,a_i,b_i\leq 2\times 10^5\)。 思路 基本上就

CodeForces-1132C-Painting the Fence-(前缀和)

You have a long fence which consists of nn sections. Unfortunately, it is not painted, so you decided to hire qq painters to paint it. ii-th painter will paint all sections xx such that li≤x≤rili≤x≤ri. Unfortunately, you are on a tight budget, so y

CodeForces-1132C Painting the Fence

题目链接 https://vjudge.net/problem/CodeForces-1132C 题面 Description You have a long fence which consists of \(n\) sections. Unfortunately, it is not painted, so you decided to hire \(q\) painters to paint it. \(i\)-th painter will paint all sections \(