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 1880. Psych Up's Eigenvalues

WA TEST#1
Posted by fotol 3 Jun 2013 20:24
program sdf;
var n,n1,n2,n3,i,i1,i2,k,a:integer;
m,m1,m2,e:array[1..1000 ] of integer;
begin
    k:=1;
readln(n1);
For i:=1 to n1 do readln(m[i]);
readln(n2);
For i:=1 to n2 do readln(m1[i]);
readln(n3);
For i:=1 to n3 do readln(m2[i]);
For i:=1 to n1 do
for i1:=1 to n2 do
for i2:=1 to n3 do begin
if (m[i]=m1[i1]) and (m1[i1]=m2[i2]) and (m[i]+m1[i1]+m[i2]<>-3) Then begin
                                          e[k]:=m[i];
                                          k:=k+1;
                                          m[i]:=-1;
                                             m1[i1]:=-1;
                                             m2[i2]:=-1;
                                             end;
 end;


For i:=1 to k do begin
for i1:=i+1 to k do begin
if e[i]=e[i1] Then e[i1]:=-1;
end;
end;
For i:=1 to k-1 do begin
if e[i]<>-1 Then a:=a+1;
end;
writeln(a);
end.
 в ЧЕМ ошибка?
Re: WA TEST#1
Posted by Alena Fedorova 20 Jan 2014 21:13
почитай руководство. возможно, ошибка лишь в том, что написал "program sdf;".
Re: WA TEST#1
Posted by 146110PavelMok 9 Oct 2014 17:47
ставь read, а не readln