永恒学者
永恒学者
全部文章
分类
归档
标签
去牛客网
登录
/
注册
永恒学者的博客
全部文章
(共35篇)
题解 | 合并两个排序的链表
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2026-01-29
0
10
题解 | 动态整数集最近值提取
///之前因为没有及时continue导致了迭代器失效 和 逻辑穿透 #include <iostream> #include <set> using namespace std; set<int> s; int main() { int x, q, ...
2026-01-29
0
11
题解 | 链表相交
#include <bits/stdc++.h> #include <unordered_map> using namespace std; struct ListNode { int val; ListNode *next; ListNode(in...
2026-01-28
0
10
题解 | 两两交换链表中的结点
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2026-01-28
0
11
题解 | 【模板】整数优先队列
#include <bits/stdc++.h> #include <queue> using namespace std; int main() { priority_queue<int> pq; int q,op,x; cin >...
2026-01-28
0
12
题解 | 【模板】多重集合操作
#include<bits/stdc++.h> using namespace std; multiset<int> ms; void insertValue(int x){ //TODO 实现插入逻辑 ms.insert(x); } void eraseVa...
2026-01-28
0
11
题解 | 【模板】集合操作
#include<bits/stdc++.h> using namespace std; set<int> s; void insertValue(int x){ //TODO 实现插入逻辑 s.insert(x); } void eraseValue(int...
2026-01-28
0
10
题解 | 牛牛与后缀表达式
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 给定一个后缀表达式,返回它的结果 * @param str string字符串 * @retur...
2026-01-27
0
15
题解 | 括号配对问题
#include <ios> #include <iostream> #include <stack> #include <string> using namespace std; stack<char> st; int main() {...
2026-01-27
0
15
题解 | 【模板】栈的操作
#include <bits/stdc++.h> using namespace std; stack<int> s; int main() { int x,T; cin >> T; while (T--) { ...
2026-01-27
0
15
首页
上一页
1
2
3
4
下一页
末页