版本比较
【学习笔记】字符串
正文
增加 5 行删除 5 行
39 行未改动40414243444546474856 行未改动10510610710810911011111211372 行未改动1861871881891901911921931941951961971981992003 行未改动39 行未改动}}}}int main() {cin.tie(nullptr)->sync_with_stdio(false);cin >> t + 1;m = strlen(t + 1);init();56 行未改动int main() {cin.tie(nullptr)->sync_with_stdio(false);cin >> t + 1 >> s + 1;n = strlen(s + 1), m = strlen(t + 1);ansS[1] = n; // 注意这里!!!exKMP(s, s, n, n, ansS, ansS, 2);exKMP(s, t, n, m, ansS, ansT, 1);long long ans = 0;For(i, 1, n) ans ^= 1ll * i * (ansS[i] + 1);72 行未改动}int main() {cin.tie(nullptr)->sync_with_stdio(false);cin >> s + 1;n = strlen(s + 1);SA();For(i, 1, n) cout << sa[i] << ' ';cout << '\n';For(i, 1, n) cout << height[i] << ' ';cout << '\n';return 0;}```:::3 行未改动39 行未改动40414243444546474856 行未改动10510610710810911011111211372 行未改动1861871881891901911921931941951961971981992003 行未改动39 行未改动}}}}int main() {cin.tie(nullptr)->sync_with_stdio(false);cin >> t + 1;m = strlen(t + 1);init();56 行未改动int main() {cin.tie(nullptr)->sync_with_stdio(false);cin >> t + 1 >> s + 1;n = strlen(s + 1), m = strlen(t + 1);ansS[1] = n; // 注意这里!!!exKMP(s, s, n, n, ansS, ansS, 2);exKMP(s, t, n, m, ansS, ansT, 1);long long ans = 0;For(i, 1, n) ans ^= 1ll * i * (ansS[i] + 1);72 行未改动}int main() {cin.tie(nullptr)->sync_with_stdio(false);cin >> s + 1;n = strlen(s + 1);SA();For(i, 1, n) cout << sa[i] << ' ';cout << '\n';For(i, 1, n) cout << height[i] << ' ';cout << '\n';return 0;}```:::3 行未改动