冷意
冷意
全部文章
分类
归档
标签
去牛客网
登录
/
注册
冷意的博客
全部文章
(共69篇)
题解 | 不重复数字
#include <iostream> #include <unordered_set> #include <vector> using namespace std; int main() { int t, n, num; cin >>...
2025-06-07
0
9
题解 | 宝石计数
#include <unordered_set> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param jewels strin...
2025-06-07
0
6
题解 | 快乐数
#include <unordered_set> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 ...
2025-06-07
0
9
题解 | 数对计数
#include <iostream> #include <unordered_map> #include <vector> using namespace std; int main() { int n, c; cin >> n &...
2025-06-07
0
7
题解 | 动态整数集最近值提取
#include <iostream> #include <set> using namespace std; set<int> s; void insert(int x) { if (s.count(x)) { cout <&l...
2025-06-07
0
8
题解 | 【模板】多重集合操作
#include<bits/stdc++.h> #include <map> #include <set> using namespace std; multiset<int> m; void insertValue(int x) { //...
2025-06-07
0
10
题解 | 机器翻译
#include <iostream> #include <queue> #include <unordered_set> using namespace std; int main() { int n, size, code; cin >...
2025-06-06
0
9
题解 | 参议院投票
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 求出最终获胜帮派的名称 * @param s string字符串 * @return stri...
2025-06-06
0
6
题解 | 用两个栈实现队列
class Solution { public: void push(int node) { stack1.push(node); } int pop() { if (stack2.empty()) { while...
2025-06-06
0
9
题解 | 队列消数
#include <queue> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param tickets int整型vector ...
2025-06-06
0
7
首页
上一页
1
2
3
4
5
6
7
下一页
末页