UFPE Starters Final Try-Outs 2020
Posted jhseng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UFPE Starters Final Try-Outs 2020相关的知识,希望对你有一定的参考价值。
题目很简单。差点10题,非常可惜。
A:
签到题+4不应该。
solver:lzh
1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef pair<int, int> pii; 4 typedef long long ll; 5 #define ff first 6 #define ss second 7 8 const int MAXSTRLEN = 500010; 9 int maxlen0 = 0, maxlen1 = 0; 10 char ch[2 * MAXSTRLEN]; 11 int p[2 * MAXSTRLEN]; 12 void manacher(char str[], int len) { 13 for (int i = 0; i < len; i++) { 14 ch[2 * i + 1] = ‘#‘; 15 ch[2 * i + 2] = str[i]; 16 } 17 ch[0] = ‘$‘; 18 ch[2 * len + 1] = ‘#‘; 19 ch[2 * len + 2] = ‘