ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1404. Easy to Hack!

1404
Posted by Nana (rau) 28 Jan 2008 00:18
#include <iostream.h>
#include <string.h>
void main()
{char a[102];
int b[100],i,n;
for (i=0;i<n;i++)
cin>>a;
for(i=0;i<n;i++)
{ b[i]= int(a[i]- 'a');
if(i==0){if(b[i]<5)
b[i]+=26;
cout<<char(b[i]-5+'a');}}
else  {if(b[i]<b[i-1]) b[i]+=26;
coun<<char(b[i]-b[i-1]+'a');}}
i don't understed where is my mistake
Re: 1404
Posted by Nurbek_[KTMU MANAS] 29 Oct 2008 16:53
Why you use n?