3336:【例57.3】火星人
[例 57.3] 火星人
/*
1929:【04NOIP普及组】火星人
http://ybt.ssoier.cn:8088/problem_show.php?pid=1929
https://blog.csdn.net/cherish0222/article/details/53204441
*/
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn = 10000+5;
int num[maxn];
int main()
{
int n,m;
while( scanf("%d%d",&n,&m) == 2)
{
for( int i = 0; i < n; i++)
scanf("%d",&num[i]);
for( int i = 0; i < m; i++)
next_permutation(num,num+n);
for( int i = 0; i < n; i++)
printf(i==n-1?"%d\n":"%d ",num[i]);
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int n,m,a[10010];
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++){
cin>>a[i];
}
for(;m--;){
next_permutation(a+1,a+1+n);
}
for(int i=1;i<=n;i++){
cout<<a[i]<<" ";
}
return 0;
}
3012:练4.1 阿布拉1(Scratch、C、C++、python)
3012:练4.1 阿布拉1(Scratch、C、C++、python)_尼克是一位好学的学生,他经常做实验。有一天他在做实验的时候需要交换一瓶 毫升的-CSDN博客
Python信息技术学考一本通题目讲解、python入门、python习题集整理汇总等
Python信息技术学考一本通题目讲解
Python等级考试(1级-6级)全套真题讲解| 2023年3月
用Python学习数学系列
电子学会python三级考试知识点讲解教学视频
跟着兔子一起研究学习,【Python基础- Python及其数学库】上
蓝桥STEMA竞赛Python模块(23年10月)
NOI题库 python题解