Stay Hungry,Stay Foolish!

摘要: B. Kolya and Tandem Repeat https://codeforces.com/problemset/problem/443/B 思路 如果补充字符长度k大于等于s长度,则新的字符串,一份两半, 前半分包括s,可能包括部分补充的字符, 后半部分,则是完全的补充字符,可以完全匹配前 阅读全文
posted @ 2023-01-08 23:22 lightsong 阅读(30) 评论(0) 推荐(0) 编辑
摘要: C - Count Connected Components https://atcoder.jp/contests/abc284/tasks/abc284_c 思路 寻找独立的子连通图个数。 使用map记录边,即点之间的连通性 使用vector记录顶点是否被访问过 使用queue对任意未访问点做b 阅读全文
posted @ 2023-01-08 18:01 lightsong 阅读(32) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel