正文
增加 1 行删除 1 行
41 行未改动4243444546474849508 行未改动41 行未改动ios::sync_with_stdio(0);cin.tie(0);cin >> s;t = "^#";for(auto ch : s) t += ch, t += '#';t += '$';int n = t.size(), r = 0, c = 0, ans = 0;for(int i = 1; i < n - 1; i++){p[i] = (i < r) ? min(r - i, p[c * 2 - i]) : 0;8 行未改动41 行未改动4243444546474849508 行未改动41 行未改动ios::sync_with_stdio(0);cin.tie(0);cin >> s;t = "^#";for(auto ch : s) t += ch, t += '#';t += '$';int n = t.size(), r = 0, c = 0, ans = 0;for(int i = 1; i < n - 1; i++){p[i] = (i < r) ? min(r - i, p[c * 2 - i]) : 0;8 行未改动