第一题 暴力即可,要用long,另外判断的时候要O(1)第二题 dfs 25第三题 dp public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return int整型 */ long mod = (int)1e9 + 7; public int cntOfTrees (int n) { // write code here if (n % 2 == 0) return 0; else if (n <= 3) return 1; long [] dp = new...