# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
16468 | jihoon | Make superpalindrome! (kriii1_M) | C++98 | 0 ms | 2448 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<cstdio>
#include<string.h>
char str[100005];
int n;
int same[100002];
int core[100002];
int bunho[100002];
char lst[100002];
bool onlyz=true;
int main(){
int ee,cnt=0,cnt2=0,i;
scanf("%s",str);
n=(int)strlen(str);
for(i=0;i<n;i++){
onlyz=onlyz & (str[i]=='z');
}
if(onlyz){
for(i=0;i<=n;i++){
printf("a");
}
}else{
ee=n-1;
str[ee]++;
while(str[ee]==('z'+1)){
str[ee]='a';
ee--;
str[ee]++;
}
ee=n-1;
while(1){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |