数列排序- 模拟+数组元素移动 摘要:解题思路:模拟+数组元素移动+插入数组注意事项:参考代码:#include<iostream>usingnamespacestd;constin…… 题解列表 2025年03月25日 0 点赞 0 评论 599 浏览 评分:0.0
数列有序:极简(不用数组,输入时同时输出) 摘要:解题思路:极简,输入时同时输出注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;consti…… 题解列表 2025年03月25日 0 点赞 0 评论 408 浏览 评分:0.0
C++:map容器 算暴力遍历 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<map>using namespace std ;int main ( ){&n…… 题解列表 2025年03月25日 0 点赞 0 评论 379 浏览 评分:0.0
c++分糖果(dijkstra求最短最远距离) 解题思路:要保证所有孩子吃完糖果,那不就意味着一定是求从起点到最远的距离且点与点之间的权值为1,相当于最远距离+最后一个孩子吃完的时间+题意描述给予第一个孩子的时间为1(the_most_far_dist+m+1),dijkstra求最远距离```cpp#include#includeusingnam 题解列表 2025年03月25日 0 点赞 0 评论 413 浏览 评分:0.0
c++城市路(bfs+优先队列) 摘要:```cpp#include #include using namespace std;const int INF=0x3f3f3f3f;vector edge[2005];…… 题解列表 2025年03月25日 0 点赞 0 评论 404 浏览 评分:0.0
岛屿个数(bfs搜索海+dfs搜索连通岛) 摘要:```cpp#include using namespace std;const int NN=50+5;//地图vectormp(NN);//访问数组bo…… 题解列表 2025年03月25日 1 点赞 2 评论 825 浏览 评分:0.0
传送阵(用STL库极限压缩时间) 解题思路:注意事项:参考代码:#includeusingnamespacestd;constintN=1e6+5;intmp[N];intn,ans,k;boolvis[N];struct{intval,flag;}v[N];map 题解列表 2025年03月26日 0 点赞 0 评论 1036 浏览 评分:0.0 2848: 基因相关性 解题思路:注意事项:交了三次,大概知道了这个代码的易错点首先是没有使用.strip()处理输入,如果输入包含首尾空格或换行符会影响比较其次是没有考虑两行DNA长度不一致的问题最后是我将两行字符串比较时使用了两个for循环,最好是使用一个for循环参考代码:a=float(input())b=input 题解列表 2025年03月26日 0 点赞 0 评论 751 浏览 评分:0.0 C++ : 类和两种访问权限的练习 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;classseparation{private:stringst;intlen;public:separation(stringa);voidprint();};sep 题解列表 2025年03月26日 0 点赞 0 评论 456 浏览 评分:0.0 计算分数的浮点数值 摘要:解题思路: 先明确输入的被除数和除数,再用if语句设置前提条件除数不为零,最后输出保留9位小数的双精度浮点数结果注意事项:  …… 题解列表 2025年03月26日 3 点赞 0 评论 1148 浏览 评分:0.0 « 12...5790579157925793579457955796...59195920 »
2848: 基因相关性 解题思路:注意事项:交了三次,大概知道了这个代码的易错点首先是没有使用.strip()处理输入,如果输入包含首尾空格或换行符会影响比较其次是没有考虑两行DNA长度不一致的问题最后是我将两行字符串比较时使用了两个for循环,最好是使用一个for循环参考代码:a=float(input())b=input 题解列表 2025年03月26日 0 点赞 0 评论 751 浏览 评分:0.0
C++ : 类和两种访问权限的练习 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;classseparation{private:stringst;intlen;public:separation(stringa);voidprint();};sep 题解列表 2025年03月26日 0 点赞 0 评论 456 浏览 评分:0.0
计算分数的浮点数值 摘要:解题思路: 先明确输入的被除数和除数,再用if语句设置前提条件除数不为零,最后输出保留9位小数的双精度浮点数结果注意事项:  …… 题解列表 2025年03月26日 3 点赞 0 评论 1148 浏览 评分:0.0