在努力存钱的小松鼠很矫健
在努力存钱的小松鼠很矫健
全部文章
分类
归档
标签
去牛客网
登录
/
注册
在努力存钱的小松鼠很矫健的博客
全部文章
(共53篇)
题解 | 验证栈序列,清理逻辑有点费脑子
#include <iostream> #include <vector> using namespace std; int main() { int a, b; cin>>a; for (int k=0; k<a; k++) { ...
2025-08-26
0
8
题解 | 自动管理停车场桩位系统,这题就只需要实现简单的功能就可以了。
#include <vector> class Solution { vector<int> p; public: void push(int value) { p.push_back(value); } void pop() ...
2025-08-26
0
7
题解 | 牛牛与后缀表达式,注意记录数字的时候不要把加减乘符号算进去了,其次switch的顺序有讲究
#include <iostream> #include <string> #include <vector> using namespace std; class Solution { public: /** * 代码中的类名、方法名、参数名...
2025-08-26
0
10
题解 | 有效括号序列,跟上面一题一样的
#include <iostream> #include <string> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @...
2025-08-26
0
8
题解 | 吐泡泡,这题的关键是小泡泡合成大泡泡之后还要再往前推一步,判断大泡泡会不会和前面的抵消
#include <iostream> #include <string> using namespace std; int main() { int T; cin>>T; string s; for (int i=0; i<...
2025-08-26
0
9
题解 | 好串,不太清楚有没有漏考虑的地方
#include <iostream> #include <string> using namespace std; int main() { string s; string a; while (cin >> s) { // 注意 wh...
2025-08-26
0
9
题解 | 括号配对问题,这次只使用了push和pop,案例都能通过,就是不知道会不会有考虑不周全的
#include <iostream> #include <string> #include <vector> using namespace std; int main() { string s; string a; while (ci...
2025-08-26
0
9
题解 | 栈和排序,不太清楚对不对,但是应该是符合要求的
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; int...
2025-08-26
0
12
题解 | 吐泡泡,感觉没把进栈出栈用好,之后再重新做一下这几题。
#include <iostream> #include <string> using namespace std; int main() { int T; cin>>T; string s; for (int i=0; i<...
2025-08-18
0
12
题解 | 好串,这一题和上一题一样,需要考虑字符串中毫无ab的情况
#include <iostream> #include <string> using namespace std; int main() { string s; while (cin >> s) { // 注意 while 处理多个 case ...
2025-08-18
0
15
首页
上一页
1
2
3
4
5
6
下一页
末页