fork download
  1. program ideone;
  2. var a,b:array[0..3] of integer;
  3. i,j:integer;
  4. f:boolean;
  5. begin
  6. assign(input,'input.txt');reset(input);
  7. assign(output,'output.txt');rewrite(output);
  8. readln(a[1],a[2],a[3]);
  9. readln(b[1],b[2],b[3]);
  10. for i:=1 to 2 do
  11. for j:=1 to 2 do
  12. begin
  13. if a[j]>a[j+1] then
  14. begin
  15. a[0]:=a[j];a[j]:=a[j+1];a[j+1]:=a[0]
  16. end;
  17. if b[j]>b[j+1] then
  18. begin
  19. b[0]:=b[j];b[j]:=b[j+1];b[j+1]:=b[0]
  20. end;
  21. end;
  22. f:=false;
  23. for i:=1 to 3 do
  24. if a[i]<>b[i] then f:=true;
  25. if (not f) then begin writeln('Boxes are equal');halt end;
  26. f:=false;
  27. for i:=1 to 3 do
  28. if (a[i]<b[i]) then f:=true;
  29. if (not f) then begin writeln('The first box is larger than the second one');halt end;
  30. f:=false;
  31. for i:=1 to 3 do
  32. if (a[i]>b[i]) then f:=true;
  33. if (not f) then begin writeln('The first box is smaller than the second one');halt end;
  34. writeln('Boxes are incomparable');
  35. close(output)
  36. end.
Runtime error #stdin #stdout #stderr 0s 4532KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Runtime error 2 at $00000000004010FE
  $00000000004010FE