# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168079 | HungAnhGoldIBO2020 | Palindromes (APIO14_palindrome) | C++14 | 617 ms | 101992 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.
/*
abacaba
*/
#include<bits/stdc++.h>
#define int long long
#define hash hash1
using namespace std;
const int N=3e5+4;
const int mod=1610612741;
const int base=39;
int hash[N],rev_hash[N],mul[N],max1=1,sum[N];
map<int,int> cnt;
int gethash(int l,int r){
return (hash[r]-(hash[l-1]*mul[r-l+1])%mod+mod)%mod;
}
int gethash_rev(int l,int r){
return (rev_hash[l]-(rev_hash[r+1]*mul[r-l+1])%mod+mod)%mod;
}
struct node{
int nxt[26],len,suf;
};
node Eer[N];
int sz=0,lst;
string s;
void add(int idx){
// cout<<idx<<" BEGIN"<<endl;
int cha=(s[idx]-'a');
while(idx-Eer[lst].len-1<0||s[idx]!=s[idx-Eer[lst].len-1]){
lst=Eer[lst].suf;
}
Compilation message (stderr)
# | 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... |