满船清梦压星河1
满船清梦压星河1
全部文章
分类
归档
标签
去牛客网
登录
/
注册
满船清梦压星河1的博客
全部文章
(共22篇)
题解 | 数据分类处理
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <unordered_map> #include<set>...
2025-02-16
0
112
题解 | 查找组成一个偶数最接近的两个素数
#include <climits> #include <iostream> #include <linux/limits.h> #include<vector> #include<climits> using namespace std;...
2025-02-16
0
113
题解 | 素数伴侣
#include<iostream> #include<vector> using namespace std; bool isprime(int n) { if (n <= 1) return false; if (n <= 3) return...
2025-02-16
0
126
题解 | 求最小公倍数
#include <iostream> #include <algorithm> // 包含 std::gcd(C++17 及以上) using namespace std; // 计算最大公约数(GCD) int gcd(int a, int b) { whil...
2025-02-16
0
128
题解 | 称砝码
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main() { int n; cin >> n; //...
2025-02-16
0
140
题解 | 最长回文子串
#include <algorithm> #include <string> using namespace std; class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 ...
2025-02-15
0
145
题解 | 有效括号序列
class Solution { public: bool isValid(string s) { stack<char> ch; if(s.size() == 0) return true; // 空字符串是合法的 for(cha...
2025-02-14
0
88
题解 | 成绩排序
#include <iostream> #include <vector> #include <algorithm> using namespace std; // 定义学生结构体 struct Student { string name; i...
2025-02-14
0
105
题解 | 合并区间
class Solution { public: //重载比较 static bool cmp(Interval &a, Interval &b) { return a.start < b.start; } vecto...
2025-02-14
0
118
题解 | 查找兄弟单词
#include <iostream> #include <vector> #include <algorithm> using namespace std; // 判断两个字符串是否是兄弟单词 bool IsBrother(const string& ...
2025-02-14
0
97
首页
上一页
1
2
3
下一页
末页