自定义函数之字符串反转1031 摘要:解题思路:两头开始交换位置注意事项:字符串长度计算和反转的限制条件参考代码:#include<stdio.h>#include <string.h>void revstr(char a[100],in…… 题解列表 2023年08月07日 0 点赞 0 评论 495 浏览 评分:0.0
优质题解 复杂度O(m求和)的求模 摘要:解题思路:我们发现前t个数的模总共只存在t种,若不存在相同的两个数则刚好t种,则第t+1个必须有新的模,考虑第一个模为0,则n%k=k-1.否则则有两个数同余注意事项:无参考代码:a=int(inpu…… 题解列表 2023年08月07日 0 点赞 1 评论 975 浏览 评分:7.6
2885: 矩阵转置(C语言) 摘要: #include int main() { int n,m; scanf("%d %d",&n,&m); int a[n][m];//原来的矩阵 for(int …… 题解列表 2023年08月07日 0 点赞 0 评论 429 浏览 评分:0.0
2886: 图像旋转(C语言) 摘要: #include int main() { int n, m; scanf("%d %d", &n, &m); int a[n][m]; for (int …… 题解列表 2023年08月07日 0 点赞 0 评论 368 浏览 评分: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 评论 396 浏览 评分:0.0
基础study,循环输入整数 摘要:解题思路:注意事项:参考代码:#include "stdio.h"int main(){ int a,sum=0,b; scanf("%d",&a); for (int i=0; i…… 题解列表 2023年08月07日 0 点赞 0 评论 228 浏览 评分:0.0
矩形滑雪场(深搜+记忆化搜索) 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int r,c; int arr[101][101]; int f[101][1…… 题解列表 2023年08月07日 0 点赞 0 评论 245 浏览 评分:0.0
使用一个变量来寄存变化的自变量,另一个变量求和。指针本质,跟递归相似,不太熟练 摘要:解题思路:注意事项:参考代码:#include "stdio.h" int main() { int sum=2,k=2;//我发现不能用sum,k=2表示,查查,私信告诉我啊 …… 题解列表 2023年08月07日 0 点赞 0 评论 279 浏览 评分:0.0
主要找出公因数,2*3*7=42即可,整除为0输出 摘要:#include "stdio.h" int main() { for(int i=100;i<1000;i++){ if(i%42==0) …… 题解列表 2023年08月07日 0 点赞 0 评论 285 浏览 评分:0.0
1097+注释+易理解 摘要:解题思路: 规律有很多,这是其中一个注意事项:参考代码:import java.util.Scanner;public class Main{ public static void main(…… 题解列表 2023年08月08日 0 点赞 0 评论 361 浏览 评分:9.9