2023-06-23から1日間の記事一覧

アルゴリズムと数学 074

https://atcoder.jp/contests/math-and-algorithm/tasks/math_and_algorithm_bhこれも数え方の問題ですね。の係数は1がi-1個、-1が(N-i)個なので、合わせて重みは(2i-N-1)となります。 // Sum of difference Easy #![allow(non_snake_case)] ///////////////…