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 1446. Sorting Hat

What's the WA???????????????/
Posted by Reset 29 Dec 2006 09:30
it must work, but WA test 1?

type elem=record name:string;fuck:string;end;
var a:array[1..1000]of elem;
n,i:word;
begin
readln(n);
for i:=1 to n do
     begin
     readln(a[i].name,a[i].fuck);
     end;
writeln('Slytherin:');
for i:=1 to n do
if a[i].fuck='Slytherin' then writeln(a[i].name);
writeln('');

writeln('Hufflepuff:');
for i:=1 to n do
if a[i].fuck='Hufflepuff' then writeln(a[i].name);

writeln('');
writeln('Gryffindor:');
for i:=1 to n do
if a[i].fuck='Gryffindor' then writeln(a[i].name);

writeln('');
writeln('Ravenclaw:');
for i:=1 to n do
if a[i].fuck='Ravenclaw' then writeln(a[i].name);

end.
Re: What's the WA???????????????/
Posted by {AESC USU} Dembel 29 Dec 2006 10:42
8th line is wrong.  (readln(a[i].name,a[i].fuck);)
need two line
   readln(a[i].name);
   readln(a[i].fuck);

Please delete your code.

Edited by author 29.12.2006 10:44
Re: What's the WA???????????????/
Posted by brain_rus_13 [UFU SESC bash.org/I'ja] 21 Oct 2013 15:00
1
aaaaaa bbbbb
Gryffindor

Edited by author 21.10.2013 15:02