Home > other >  Shorten the time
Shorten the time

Time:10-26

N, M=map (int, input (). The split ())
A=[]
K=int (input ())
For I in range (M * N) :
A=list (map (int, input (). The split ()))
A.a ppend (a)
K1 key=A=[k] [1]
J=k
In the range for n (n - 1) :
S=0
While sIf j==M:
J=0
The else:
If A + M * n [j] [0]==1:
J +=1
S +=1
The else:
J +=1
S=s
J=j - 1
K1=A + M * (n + 1) [j] [1]
The key +=k1
Print (key)


On the oj has extraordinary repeatedly
For bosses to help me to shorten running time
  • Related