金刚侠
金刚侠
全部文章
分类
归档
标签
去牛客网
登录
/
注册
金刚侠的博客
全部文章
(共108篇)
题解 | 序列链表化
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2025-12-26
0
51
题解 | 链表序列化
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ #include <vector> class S...
2025-12-26
0
57
题解 | 反转链表
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2025-12-26
0
43
题解 | 移除链表元素
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2025-12-26
0
50
题解 | 数颜色
#include <iostream> using namespace std; #include <string> int main() { string s; cin>>s; int a=0,b=0,d=0; for(char ...
2025-12-25
0
49
题解 | 小红和小紫的取素因子游戏
#include <chrono> #include <iostream> using namespace std; int count(int &x){ int cnt=0; if(x==1)return 0; while(x%2==0){ ...
2025-12-23
0
32
题解 | 小红与gcd三角形
#include <iostream> using namespace std; bool sanjiao(int a,int x,int y){ if(a+x>y&&a+y>x&&x+y>a)return true; e...
2025-12-23
0
70
题解 | 小红的k次方
#include <iostream> using namespace std; #include <algorithm> int cnt(int x,int fac){ int ans=0; while(x%fac==0){ ans++; ...
2025-12-22
0
41
题解 | 判断质数
#include <cmath> #include <iostream> using namespace std; int main() { long long n; cin>>n; int ans=0; if(n==2)cout&...
2025-12-22
0
42
题解 | 小红与奇数
#include <iostream> using namespace std; int main() { int n; cin>>n; int a=0; if((n&1)==0)cout<<"Yes"&...
2025-12-22
0
50
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页