Submission #367261

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3672612021-02-16 17:27:39Bill_00회문 (APIO14_palindrome)C++14
100 / 100
192 ms110220 KiB
#include <bits/stdc++.h>
#define NN 300000
#define pb push_back
typedef int ll;
using namespace std;
long long ans;
int w=0;
int b[20][NN];
struct pal{
ll cnt;
pal *a[26];
ll h;
ll id;
}*root=new pal(),*root1=new pal();
pal *u,*ptr[NN],*p[NN];
void ins(pal *rt,ll k){
if(rt->a[k]==NULL){
rt->a[k]=new pal();
(rt->a[k])->h=(rt->h)+1;
rt->a[k]->id=++w;
b[0][w]=rt->id;
for(int i=1;i<20;i++){
b[i][w]=b[i-1][b[i-1][w]];
}
p[w]=rt->a[k];
}
u=rt->a[k];
}
int solve(pal *rt,ll length,bool b){
for(ll i=0;i<26;i++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...