jonlusen
jonlusen
全部文章
分类
归档
标签
去牛客网
登录
/
注册
jonlusen的博客
全部文章
(共9篇)
题解 | #走迷宫#
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1010; char g[N][N]; ll dist[N][N]; int n, m; int xs, ys, xt, y...
2024-04-11
0
150
题解 | #找到数组里的第k大数(C++)#
#include<bits/stdc++.h> using namespace std; int main(){ int n,k; vector<int>a; // write your code here...... cin >> n >> ...
2024-03-05
0
146
题解 | #查找#
#include<bits/stdc++.h> using namespace std; int findNum(const set<int>& s, int x) { /*运行超时,注释的代码相当于把upper_bound转化了一遍但时间复杂度过大*/ ...
2024-03-05
0
169
题解 | #迭代器遍历set#
#include<bits/stdc++.h> using namespace std; int main(){ set<int>s; // write your code here...... int a; while(cin >> a){ s.in...
2024-03-03
0
134
题解 | #编写函数实现两数交换(指针方式)#
#include <iostream> using namespace std; // write your code here...... void swap1(int*p1,int*p2){ int temp = *p1; *p1 = *p2; *p2 = ...
2024-02-27
0
160
题解 | #创建二维动态数组#
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int** Array = new int* [n]; // 创建指向指针的指针 //对比一维...
2024-01-13
0
162
题解 | #创建动态数组#
#include <iostream> #include <new> using namespace std; int main() { int n; cin >> n; // write your code here.......
2024-01-12
0
140
题解 | #复制部分字符串#
#include <iostream> #include<vector> using namespace std; int main() { char str[30] = { 0 }; cin.getline(str, sizeof(str)); ...
2024-01-12
0
154
题解 | #实现四舍五入#
#include <iostream> #include<cmath> using namespace std; int main() { float number; cin>>number; float c=number;//输入的数字...
2023-10-25
0
167