ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1067. Структура папок

My program works well on my own computer with Free Pascal IDE 2.2.0. But when I submitted it, it got 'Compilation error'. I'm really confused. Could someone help me? Thanks.
check is "uses" in your program
I didn't use any 'uses'...
Here is my program:

var
 s,f: array [0..500] of string;
 i,j,k,n,t: longint;
 tmp: string;

function compare(var a,b: string): boolean;
var i: longint;
begin
 i:=0;
 while (i<length(a)) and (i<length(b)) do begin
  inc(i);
  if (a[i]='\') and (b[i]<>'\') then begin
   compare:=false; exit;
  end;
  if (a[i]<>'\') and (b[i]='\') then begin
   compare:=true; exit;
  end;
  if a[i]<b[i] then begin
   compare:=false; exit;
  end
  else if a[i]>b[i] then begin
   compare:=true; exit;
  end;
 end;
 if i=length(a) then compare:=false
                else compare:=true;
end;

function check(var s: string): longint;
begin
 check:=1;
 while (f[check]<>'') and ((f[check]+'\')=copy(s,1,length(f[check])+1)) do begin
  delete(s,1,length(f[check])+1); inc(check);
 end;
end;

begin
 readln(n);
 for i:=1 to n do readln(s[i]);
 for i:=1 to n-1 do
  for j:=i+1 to n do
   if compare(s[i],s[j]) then begin
    tmp:=s[i]; s[i]:=s[j]; s[j]:=tmp;
   end;
 for i:=1 to n do begin
  k:=check(s[i]);
  while s[i]<>'' do begin
   t:=pos('\',s[i]);
   if t=0 then begin
    s[i]:=s[i]+'\'; t:=length(s[i]);
   end;
   f[k]:=copy(s[i],1,t-1);
   for j:=1 to k-1 do write(' ');
   writeln(f[k]); inc(k);
   delete(s[i],1,t);
  end;
 end;
end.