2146: 信息学奥赛一本通T1317-组合的输出 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; …… 题解列表 2024年12月01日 0 点赞 0 评论 776 浏览 评分:9.9
C++_DFS(深度优先搜索) 摘要:参考代码:#include<iostream>#include<algorithm>#include<cstdio>using namespace std;int const N =30;int n,…… 题解列表 2023年10月20日 0 点赞 0 评论 708 浏览 评分:9.5
Java信息学奥赛一本通T1317-组合的输出 注意输出格式化importjava.util.ArrayList;importjava.util.LinkedList;importjava.util.List;importjava.util.Scanner;publicclassT2146{staticArrayListlist=newArrayL 题解列表 2023年03月23日 0 点赞 0 评论 886 浏览 评分:8.4
信息学奥赛一本通T1317-组合的输出(格式错误的看过来!!!) 看important!!!```cpp#include#includeusingnamespacestd;int*stack;inttop;intn,r;intvis[21]={0};voidDFS(intstartindex){if(top==r){for(inti=0;i 题解列表 2022年02月21日 0 点赞 4 评论 1433 浏览 评分:7.3 每一行都有解释的c++代码(组合的输出) 摘要:参考代码:#include<bits/stdc++.h>//c++万能头文件using namespace std;//可以不写,不写的话在前面加上std::int m, n;//定义两个变量用于承载…… 题解列表 2024年11月07日 1 点赞 0 评论 860 浏览 评分:7.3 信息学奥赛一本通T1317-组合的输出 摘要:解题思路:- combination 函数是一个递归函数,用于生成组合。- 当 index 等于 r 时,说明已经生成了一个组合,输出该组合。- 在循环中,从 start 到 n 遍历,将当前数字加…… 题解列表 2024年10月09日 0 点赞 0 评论 752 浏览 评分:7.3 模拟数的进位运算 摘要:解题思路:如下注意事项:参考代码:#include<stdio.h>int main(){ int n,r; scanf("%d%d",&n,&r); …… 题解列表 2024年07月24日 1 点赞 0 评论 921 浏览 评分:7.3 Python 深度优先算法(DFS) 摘要:解题思路:注意事项:参考代码:n,r = map(int,input().strip().split()) nums = [i for i in range(1,n+1)] result = []…… 题解列表 2023年03月16日 0 点赞 0 评论 842 浏览 评分:6.0 最易懂的代码 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n,r;int arr[30];void func(int x,int st…… 题解列表 2024年10月31日 0 点赞 0 评论 659 浏览 评分:6.0 C语言解组合的输出 摘要:解题思路:注意事项:注意输出格式参考代码:#include <stdio.h>#include <stdbool.h>int n,r;bool judge[25];int b[25];void arr…… 题解列表 2023年07月20日 0 点赞 0 评论 713 浏览 评分:2.0 « 12 »
每一行都有解释的c++代码(组合的输出) 摘要:参考代码:#include<bits/stdc++.h>//c++万能头文件using namespace std;//可以不写,不写的话在前面加上std::int m, n;//定义两个变量用于承载…… 题解列表 2024年11月07日 1 点赞 0 评论 860 浏览 评分:7.3
信息学奥赛一本通T1317-组合的输出 摘要:解题思路:- combination 函数是一个递归函数,用于生成组合。- 当 index 等于 r 时,说明已经生成了一个组合,输出该组合。- 在循环中,从 start 到 n 遍历,将当前数字加…… 题解列表 2024年10月09日 0 点赞 0 评论 752 浏览 评分:7.3
模拟数的进位运算 摘要:解题思路:如下注意事项:参考代码:#include<stdio.h>int main(){ int n,r; scanf("%d%d",&n,&r); …… 题解列表 2024年07月24日 1 点赞 0 评论 921 浏览 评分:7.3
Python 深度优先算法(DFS) 摘要:解题思路:注意事项:参考代码:n,r = map(int,input().strip().split()) nums = [i for i in range(1,n+1)] result = []…… 题解列表 2023年03月16日 0 点赞 0 评论 842 浏览 评分:6.0
最易懂的代码 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n,r;int arr[30];void func(int x,int st…… 题解列表 2024年10月31日 0 点赞 0 评论 659 浏览 评分:6.0
C语言解组合的输出 摘要:解题思路:注意事项:注意输出格式参考代码:#include <stdio.h>#include <stdbool.h>int n,r;bool judge[25];int b[25];void arr…… 题解列表 2023年07月20日 0 点赞 0 评论 713 浏览 评分:2.0