当前位置:网站首页>[ssl1280] full arrangement
[ssl1280] full arrangement
2022-06-13 09:35:00 【Ayane.】

analysis :
n e x t _ p e r m u t a t i o n next\_permutation next_permutation
CODE:
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#define reg register
using namespace std;
typedef long long ll;
int n,a[11];
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++)
a[i]=i;
sort(a+1,a+n+1);
do{
for(int i=1;i<=n;i++)
printf("%d ",a[i]);
printf("\n");
}while(next_permutation(a+1,a+n+1));
return 0;
}
边栏推荐
- LeetCode 583. Deleting two strings
- 计算两个时间相差的天数(支持跨月、跨年)
- C # introductory series (XIII) -- getting to know the structure for the first time
- Storage mode of drawings
- Dpdk timer learning notes
- Jenkins集成Ldap,Ldap配置错误导致jenkins用户登录失败问题解决
- MOOC week 8 programming exercise 1
- Solov2 nanny level tutorial (including environment configuration, training your own data set, code logic analysis, etc...) Updating ing
- C language: recursive function to realize Hanoi Tower
- Immutability of shared model
猜你喜欢

C language: dynamic memory management

Classes and objects -- Inheritance

acwing 789. Range of numbers (dichotomy + suitable for understanding dichotomy boundary)

Figure introduction to database neo4j
![1-4 message passing interface [CSP authentication]](/img/db/aecda548693cdfb0e740bcf1a1c823.jpg)
1-4 message passing interface [CSP authentication]

turtle库显示系统时间

C language: recursive function to realize Hanoi Tower

(dp+ memory) acwing 901 skiing

202012 CCF test questions

Heap
随机推荐
Heap
LeetCode 6096. Success logarithm of spells and potions (binary search)
How to build an aby framework and run an instance
(Dijkstra + shortest circuit + by point n^2) acwing 849 Dijkstra finding the shortest path I
LeetCode 6097. Match after replacing characters (Dictionary)
Batch read all voice files under the folder
Exporting MySQL data table documents using Navicat
(dfs) acwing 842. Arrange numbers
Tree and binary tree: basic operation and implementation of binary tree
静态变量与一个类相关联,只要该类在内存中(只要您的应用程序终止,该变量就不存在)就可以使用。(堆本体,栈引用)
(tree DP) acwing 285 A dance without a boss
(topological sorting +bfs) acwing 848 Topological sequence of digraph
C language: data storage in memory
(bfs+GOOD) acwing 845. Eight digit
Zigzag transformation
Can the operation of the new BMW I3 meet the expectations of the famous products of the 3 series?
QML(06)——qml. Add a new folder under QRC
1-4 message passing interface [CSP authentication]
Simple implementation of database link pool
批量读取文件夹下的全部语音文件