hojiahao
hojiahao
全部文章
分类
归档
标签
去牛客网
登录
/
注册
hojiahao的博客
全部文章
(共36篇)
题解 | 旋转数组
#include <iterator> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 旋转数组 * @param n int整型 数组长度 ...
2025-09-08
0
15
题解 | 滑动窗口的最大值
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param num int整型vector * @param size int整型 ...
2025-09-08
0
17
题解 | 数组中的逆序对
#include <vector> const int MOD = 1000000007; class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * *...
2025-09-08
0
19
题解 | 小红的“质数”寻找
#include <bits/stdc++.h> using namespace std; const int MAXN = 900010; // 数位和最大值附近 bitset<MAXN> isPrime; // 标记质数 // 预处理质数 void sieve(...
2025-03-07
0
51
题解 | 小红的“质数”寻找
#include <bits/stdc++.h> using namespace std; const int MAXN = 900010; // 数位和最大值附近 bitset<MAXN> isPrime; // 标记质数 // 预处理质数 void sieve(...
2025-03-07
0
80
题解 | 小红的好排列
#include <iostream> using namespace std; typedef long long LL; const LL MOD = 1e9 + 7; // 模数 const int N = 1000010; // n的最大值加一些余量 LL fact[N],...
2025-03-07
0
190
首页
上一页
1
2
3
4
下一页
末页