# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
367261 | Bill_00 | 회문 (APIO14_palindrome) | C++14 | 192 ms | 110220 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |