TQ988
TQ988
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
TQ988的博客
全部文章
(共9篇)
Java题解 | 小红的二叉树
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int ...
2025-07-08
0
31
Java题解,含详细注释 | 核心:状态压缩
import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static int merge(Map<Long, Integer> m...
2025-07-08
1
38
Java题解 | 小红走网格
import java.util.Scanner; public class Main { public static int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } public...
2025-07-08
0
30
JAVA题解 | 计算全排列(阶乘)
import java.util.Scanner; public class Main { /* 答案就是:奇数元素的全排列数*偶数元素的全排列数, 如果n是偶数还有乘2,因为排列第一个可以是奇数或偶数 如果...
2025-07-08
0
45
JAVA题解 | 01背包
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scan...
2025-07-08
0
27
Java题解 | 滑动窗口解决
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int ...
2025-07-08
1
32
JAVA题解,含详细注释 | 喜欢切数组的红
import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { ...
2025-07-08
1
46
题解 | 在字符串中找出连续最长的数字串
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); Stri...
2025-07-08
0
48
题解 | 合法IP
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); Stri...
2025-07-08
0
46