| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1361521 | kawhiet | Art Collections (BOI22_art) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
#include "art.h"
using namespace std;
void solve(int n) {
vector<int> a(n);
iota(a.begin(), a.end(), 1);
vector<set<int>> s(n + 1);
int x = publish(a);
for (int t = 0; t < n; t++) {
for (int i = 1; i < n; i++) {
int j = i - 1;
if (s[a[j]].count(a[i])) {
continue;
}
swap(a[i], a[j]);
int y = publish(a);
if (y == x - 1) {
s[a[j]].insert(a[i]);
x = y;
if (x == 0) {
answer(a);
}
} else {
s[a[i]].insert(a[j]);
swap(a[i], a[j]);
}
}
}
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
