摘要:
import java.io.IOException; import java.util.Scanner; public class Main { static int MOD = 1000000007; public static void main(String[] args) throws I 阅读全文
摘要:
class Solution { int[] parent; int[] rank; public void init(int n) { parent = new int[n + 1]; rank = new int[n + 1]; for (int i = 1; i <= n; i++) { pa 阅读全文
摘要:
//空间可以降到2维class Solution { private int MOD= 1000000007; public int profitableSchemes(int n, int minProfit, int[] g, int[] profit) { int len = profit.l 阅读全文
摘要:
import java.util.HashMap; import java.util.Map; /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeN 阅读全文
摘要:
class BookMyShow { long[] sum ; long[] max; int n; int m; int last = -1; int ans = 0; public static void main(String[] args) { BookMyShow bookMyShow = 阅读全文
摘要:
import java.util.*; class Solution { public int cutOffTree(List<List<Integer>> forest) { int m = forest.size(); int n = forest.get(0).size(); int[][][ 阅读全文