| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 205528 | 宋明熙 | 全排列问题 | C++ | Wrong Answer | 0 | 0 MS | 240 KB | 501 | 2026-03-01 20:17:07 |
#include <bits/stdc++.h> using namespace std; int n; vector<int> a; bool u[10]; void dfs() { if (a.size() == n) { for (int i = 0; i < n; ++i) cout << a[i] << ' '; cout << '\n'; return; } for (int i = 1; i <= n; ++i) { if (!u[i]) { a.push_back(i); u[i] = true; dfs(); u[i] = false; a.pop_back(); } } } int main() { cin >> n; dfs(); return 0; }