摘要:
类似0-1背包问题 我这里将附物品看作可以改变主物品价值和价格的一个物品,也就是一个主物品拥有多组价值和价格 import java.util.*; public class Main{ public static void main(String[] args){ Scanner in = new 阅读全文
摘要:
char 转 int 的两种方法 1 public class Hello { 2 public static void main(String[] args) { 3 char chNum = '9'; 4 int a = (int)(chNum - '0'); 5 int b = Charact 阅读全文
摘要:
记录一下每日一题。 // 1 class Solution { 2 public boolean isCovered(int[][] ranges, int left, int right) { 3 int[] tags = new int[51]; 4 for(int i = 0; i < 51; 阅读全文
摘要:
常规二分 class Solution { public int[] searchRange(int[] nums, int target) { if(nums == null || nums.length < 1){ return new int[]{-1,-1}; } int[] res = n 阅读全文