派仔
派仔
全部文章
分类
题解(68)
归档
标签
去牛客网
登录
/
注册
Lincs
Do more, know more, be more
全部文章
(共51篇)
公共字串计算
import java.util.*; public class Main { public int getCommonStrLength(String s, String t) { int result = 0; for (int j = 0; j &l...
Java
2020-08-08
4
1137
迷宫问题
import java.util.*; public class Main { private int n; private int m; private int[][] maze; private class Pair { int i; ...
Java
2020-08-08
6
2152
字串的连接最长路径查找
简单Arrays排个序 import java.util.*; public class Main { public Main() { Scanner in = new Scanner(System.in); int n = Integer.va...
Java
2020-08-08
15
2841
输入n个整数,输出其中最小的k个
优先队列PriorityQueue修改Comparator为最大堆,空间O(k), 时间O(nlog(k)) import java.util.*; public class Main { public Main() { } public boolean getMinK...
Java
2020-08-08
11
2870
找出字符串中第一个只出现一次的字符
import java.util.*; public class Main { private int count(String str) { Map<Character, Integer> map = new HashMap<>(); ...
Java
2020-08-08
17
2089
句子逆序
import java.util.Scanner; public class Main { private String reverse(String sentence) { String[] words = sentence.split(" "); ...
Java
2020-08-07
3
996
提取不重复的整数
import java.util.Scanner; public class Main { private int cal(int number) { boolean[] marked = new boolean[10]; int result = 0; ...
Java
2020-08-07
3
1518
尼科彻斯定理
import java.util.Scanner; public class Main { public String getSequeOddNum(int m) { int low; if (m % 2 != 0) { l...
Java
2020-08-07
0
623
计算日期到天数转换
import java.util.Scanner; public class Main { private int leapMonth[] = {0, 31,29,31,30,31,30,31,31,30,31,30,31}; private int normalMonth[] ...
Java
2020-08-07
3
863
[Java] 取近似值
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); doubl...
Java
2020-08-07
367
16800
首页
上一页
1
2
3
4
5
6
下一页
末页