牛客440904392号
牛客440904392号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客440904392号的博客
全部文章
(共258篇)
直接把系数加1000映射到数组下标就行
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] ...
2024-10-06
1
100
题解 | #树查找#按下标输出或者递归建树加递归遍历
//C++版代码 #include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; int nums[n + 1]; fo...
2024-10-06
1
109
题解 | #打牌#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String...
2024-10-06
1
91
题解 | #查找第K小数#
input() l = list(sorted(set(map(int, input().split())))) print(l[int(input()) - 1])
2024-10-06
1
118
顺时针旋转行翻转加转置,逆时针旋转列翻转加转置。
#include <iostream> #include <vector> using namespace std; void inputMatrix(vector<vector<int>> &matrix) { for (int i ...
2024-10-06
1
115
题解 | #C翻转#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[][...
2024-10-06
1
124
题解 | #EXCEL排序#定义个结构体再按要求排序就行
#include <iostream> #include <algorithm> using namespace std; struct Student { string id, name; int score; }; int main() { int...
2024-10-06
1
112
题解 | #简单计算器#Python一行
print('%.2f' % eval(input()))
2024-10-05
2
92
题解 | #二叉搜索树#先递归建树,再递归判断。
#include <iostream> using namespace std; struct TreeNode { char val; TreeNode *left; TreeNode *right; TreeNode(char c) : val(c),...
2024-10-05
1
108
题解 | #畅通工程#Kruskal算法模板题,记住就行。
import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Scanner; public class Main { private static int[]...
2024-10-05
1
120
首页
上一页
10
11
12
13
14
15
16
17
18
19
下一页
末页