摘要:
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) t 阅读全文
摘要:
import java.util.HashSet; import java.util.Set; class Solution { public long distinctNames(String[] ideas) { int[][] cnt = new int[26][26]; boolean[][ 阅读全文
摘要:
class Solution { public int minFlipsMonoIncr(String s) { int len = s.length(); int[][] dp = new int[len][2]; if (s.charAt(0) == '0') { dp[0][0] = 0; d 阅读全文
摘要:
import java.util.Arrays; class Solution { public int numSubseq(int[] nums, int target) { Arrays.sort(nums); int len = nums.length; long ans = 0l; for 阅读全文
摘要:
class Solution { public int minEatingSpeed(int[] piles, int h) { int ans = 0; int low = 1; int high = 1000000001; while(low<high){ int mid = ( low +hi 阅读全文
摘要:
class Solution { public static void main(String[] args) { Solution solution = new Solution(); int ans = solution.videoStitching(new int[][]{ {8,10},{1 阅读全文
摘要:
//只需要考虑前6位的状态,i这种状态和i+6这个状态是一样的import java.util.ArrayDeque; import java.util.Arrays; import java.util.HashSet; class Solution { public static void mai 阅读全文
摘要:
class MyCalendarThree { private TreeMap<Integer, Integer> cnt; public MyCalendarThree() { cnt = new TreeMap<Integer, Integer>(); } public int book(int 阅读全文