| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 359201 | 田钰皓 | 【C6-7】全排列 | C++ | Accepted | 100 | 58 MS | 256 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; }