Soohの嘆き呟き

競プロ解説記事をかくぞ。

2021-09-05から1日間の記事一覧

Codeforces Educational Round 111 D - Excellent Arrays

問題 codeforces.com 解法 1-indexedで扱う. N は 配列のサイズである.B_i = A_i - i と定義する. A_i + A_j = i + j は B_i = -B_j と書き換えられる.L F(a)の最大値を達成するのはどんな時かを考えると,B_i = x となる i が floor(N/2) 個あり、B_i = -x …

Codeforces Educational Round 111 D - Excellent Arrays

s00h.hatenablog.com に移植しました