09 2020 档案
摘要:package com.shence; import org.junit.Test; import java.util.*; public class Solution { class TreeNode { int val; TreeNode(int val) { this.val = val; }
阅读全文
摘要:import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { private static final String REGEX = "[0-9a-z]{
阅读全文
摘要:第三题 package sougo; import org.junit.Test; import java.util.*; public class Main01 { class Interval { int start; int end; Interval(int start, int end)
阅读全文
摘要:1、并查集2、交叉链表求交点 import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Main3 { static int
阅读全文
摘要:import java.util.*; public class Main { static boolean[] used ; static int res; static void dfs(List<Integer>[] g, Map<Integer, Map<Integer,Integer>>
阅读全文
摘要:多组数据,第1行有1个正整数T,表示有T组数据。(T<=100) 对于每组数据,第1行有两个整数N和M。(1<=N, M<=1000) 接着N行,每行有一个长度为M的字符串,表示N*M的迷宫。 输出一个整数,表示使用特异功能的最少次数。如果小昆虫不能走出迷宫,则输出-1。 假设小昆虫在一个N*M的迷
阅读全文
摘要:Java TreeMap public class TestTreeMap { public static void main(String[] args) { TreeMap<Integer, String> pairs = new TreeMap<>(); // 1,2,3,4 pairs.pu
阅读全文
摘要:package dada; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main01 { static List<
阅读全文
摘要://字符串筛选 public class Main01 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] s = sc.nextLine().toCharArray(); Se
阅读全文
摘要:class Solution { public List<List<Integer>> threeSum(int[] nums) { List<List<Integer>> res = new ArrayList<>(); int n = nums.length; if(n <= 2) return
阅读全文
摘要://爱奇艺笔试0913 // 三数之和 public static void main(String[] args) { Scanner sc = new Scanner(System.in); List<Integer> list = new ArrayList<>(); Set<String>
阅读全文