# 归档 2017年5月7日

## LeetCode Weekly Contest 31解题报告 作者是 在线疯狂 发布于 2017年5月7日 在 LeetCode.

LeetCode Weekly Contest 31是LeetCode举办的第三十六场正式周赛，共4道题目，比赛时长1.5小时。

LeetCode 575. Distribute Candies

LeetCode 572. Subtree of Another Tree

LeetCode 573. Squirrel Simulation

LeetCode 576. Out of Boundary Paths

## 题目描述：

LeetCode 576. Out of Boundary Paths

There is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in ...

## 题目描述：

LeetCode 573. Squirrel Simulation

There's a tree, a squirrel, and several nuts. Positions are represented by the cells in a 2D grid. Your goal is to find the minimal distance for the squirrel to collect all the nuts and ...

## 题目描述：

LeetCode 572. Subtree of Another Tree

Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists ...

## 题目描述：

LeetCode 575. Distribute Candies

Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these candies equally in ...