| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 359206 | 田钰皓 | 【C6-7】全排列 | C++ | 通过 | 100 | 76 MS | 248 KB | 354 | 2025-11-01 14:45:23 |
#include<bits/stdc++.h> using namespace std; int n; int p[10]; bool a[10]; void joker(int x){ if(x==n){ for(int i=0;i<n;i++){ cout<<p[i]<<" "; } puts(""); return ; } for(int i=1;i<=n;i++){ if(!a[i]){ a[i]=true; p[x]=i; joker(x+1); a[i]=false; } } } int main(){ cin>>n; joker(0); return 0; }