谜一样的Andy
谜一样的Andy
全部文章
分类
归档
标签
去牛客网
登录
/
注册
谜一样的Andy的博客
全部文章
(共43篇)
题解 | 机器翻译
#include<bits/stdc++.h> using namespace std; int M,N,temp,n{0};queue<int>q;bool panduan{1}; int main(){ cin>>M>>N; for...
2025-10-10
0
27
题解 | 队列消数
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param tickets int整型vector * @param k int整型 ...
2025-10-09
0
30
题解 | 参议院投票
#include <queue> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 求出最终获胜帮派的名称 * @param s string字符...
2025-10-09
0
23
题解 | 用两个栈实现队列
class Solution { public: void push(int node) { stack1.push(node); } int pop() { int temp; if (stack2.empty()) { ...
2025-10-09
0
23
题解 | 无法吃午餐的学生数量
#include <queue> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param students int整型vector ...
2025-10-09
0
23
题解 | 【模板】队列操作
#include<bits/stdc++.h> #include <iostream> #include <queue> using namespace std; queue<int>q;int n,temp,sig; int main(){ ...
2025-10-09
0
32
题解 | 验证栈序列
#include<bits/stdc++.h> using namespace std; int temp,q,n,k{1},p{0};vector<int>push,pop;stack<int>test; int main(){ cin>>q...
2025-10-04
0
19
题解 | 栈和排序
#include<bits/stdc++.h> using namespace std; stack<int>s;int n,temp,k{0}; int main(){ cin>>n; for(int i=n;i>=1;){ ...
2025-10-04
0
32
题解 | 表达式求值
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 返回表达式的值 * @param s string字符串 待计算的表达式 * @return in...
2025-10-01
0
18
题解 | 判断闰年
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n%400==0){ cout<<"yes"; ...
2025-09-29
0
21
首页
上一页
1
2
3
4
5
下一页
末页