C++代码-二维数组的转置【很好理解!】 摘要:解题思路:要将矩阵转置,那么在做题之前需要清楚矩阵的主对角线上的数值是不变的,也就是行数=列数的值不变,因此我们在输入矩阵之后只需要将上矩阵(或下矩阵)的值与下矩阵(或上矩阵)对调即可。参考代码:#i…… 题解列表 2023年08月10日 1 点赞 0 评论 910 浏览 评分:9.9
超简单连续整数和 一看就懂AC 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(int i=1;i<n…… 题解列表 2023年08月08日 0 点赞 0 评论 423 浏览 评分:9.9
用筛法求之N内的素数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,sum; cin>>n; fo…… 题解列表 2023年08月08日 0 点赞 0 评论 459 浏览 评分:9.9
矩形滑雪场(深搜+记忆化搜索) 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int r,c; int arr[101][101]; int f[101][1…… 题解列表 2023年08月07日 0 点赞 0 评论 326 浏览 评分:0.0
排序算法模板题 这次用的是y总给的快排模板 摘要:# 快排模板 ```c++ #include using namespace std; const int N = 1e5+10; int q[N]; int n,k; void q…… 题解列表 2023年08月07日 0 点赞 0 评论 471 浏览 评分:0.0
筛选号码简单AC 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; int a[100001]; …… 题解列表 2023年08月07日 0 点赞 0 评论 320 浏览 评分:9.9
题解 1053:平均值计算(单个循环解决 c++) 摘要:解题思路: 循环前的准备工作:1、先设置十个整数,并将它们放入一个数组以备循环里调取。 2、设置均值k。 3、设置题目所求的计数变量sum。 …… 题解列表 2023年08月07日 0 点赞 0 评论 636 浏览 评分:9.9
c++的一种写法 摘要:解题思路:#include<iostream>using namespace std;int main(){char c1,c2,c3,c4,c5,c6,c7,c8,c9,c10; cin>>c…… 题解列表 2023年08月07日 0 点赞 0 评论 906 浏览 评分:9.9
函数求整数平均值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int ave(int a[],int n){ int sum=0; for(int…… 题解列表 2023年08月07日 0 点赞 0 评论 487 浏览 评分:4.7
字符删除STL解法AC 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s,s1; cin>>s>>s1; int n…… 题解列表 2023年08月07日 0 点赞 0 评论 412 浏览 评分:6.0