fork download
  1. program parkour;
  2. const
  3. MAXN = 800;
  4. MAXM = 800;
  5. var
  6. M, N, i,j : LongInt;
  7. level : Array[0..MAXN-1,0..MAXM-1] of char;
  8.  
  9. begin
  10. {
  11.   uncomment the two following lines if you want to read/write from files
  12.   assign(input, 'input.txt'); reset(input);
  13.   assign(output, 'output.txt'); rewrite(output);
  14. }
  15.  
  16. ReadLn(N, M);
  17.  
  18. for i := 0 to N-1 do
  19. for j:=0 to M-1 do level[i,j] := '.';
  20. if M<N then writeln(-1)
  21. else
  22. begin
  23. for i := 1 to N-1 do
  24. level[i,i-1] := '#';
  25. for i := 0 to N-1 do
  26. begin
  27. for j:=0 to M-1 do write(level[i,j]);
  28. writeln;
  29. end;
  30. end;
  31. end.
  32.  
Success #stdin #stdout 0s 5284KB
stdin
3 3
stdout
...
#..
.#.