fork download
  1. main =>
  2. RES = 0,
  3. NUM = 10,
  4. SIZE = 100,
  5. ARR = new_array(100,100),
  6. foreach(I in 1..SIZE)
  7. foreach(J in 1..SIZE)
  8. ARR[I,J]:=0
  9. end
  10. end,
  11.  
  12. KOCH = read_int(),
  13. foreach(I in 1..KOCH)
  14. L = read_int(),
  15. R = read_int(),
  16. L:= L+51, R:=R+51,
  17. ARR[L,R]:=1
  18. end,
  19.  
  20. foreach(I in 1..NUM)
  21. IT1 = 1,
  22. IT2 = 2,
  23. QX = new_array(50), QY = new_array(50),
  24. QX[1] = 51, QY[1] = 51,
  25. while(IT1<=IT2)
  26. X = QX[IT1], Y = QY[IT1],
  27. ARR[X,Y]:=I+10,
  28. RES:=max(RES, abs(X-51)+abs(Y-51)),
  29. if (ARR[X+I,Y]!=0) then
  30. if (ARR[X+I,Y]!=I+10) then
  31. QX[IT2]:= X+I, QY[IT2]:= Y,
  32. IT2:= IT2+1
  33. end
  34. end,
  35. if (ARR[X-I,Y]!=0) then
  36. if (ARR[X-I,Y]!=I+10) then
  37. QX[IT2]:= X-I, QY[IT2]:= Y,
  38. IT2:= IT2+1
  39. end
  40. end,
  41. if (ARR[X,Y+I]!=0) then
  42. if (ARR[X,Y+I]!=I+10) then
  43. QX[IT2]:= X, QY[IT2]:= Y+I,
  44. IT2:= IT2+1
  45. end
  46. end,
  47. if (ARR[X,Y-I]!=0) then
  48. if (ARR[X,Y-I]!=I+10) then
  49. QX[IT2]:= X, QY[IT2]:= Y-I,
  50. IT2:= IT2+1
  51. end
  52. end,
  53.  
  54. IT1:=IT1+1
  55. end
  56. end,
  57. print(RES)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError:   File "prog.py", line 1
    main =>
          ^
SyntaxError: invalid syntax

stdout
Standard output is empty