Submission #997422

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9974222024-06-12 09:42:34vjudge1Palindromes (APIO14_palindrome)C++17
0 / 100
40 ms44524 KiB
#include <bits/stdc++.h>
using namespace std;
int const N=3e5+5;
struct Node
{
int len;
int start,end;
int child[26]={0};
int suffix;
};
Node root1,root2;
Node tree[N];
long long cnt[N];
int curnode,ptr;
string s;
void insert_char(int k){
// cout<<k<<endl;
int tmp=curnode;
while(!(k-tree[tmp].len>=1 && s[k]==s[k-(tree[tmp].len+1)]))
tmp=tree[tmp].suffix;
if(tree[tmp].child[s[k]-'a']!=0){
curnode=tree[tmp].child[s[k]-'a'];
return;
}
ptr++;
tree[tmp].child[s[k]-'a']=ptr;
tree[ptr].len=tree[tmp].len+2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...