报数问题(数组表示链表) 摘要:#include<iostream> #include<string> using namespace std; const int N=300; string s; //…… 题解列表 2023年07月30日 0 点赞 0 评论 171 浏览 评分:9.9
蓝桥杯算法训练VIP-数的统计 C++ map 摘要:# map 有序容器 ```c++ #include #include #include #include using namespace std; const int N = 1e5+…… 题解列表 2023年07月30日 0 点赞 0 评论 258 浏览 评分:0.0
2975: 1的个数(C++) 摘要:代码解析: count_ones_in_binary 函数接受一个十进制数 N 作为参数,并返回其二进制表示中1的个数。 在 count_ones_in_binary 函数中,使用一个 count…… 题解列表 2023年07月30日 0 点赞 0 评论 250 浏览 评分:9.9
围圈报数(数组表示链表) 摘要:解题思路: 用链表存储人员编号,存储每个人的上个人fa[i]以及下个人ne[i]注意事项: fa[1]=n,ne[n]=1; 第一 题解列表 2023年07月28日 0 点赞 0 评论 282 浏览 评分:9.9
求平均年龄 摘要:解题思路:注意事项:参考代码: double a,sum,b,num; cin>>a; if(a>=1.0 && a<=100.0){ sum=0; for (in…… 题解列表 2023年07月28日 0 点赞 0 评论 253 浏览 评分:0.0
滑动窗口(c++)(数组模拟队列) 摘要:解题思路: 构造单调队列 答案即为队头注意事项: 队列存放数组下标 用scanf和printf更快参考代码:#include<iostream> #include<algorithm> us…… 题解列表 2023年07月28日 0 点赞 0 评论 267 浏览 评分:9.9
单词排序(利用sort排序和set去重) 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <cstring> #include <algorithm> #include <set> using …… 题解列表 2023年07月28日 0 点赞 0 评论 235 浏览 评分:0.0
1585链表数据求和操作(c++) 摘要:解题思路: 用链表存储数据注意事项: 链表出节点ne[0]=-1,idx要从1开始计算参考代码:#include<iostream> using namespace std; const int …… 题解列表 2023年07月27日 0 点赞 0 评论 430 浏览 评分:9.9
1511:复数求和(c++)(简单链表思想) 摘要:解题思路:用链表存储输入的数据注意事项:链表初始ne[0]=-1 , idx从1开始计算参考代码:#include<iostream> using namespace std; const int…… 题解列表 2023年07月27日 0 点赞 0 评论 200 浏览 评分:9.9
链表合并(太麻烦了 用暴力写的 ) 摘要:#include<iostream> using namespace std; const int N=100010; int p[N]; int main(void) { for…… 题解列表 2023年07月27日 0 点赞 0 评论 282 浏览 评分:9.9