编写题解 1027: [编程入门]自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int y(int a,int b) { for(int i=min(a,b);i>…… 题解列表 2024年08月09日 0 点赞 0 评论 832 浏览 评分:0.0
dfs+判断数组解决排列 摘要:解题思路:注意事项:坑:1.题目空了一格输出,输出一个就换行2.字典序输出参考代码:#include<bits/stdc++.h>const int N=10;//题目默认字典序了strcmpint …… 题解列表 2024年08月09日 0 点赞 0 评论 591 浏览 评分:0.0
最暴力的写法QwQ 摘要:#include<bits/stdc++.h> using namespace std; void solve() { int m,cnt=0; cin>>m; for(int i=…… 题解列表 2024年08月09日 1 点赞 0 评论 487 浏览 评分:0.0
最简单的组合数问题(递推法) 摘要:#include<bits/stdc++.h> using namespace std; const int N=2010; int c[N][N]; void init() { for…… 题解列表 2024年08月09日 0 点赞 0 评论 510 浏览 评分:0.0
使用qsort函数排序,直接找到最大值 不懂qsort函数用法的看这里[C语言qsort函数的使用详解](https://blog.csdn.net/weixin_47648037/article/details/126691309?ops_request_misc=%257B%2522request%255Fid%2522%253A%25 题解列表 2024年08月09日 0 点赞 0 评论 446 浏览 评分:0.0
老弟,包懂的 摘要:```c #include int main() { int n,num=0; char ch; scanf("%d %c",&n,&ch); if(n1…… 题解列表 2024年08月09日 2 点赞 0 评论 603 浏览 评分:0.0
自定义函数之整数处理,解决对一半的问题 摘要:解题思路: 定义一个含有10个元素的数组,找出其中最大值与最小值的编号,分别记为min,max;按要求进行交换,同时考虑特殊情况的处理。注意事项: 如何解决部分测试结果不正确的问题?特殊情况1:当最大…… 题解列表 2024年08月09日 0 点赞 0 评论 573 浏览 评分:9.9
c语言代码,数组解,包你懂 这道题不用考虑那几个字符之间的空格,直接scanf读取就行了,当然你也可以考虑处理那几个空格,参照我的那个create函数```c#include#include//char*create(char*arr){//charch;//inti=0;//while((ch=getchar())!=''&& 题解列表 2024年08月09日 0 点赞 0 评论 573 浏览 评分:9.9
Hanoi双塔问题 摘要:解题思路:高精度 2 * (2 ^ n - 1)注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; const i…… 题解列表 2024年08月09日 0 点赞 0 评论 682 浏览 评分:0.0
计算2的N次方 摘要:解题思路:高精度乘法注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; const int N = 1e3…… 题解列表 2024年08月09日 1 点赞 0 评论 563 浏览 评分:0.0