金刚侠
金刚侠
全部文章
分类
归档
标签
去牛客网
登录
/
注册
金刚侠的博客
全部文章
(共81篇)
题解 | 验证栈序列
#include <iostream> using namespace std; #include <vector> #include <stack> bool isLegal(vector<int>&s,vector<int>&a...
2026-01-11
0
7
题解 | 有效括号序列
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param s string字符串 * @return bool布尔型 */ ...
2026-01-10
0
10
题解 | 括号配对问题
#include <iostream> using namespace std; #include <stack> #include <string> bool ispipei(string &s){ stack<char>a; ...
2026-01-10
0
10
题解 | 旺仔哥哥转圈圈
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 计算出旺仔哥哥最后会站在哪位小朋友旁边 * @param a int整型vector 第 i 个小朋友的数字...
2026-01-10
0
9
题解 | 旺仔哥哥挤地铁
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 计算旺仔哥哥在地铁上的最长停留时间 * @param t int整型vector 序列 t,表示地铁在相邻...
2026-01-10
0
8
题解 | 【模板】序列操作
#include <iostream> using namespace std; #include <vector> #include <algorithm> int main() { int n; cin>>n; vector...
2026-01-10
0
9
题解 | 两直线交点
#include <bits/stdc++.h> using namespace std; struct point { double x, y; point(double A, double B) { x = A, y = B; } p...
2026-01-10
0
9
题解 | 直线与圆交点间距
#include <bits/stdc++.h> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y=B; } point() = ...
2026-01-06
0
12
题解 | 三角形面积
//叉乘法计算三角形面积 #include <bits/stdc++.h> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y=B; } ...
2026-01-06
0
11
题解 | 二进制数1
#include <iostream> using namespace std; int main() { long long x; cin>>x; int cnt=0; while (x) { cnt+=x&1; ...
2026-01-06
0
13
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页