直接暴力解法,用List模拟整个过程 import java.util.*; public class Solution { /** * * @param n int整型 * @param m int整型  ...