Question Link →
Solution Link → https://atcoder.jp/contests/abc245/submissions/30490729
This message is for follow up on the comments