千早爱音a
千早爱音a
全部文章
分类
归档
标签
去牛客网
登录
/
注册
千早爱音a的博客
全部文章
(共68篇)
题解 | 上三角矩阵判定
#include <iostream> using namespace std; int a[20004][20004]={0};//创建二维数组 int main() { int n{}; cin>>n;//n行n列 int N=n; int...
2025-11-12
0
15
题解 | 单组_二维数组
#include <iostream> using namespace std; //本题虽然归属数组,但其实不需要用数组,只需有一个sum记录所有值的和即可 int main() { int n{},m{};//n行m列 cin>>n>>m; ...
2025-11-10
0
18
题解 | 约瑟夫环
#include <iostream> using namespace std; const int K=202; int a[K]={0};//在主函数外定义数组,节省主函数内存 int main() { int n{},k{},m{}; cin>>n&g...
2025-11-06
0
18
题解 | 记数问题
#include <iostream> using namespace std; const int K=2000006; int a[K]={0};//在主函数在定义数组,节省主函数内存 int main() { int n{},x{};//题目要求的参数 int k...
2025-11-05
0
16
题解 | 牛牛的数学作业
#include <iostream> #include <cmath> #include <iomanip> using namespace std; const int K=1000000; int a[K]={0};//在主函数外定义数组,节省主函数内存 i...
2025-11-05
0
18
题解 | 数组计数维护
#include <iostream> using namespace std; const int K=100000; int a[K]={0};//在主函数外定义数组,节省主函数内存 int main() { int T{}; cin>>T;//设定数据...
2025-11-05
0
16
题解 | 左侧严格小于计数
#include <iostream> using namespace std; const int K=100;//数组长度 int a[K],b[K];//依题意定义两个数组 //tips:主函数内存较小,将数组定义在外面可以减小主函数的内存占用防止爆内存 int main() {...
2025-11-04
3
20
题解 | 神秘石像的镜像序列
#include <iostream> using namespace std; int main() { const int K=100;//定义数组长度K int a[K]={0};//定义并初始化数组 int i{};//计数器 do {//do-...
2025-11-04
0
18
题解 | 牛牛学数列6
#include <iostream> using namespace std; int main() { int n{};//定义数列第n项 cin>>n; int A[n];//定义数列An A[0]=0; A[1]=1...
2025-10-30
0
15
题解 | 牛牛学数列6(不用数组版)
#include <iostream> using namespace std; //本思路不需要使用数组,仅用基本语法 //原理:我们知道,数组本质上是系列变量的集合,因此可以通过 //定义几个关键变量代替数组的作用(思路类似我写的斐波那契数列) int main() { in...
2025-10-30
0
13
首页
上一页
1
2
3
4
5
6
7
下一页
末页