python 2.7 第一题 bfs W, L = map(int, raw_input().strip().split(' &(5528)#39;))  arr = [] nL = L  while nL:     row = map(int, raw_input().strip().split(' &(5528)#39;))     arr.append(row)      nL -= 1  mask = [[0]* W for _ in range(L)] res = 0  for i in range(L):     for j in range(W):         if mask[i][j] == 0 and arr[i][j]:              volume = 0              queue = [(i,j)]             mask[i][j] = 1              while queue:                 node = queue.pop(0)                 volume += arr[node[0]][node[1]]                 for d in [[-1,0],[1,0],[0,-1],[0,1]]:                     nr, nc = node[0] + d[0], node[1] + d[1]                     if nr > -1 and nr < L and nc > - 1 and nc < W and mask[nr][nc] == 0 and arr[nr][nc]:                         queue.append((nr,nc))                         mask[nr][nc] = 1              res = max(volume, res) print(res)