第K极值(python) 摘要:解题思路:注意事项:参考代码:def is_prime(num): if num <= 1: return False for i in range(2, int(num *…… 题解列表 2023年12月18日 0 点赞 0 评论 197 浏览 评分:0.0
快速排序(python) 摘要:解题思路:注意事项:参考代码:def quick_sort(nums): if len(nums) <= 1: return nums pivot = nums[le…… 题解列表 2023年12月18日 0 点赞 0 评论 161 浏览 评分:0.0
堆排序(python) 摘要:解题思路:注意事项:参考代码:def heapify(nums, n, i): if len(nums) <= 1: return nums largest = i # 初…… 题解列表 2023年12月18日 0 点赞 0 评论 150 浏览 评分:0.0
归并排序(python) 摘要:解题思路:注意事项:参考代码:def merge_sort(nums): if len(nums) <= 1: return nums # 分割阶段 mid = len…… 题解列表 2023年12月18日 0 点赞 0 评论 216 浏览 评分:0.0
题解 2883: 矩阵加法 摘要: #include using namespace std; const int N=110; int a[N][N],b[N][N]; int main…… 题解列表 2023年12月18日 0 点赞 0 评论 117 浏览 评分:0.0
2883: 矩阵加法 C++ 摘要:解题思路:外层循环变量i为行号; 内层循环变量j为列号; 注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=110;in…… 题解列表 2023年12月18日 0 点赞 0 评论 143 浏览 评分:0.0
2883: 矩阵加法 摘要:``` #include using namespace std; const int N=110; int a[N][N],b[N][N]; int main(){ int n,m; …… 题解列表 2023年12月18日 0 点赞 0 评论 116 浏览 评分:0.0
2878: 计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=110;int a[N][N];int main(){ in…… 题解列表 2023年12月18日 0 点赞 0 评论 178 浏览 评分:0.0
2878: 计算矩阵边缘元素之和 摘要:``` #include using namespace std; const int N=110; int a[N][N],b[N][N]; int main(){ int n,m,s…… 题解列表 2023年12月18日 0 点赞 0 评论 171 浏览 评分:0.0
2878: 计算矩阵边缘元素之和 摘要:``` #include using namespace std; const int N=110; int a[N][N]; int main(){ int n,m,sum=0; …… 题解列表 2023年12月18日 0 点赞 0 评论 112 浏览 评分:0.0