以茂
以茂
全部文章
分类
归档
标签
去牛客网
登录
/
注册
以茂的博客
全部文章
(共26篇)
题解 | 亲和数
#include<bits/stdc++.h> using namespace std; int getsum(int n){ int sum = 1; int i; for(i = 2; i < sqrt(n); i++){ if(n %...
2026-03-05
0
64
题解 | 象棋马走步问题
#include<bits/stdc++.h> using namespace std; bool obstacle[64] = {false}; bool visited[64]; int pre[64]; int dx[8] = {2, 1, -1, -2, -2, -1, 1,...
2026-03-05
0
54
题解 | 整数转换问题
#include<bits/stdc++.h> using namespace std; string func(int x){ string res; if(x == 0){ res = "0"; } while(x ...
2026-03-04
1
54
题解 | 公司发工资问题
#include<bits/stdc++.h> using namespace std; int main(){ int n; int count100 = 0, count50 = 0, count20 = 0, count10 = 0, count5 = 0, cou...
2026-03-03
0
60
题解 | 矩阵最大值
#include<bits/stdc++.h> using namespace std; vector<int> func(vector<int> arr){ int maxnum = 0; int len = arr.size(); in...
2026-03-03
0
45
题解 | 守形数
#include<bits/stdc++.h> using namespace std; bool func(int n){ int m = n * n; string m_str = to_string(m); string n_str = to_string(...
2026-03-02
0
53
题解 | 遍历链表
#include<bits/stdc++.h> using namespace std; struct Listnode{ int val; Listnode* next; Listnode(int x) : val(x) ,next(nullptr){} }; ...
2026-03-02
0
43
题解 | 对称矩阵
#include<bits/stdc++.h> using namespace std; bool func(int n){ vector<vector<int>> arr(n, vector<int>(n)); int num; ...
2026-03-02
0
36
题解 | 打印日期
#include<bits/stdc++.h> using namespace std; int func(int m, int n){ int arr[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; if(...
2026-03-01
0
70
题解 | 二叉排序树
#include<bits/stdc++.h> using namespace std; struct Treenode{ int val; Treenode* left; Treenode* right; Treenode(int x) : val(x)...
2026-03-01
0
50
首页
上一页
1
2
3
下一页
末页