Page 2 of 3
Posted: Sat Oct 16, 2004 4:43 pm
by Qbens
3. Change
for
I didn't noticed it at firs time ;]
Posted: Sat Dec 04, 2004 11:49 am
by idaydream
I am not sure why you are getting PE but somethings are wrong in your code.
you defined same thing twice and you are missing the space ' ' char.
Posted: Sun Dec 05, 2004 1:09 am
by Antonio Ocampo
Somethings are wrong in your code. For example, for the sample input the output must be "how are you" and your output is "how are Iou" without end of line
You are missing the uppercase letters and the end of line.
By the way, I don't know why your code got P.E. instead of WA
Posted: Sun Dec 05, 2004 1:17 am
by Antonio Ocampo
Somethings are wrong in your code. For example, for the sample input the output must be "how are you" and your output is "how are Iou" without end of line
You are missing the uppercase letters and the end of line.
By the way, I don't know why your code got P.E. instead of WA
10222
Posted: Fri Jan 21, 2005 5:52 pm
by Ali Arman Tamal
Hello everyone !!
I've seen a couple of posts about 10222 and some of them are pretty misguiding !!
I've got AC at a single submission

, and allow me to remove all confusion:
1. There is no input like 'q' or 'z' for which you will have to rotate and take ']' or '/'.
There will be no merginal input. The leftmost possible input is 2, e , d , c and just replace them with `(tlide), q , a, z . You don't have to consider any other character from left.
2. Your output will not contain any UPPERCASE character.
See the judge input:
k[r dyt I[o
Output:
how are you
As you can see, the judge input contains a charcter 'I' which is replaced by 'y' NOT 'Y'.
So, all you have to do is - if you encounter any UPPERCASE character just consider them lowercase and replace them as usual.
3. There is no <SHIFT> operation. You don't have to replace * with ^ . I doubt there is any input like this, but just don't consider any <SHIFT> and you will get AC in no time.
Hope this helps you !!
THANK YOU VERY MUCH !!!
10222
Posted: Mon Oct 03, 2005 7:40 pm
by mohsincsedu
May be it's a easy problem!!!
But i got WA
What's the problem
Code: Select all
#include<stdio.h>
#include<ctype.h>
int main()
{
char kb[400];
kb['e'] = 'q';kb['r'] = 'w';kb['t'] = 'e';kb['y'] = 'r';kb['u'] = 't';kb['i'] = 'y';kb['o'] = 'u';kb['p'] = 'i';kb['['] = 'o';kb[']'] = 'p';kb['\\'] = '[';
kb['d'] = 'a';kb['f'] = 's';kb['g'] = 'd';kb['h'] = 'f';kb['j'] = 'g';kb['k'] = 'h';kb['l'] = 'j';kb[';'] = 'k';kb['\''] = 'l';kb['\n'] = ';';
kb['c'] = 'z';kb['v'] = 'x';kb['b'] = 'c';kb['n'] = 'v';kb['m'] = 'b';kb[','] = 'n';kb['.'] = 'm';kb['/'] = ',';
kb['2'] = '`';kb['3'] = '1';kb['4'] = '2';kb['5'] = '3';kb['6'] = '4';kb['7'] = '5';kb['8'] = '6';kb['9'] = '7';kb['0'] = '8';kb['-'] = '9';kb['='] = '0';kb['\\'] = '-';
char input[3000];
int i = 0;
char ch;
gets(input);
while(input[i])
{
if(isalpha(input[i]))
{
ch = tolower(input[i]);
}
else
ch = input[i];
putchar(kb[ch]);
i++;
}
printf("\n");
return 0;
}
Plz help me!!!!!!!!!!
Posted: Sun Oct 23, 2005 10:18 pm
by mohsincsedu
I got Acc!!!
10222
Posted: Sat Dec 23, 2006 1:12 pm
by TripShock
Can anyone find any error in this code? It compiles fine in gcc but the oj flags compile error: parse error b4 character 0222
AC
Posted: Sun Dec 24, 2006 1:47 am
by Spykaj
This code get accepted

!!!
Posted: Sun Dec 24, 2006 10:25 pm
by TripShock
strange! the first time i tried it gave compile error! thnx for your time nyways!
Re: 10222 - Decode the Mad Man
Posted: Sun Oct 26, 2008 6:20 pm
by f.a.reza
what's the wrong with my code?
constantly getting wa.....
Code: Select all
#include<stdio.h>
int main()
{
char n;
while(scanf("%c",&n)==1)
{
if(n=='e'||n=='E')printf("q");
else if(n=='r'||n=='R')printf("w");
else if(n=='t'||n=='T')printf("e");
else if(n=='y'||n=='Y')printf("r");
else if(n=='u'||n=='U')printf("t");
else if(n=='i'||n=='I')printf("y");
else if(n=='o'||n=='O')printf("u");
else if(n=='p'||n=='P')printf("i");
else if(n=='['||n=='{')printf("o");
else if(n==']'||n=='}')printf("p");
else if(n=='d'||n=='D')printf("a");
else if(n=='f'||n=='F')printf("s");
else if(n=='g'||n=='G')printf("d");
else if(n=='h'||n=='H')printf("f");
else if(n=='j'||n=='J')printf("g");
else if(n=='k'||n=='K')printf("h");
else if(n=='l'||n=='L')printf("j");
else if(n==';')printf("k");
else if(n==39)printf("l");
else if(n=='c'||n=='C')printf("z");
else if(n=='v'||n=='V')printf("x");
else if(n=='b'||n=='B')printf("c");
else if(n=='n'||n=='N')printf("v");
else if(n=='m'||n=='M')printf("b");
else if(n==',')printf("n");
else if(n=='.')printf("m");
else if(n=='Z'||n=='z')printf("/");
else if(n=='x'||n=='X')printf(".");
else if(n=='a'||n=='A')printf(";");
else if(n=='S'||n=='s')printf("'");
else if(n=='q'||n=='Q')printf("(");
else if(n=='W'||n=='w')printf(")");
else if(n==' ')printf(" ");
}
return 0;
}
Re: 10222 - Decode the Mad Man
Posted: Thu Feb 26, 2009 5:54 pm
by vahid sanei
you can use while(getline(cin,s)) , where "s" is a string .
inputs aren`t "q ,a, z, w, s ,x"

Re: 10222 - Decode the Mad Man
Posted: Mon May 18, 2009 10:02 pm
by LucasSchm
Can someone tell me why i get PE with this code:
Thanks
Re: 10222 - Decode the Mad Man
Posted: Mon Nov 09, 2009 9:49 pm
by nhrahi
"2, e , d , c and just replace them with `(tlide), q , a, z . You don't have to consider any other character from left."
hey,everyone. This question seems to confuse everybody.So,thanx to Ali Arman bhai who has removed all the questions.I just want to make a small addition that we dont need to have any digits here.So,`1234567890-= all this will not be considered input.
Happy problem solving.
Thanx.
Re: 10222 - Decode the Mad Man
Posted: Wed Nov 11, 2009 7:31 pm
by noor_aub
If input in 1234567890-= then what will be output
Should I print a newline.