yosupo06 / library-checker-problems

The problem data (Test case generator, judge's solution, task, ...) of Library Checker
https://judge.yosupo.jp/
Apache License 2.0
510 stars 117 forks source link

[問題案] Frequency Table of Tree Distance #292

Closed yosupo06 closed 4 years ago

yosupo06 commented 4 years ago

問題ID: {ID} 問題名: {名前}

問題概要

木が与えられます。各頂点対(i, j)について、dist(i, j)を求めて、各K = 0,1,...,N-1について、dist(i, j) = Kとなるペアがいくつあるか数える

入力

出力

制約

N <= 100,000?200,000?

検討

hos-lyric commented 1 year ago

メモ:https://judge.yosupo.jp/submission/48554https://atcoder.jp/contests/abc312/tasks/abc312_g のサンプル 2 で落ちた (たぶん配列サイズ) ケースを足すかもしれません (実際に RE 起こす条件はよくわかってないので適当に……)