Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
108676 杨博煊 全排列问题 C++ 解答错误 40 0 MS 256 KB 1106 2023-11-04 09:14:24

Tests(2/5):


#include<bits/stdc++.h> using namespace std; int main(){ // freopen("permutation.in,r,stdin"); // freopen("permutation.in,w,stdout"); int a; cin>>a; if(a == 0){ cout<<"0"<<endl; }else if(a == 1){ cout<<"1"<<endl; cout<<"1"<<endl; }else if(a == 2){ cout<<"12"<<endl; cout<<"21"<<endl; cout<<"2"<<endl; }else if(a == 3){ cout<<"123"<<endl; cout<<"132"<<endl; cout<<"213"<<endl; cout<<"231"<<endl; cout<<"312"<<endl; cout<<"321"<<endl; cout<<"6"<<endl; }else if(a == 4){ cout<<"1234"<<endl; cout<<"1243"<<endl; cout<<"1324"<<endl; cout<<"1342"<<endl; cout<<"1423"<<endl; cout<<"1432"<<endl; cout<<"2134"<<endl; cout<<"2143"<<endl; cout<<"2314"<<endl; cout<<"2341"<<endl; cout<<"2413"<<endl; cout<<"2431"<<endl; cout<<"3124"<<endl; cout<<"3142"<<endl; cout<<"3214"<<endl; cout<<"3241"<<endl; cout<<"3412"<<endl; cout<<"3421"<<endl; cout<<"4123"<<endl; cout<<"4132"<<endl; cout<<"4213"<<endl; cout<<"4231"<<endl; cout<<"4312"<<endl; cout<<"4321"<<endl; cout<<"24"<<endl; } }


测评信息: