采用宏定义输出3个数排列 摘要:解题思路:笨方法,既然每次都取3个不完全相同的数字进行排列,那么我们可以采用宏定义把排列3个数单独摘出来,然后对于输入的4个数执行4次宏函数,即可。注意事项:宏定义是完全的文本替换,所以主函数里面不需…… 题解列表 2026年07月20日 1 点赞 0 评论 27 浏览 评分:0.0
我是小白,堆史山 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int a,b,c,d=0;int number[3];int main(){ scanf(&qu…… 题解列表 2026年02月03日 0 点赞 1 评论 210 浏览 评分:0.0
C++ : 豆包写的,用to_string()和next_permutation()实现全排列 摘要:解题思路:我解释我提供给豆包的思路:不能重复,所以我想使用set容器set容器,我当时寻思着放int类型的元素,然后一个个拆出来输出,豆包直接使用string类型输出3个数字,所以我感觉是3个for循…… 题解列表 2025年04月22日 0 点赞 0 评论 528 浏览 评分:0.0
oliv_排除法暴力循环 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int sum = 0, arr[4]; for(int i=0; i<4; i++) …… 题解列表 2024年10月03日 0 点赞 0 评论 693 浏览 评分:0.0
C++容器(深度优先遍历算法)解题 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <vector>#include <set>#include <algorithm>using namespace…… 题解列表 2024年09月06日 0 点赞 0 评论 577 浏览 评分:0.0
1114: C语言考试练习题_排列(dfs) 摘要:解题思路:dfs全排列注意事项:题目的输出顺序, 依次排除第 4 - 1 个数字参考代码:#include<iostream> #include<cmath> using namespace st…… 题解列表 2024年08月10日 0 点赞 0 评论 594 浏览 评分:0.0
1114排序(暴力破解) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[5]; for (int i = 1; i <= 4;…… 题解列表 2024年06月11日 0 点赞 0 评论 701 浏览 评分:0.0
算法思维弱,尽力了 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void sc (int a,int b, int c){ cout << a…… 题解列表 2024年06月03日 1 点赞 0 评论 548 浏览 评分:0.0
c语言简单思路,拿走不谢 摘要:分两部分分析:1,4个数中选3个。2,选出来的3个排列组合。ok,思路清晰了下面废话不多说直接展示。参考代码:#include <stdio.h> int main() { int a[4],…… 题解列表 2024年05月30日 0 点赞 0 评论 704 浏览 评分:0.0
不用循环,总共21行代码搞定!! 摘要: **本题的思路大致为先将给出的四个数字进行四选三的组合,再将选出来的三个数字进行排序,那么就有两种实现方案: (1)将给出的四个数字写进数组里,进行数组的循环挑选遍历; (2)将选出来的三个数…… 题解列表 2024年03月28日 2 点赞 0 评论 1039 浏览 评分:10.0