online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
def main(): def check(sr,sc): from collections import deque queue=deque([(sr,sc,maze[sr][sc])]) maze[sr][sc]=(10**9)#代表拜訪過 count=0 while queue: count+=1 sr,sc,now=queue.popleft() for cr,cc in [(0,1),(0,-1),(1,0),(-1,0)]: nr,nc=sr+cr,sc+cc if 0<=nr<row and 0<=nc<col: t=maze[nr][nc] if -2<=(now-t)<=2:#(abs(now-t)<=2) queue.append((nr,nc,t)) maze[nr][nc]=(10**9)#代表拜訪過 return count import sys from array import array input=sys.stdin.readline row=col=int(input()) sr,sc=map(int,input().split()) maze=[array('i',map(int, input().split())) for _ in range(row)] print(check(sr,sc)) main()

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue