C++ : 豆包写的,用to_string()和next_permutation()实现全排列 摘要:解题思路:我解释我提供给豆包的思路:不能重复,所以我想使用set容器set容器,我当时寻思着放int类型的元素,然后一个个拆出来输出,豆包直接使用string类型输出3个数字,所以我感觉是3个for循…… 题解列表 2025年04月22日 0 点赞 0 评论 103 浏览 评分: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 评论 359 浏览 评分:0.0
C++容器(深度优先遍历算法)解题 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <vector>#include <set>#include <algorithm>using namespace…… 题解列表 2024年09月06日 0 点赞 0 评论 295 浏览 评分:0.0
1114: C语言考试练习题_排列(dfs) 摘要:解题思路:dfs全排列注意事项:题目的输出顺序, 依次排除第 4 - 1 个数字参考代码:#include<iostream> #include<cmath> using namespace st…… 题解列表 2024年08月10日 0 点赞 0 评论 288 浏览 评分:0.0
1114排序(暴力破解) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[5]; for (int i = 1; i <= 4;…… 题解列表 2024年06月11日 0 点赞 0 评论 237 浏览 评分:0.0
算法思维弱,尽力了 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void sc (int a,int b, int c){ cout << a…… 题解列表 2024年06月03日 0 点赞 0 评论 226 浏览 评分:0.0
c语言简单思路,拿走不谢 摘要:分两部分分析:1,4个数中选3个。2,选出来的3个排列组合。ok,思路清晰了下面废话不多说直接展示。参考代码:#include <stdio.h> int main() { int a[4],…… 题解列表 2024年05月30日 0 点赞 0 评论 338 浏览 评分:0.0
不用循环,总共21行代码搞定!! 摘要: **本题的思路大致为先将给出的四个数字进行四选三的组合,再将选出来的三个数字进行排序,那么就有两种实现方案: (1)将给出的四个数字写进数组里,进行数组的循环挑选遍历; (2)将选出来的三个数…… 题解列表 2024年03月28日 1 点赞 0 评论 555 浏览 评分:9.9
1114: C语言考试练习题_排列c++代码 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; int a[10],op[10],box[10]; bool vis[1…… 题解列表 2024年03月24日 0 点赞 0 评论 200 浏览 评分:8.0
114: C语言考试练习题_排列 摘要:解题思路:输出是有规律的,不是随便排序的。 先排序1,2,3再1,2,4再1,3,4再2,3,4. 我们会发现循环删去最后一 题解列表 2024年03月12日 1 点赞 0 评论 230 浏览 评分:7.0