1767: 循环入门练习4题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int sum=0; int n; cin…… 题解列表 2024年12月28日 0 点赞 0 评论 97 浏览 评分:0.0
1768: 循环入门练习5题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(in…… 题解列表 2024年12月28日 0 点赞 0 评论 165 浏览 评分:0.0
2163二分法查找最接近的元素 摘要:解题思路:注意事项:在比较的时候需要注意取绝对值(abs函数)比较,不然会出错。参考代码:#include <bits/stdc++.h>using namespace std;int findClo…… 题解列表 2024年12月28日 0 点赞 0 评论 381 浏览 评分:10.0
用冒泡排序的方法解决 摘要:解题思路: 通过交换相邻元素的方式将元素依次向前移动一位,实现将数组的后 m 个元素循环前移到数组前面。注意事项: 注意输入的 m 值不能超过数组的长度,否则可能会出现越界错误。代码中使用了变长数组(…… 题解列表 2024年12月28日 2 点赞 0 评论 349 浏览 评分:10.0
自定义函数处理素数 摘要:#include<stdio.h> int judge(int n); int main(void) { int n; while(scanf("%d", &n)) …… 题解列表 2024年12月28日 2 点赞 0 评论 859 浏览 评分:0.0
二维数组的转置 摘要:解题思路:#include<stdio.h> int main(void) { int a[3][3] = { {1, 2, 3}, &nbs 题解列表 2024年12月28日 1 点赞 0 评论 507 浏览 评分:0.0
多余的string函数 摘要:解题思路:#include<stdio.h> #include<string.h> int main(void) { char a[100]; gets(a); i…… 题解列表 2024年12月28日 0 点赞 0 评论 360 浏览 评分:0.0
自定义函数之字符串连接 摘要:#include<stdio.h> int main(void) { char a[100]; char b[100]; char temp[100]; i…… 题解列表 2024年12月28日 0 点赞 0 评论 406 浏览 评分:0.0
先转化为小写 摘要:#include<stdio.h> #include<ctype.h> int main(void) { char a[100]; char target[100]; …… 题解列表 2024年12月28日 0 点赞 0 评论 189 浏览 评分:0.0
坐标排序(构建对象去处理坐标数据) 摘要:解题思路: - 既然用的C++,那就不用结构体去处理了,构建一个对象去处理,顺便使用构造函数去处理输入 - 将对象存入vector容器,再去排序,排序用的就是sort,想看手写快排的话,那放在这下…… 题解列表 2024年12月28日 0 点赞 0 评论 287 浏览 评分:0.0