|
|
вернуться в форумI'm good with you (C++ ->AC<-):) #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> int i,u,n,minus,v[128],aux,auxs; char st[128],auxx; int main() { #ifndef ONLINE_JUDGE freopen("1404.in","r",stdin); freopen("1404.out","w",stdout); #endif scanf("%s",st); u=strlen(st); for(i=0;i<u;i++) v[i]=(int)(st[i])-'a'; for(i=0;i<u;i++) { if(i==0) v[i]+=26; else while(v[i]<v[i-1]) v[i]+=26; } minus=5; for(i=0;i<u;i++) { auxs=st[i]-st[i]+(v[i]-minus)%26+'a'; printf("%c",auxs); minus=v[i]; } return 0; } Re: I'm good with you (C++ ->AC<-):) please stop post AC code. read FAQ. It is wrong to post AC code. if somebody asks you to help, then you can give him some hints. it is all. |
|
|