fork download
  1. program duskolo_2 (input, output);
  2. var metr, k, i, l, sum, f : integer;
  3. A : array [1..1000000] of integer;
  4. athr : array [1..1000000000000] of integer;
  5. begin
  6. readln(n);
  7. i:=1;
  8. while (not eoln) do begin readd(A[i]); i:=i+1 end;
  9. metr:=1;
  10. for k:=1 to i-1 do
  11. begin
  12. sum:=A[k];
  13. for l:=k+1 to i do
  14. begin
  15. sum:=sum+A[l];
  16. athr[metr]:=sum;
  17. metr:=metr+1
  18. end
  19. end;
  20. max:=athr[1];
  21. for f:=1 to metr-1 do if athr[f]>max then max:=athr[f];
  22. writeln(max)
  23. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas:4: error: size of array is too large
prog.pas: In main program:
prog.pas:6: error: undeclared identifier `n' (first use in this routine)
prog.pas:6: error:  (Each undeclared identifier is reported only once
prog.pas:6: error:  for each routine it appears in.)
prog.pas:8: error: undeclared identifier `readd' (first use in this routine)
prog.pas:16: error: undeclared identifier `athr' (first use in this routine)
prog.pas:20: error: too few arguments to `Max'
prog.pas:21: error: too few arguments to `Max'
prog.pas:21: error: too few arguments to `Max'
prog.pas:22: error: too few arguments to `Max'
stdout
Standard output is empty