# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
748646 | mariowong | Palindromic Partitions (CEOI17_palindromic) | C++14 | 1934 ms | 19032 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define hmod (long long)99999989
using namespace std;
int t,n,l,r,anss;
long long a[1000005],sum;
string s;
long long fpow(long long a,long long b){
long long ans=1,base=a;
while (b > 0){
if ((b&1) == 1) ans=ans*base%hmod;
base=base*base%hmod;
b/=2;
}
return ans;
}
int main(){
ios::sync_with_stdio(false);
cin >> t;
while (t--){
cin >> s; n=s.length();
sum=1;
for (int i=0;i<n;i++){
a[i]=(s[i]-'a')*sum;
a[i]+=a[i-1];
a[i]%=hmod;
sum*=26; sum%=hmod;
}
l=0; r=n-1; anss=0;
for (int i=0;i<n;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... |