3452:【例82.2】 座次问题
[例82.2] 座次问题
【信息学奥赛一本通-编程启蒙】3452【例82.2】 座次问题
/*
3452:【例82.2】 座次问题
http://bas.ssoier.cn:8086/problem_show.php?pid=3452
*/
#include <bits/stdc++.h>
using namespace std;
int main( )
{
vector<string> M1;
vector<int> M2;
int N;
string name;
cin>>N;
for(int i=0;i<N;i++)
{
cin>>name;
M1.push_back(name);
M2.push_back(i);
}
do{
for( vector<int>::iterator it=M2.begin();it!=M2.end();it++){
cout<<M1[(*it)]<<" ";
}
cout<<endl;
}while(next_permutation(M2.begin(),M2.end()));
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<string>M1;
vector<int>M2;
int N;
string name;
cin>>N;
for(int i=0;i<N;i++)
{
cin>>name;
M1.push_back(name);
M2.push_back(i);
}
do
{
for(vector<int>::iterator it=M2.begin();it!=M2.end();it++)
{
cout<<M1[(*it)]<<" ";
}
cout<<endl;
}while(next_permutation(M2.begin(),M2.end()));
return 0;
}
NOI题库 scratch题解
python算法
信息技术学考一本通(python)
信息技术学考一本通(python)1036:【例4.1】输出连续10个数(浙版)
信息技术学考一本通(python)1036:【例4.1】输出连续10个数(浙版)_信息技术学考python一本通-CSDN博客
信息技术学考一本通(python)-1062:练4.13 水仙花数
Python信息技术学考一本通题目讲解、python入门、python习题集整理汇总等
Python信息技术学考一本通题目讲解、python入门、python习题集整理汇总等_信息学奥赛一本通python网站-CSDN博客
3012:练4.1 阿布拉1(Scratch、C、C++、python)
3012:练4.1 阿布拉1(Scratch、C、C++、python)_尼克是一位好学的学生,他经常做实验。有一天他在做实验的时候需要交换一瓶 毫升的-CSDN博客
Python信息技术学考一本通题目讲解、python入门、python习题集整理汇总等
Python信息技术学考一本通题目讲解