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 1581. Teamwork

Why Error №1 ?
Posted by Kirill 22 Feb 2009 17:44
Please, help.

var A,I,b,Top:integer;
Na,Nb:array[1..1000]of integer;
procedure OneNumber;
begin
Nb[1]:=1;
Readln(Nb[2]);
Top:=2;
end;
begin
readln(a);
if a=1 then OneNumber else begin
for i:=1 to A do
  readln(Na[i]);
B:=1;
Top:=1;
for i:=2 to A do
  if NA[i]=NA[i-1] then begin inc(b);  if i=a then begin
   Nb[Top]:=b;inc(Top);Nb[Top]:=Na[i];end;end else
   begin Nb[Top]:=b;inc(top);NB[Top]:=Na[i-1];inc(Top);B:=1;
   if i=a then begin
   Nb[Top]:=b;inc(Top);Nb[Top]:=Na[i];
   end;end;end;
for i:=1 to Top do
  write
  (Nb[i]);
end.