제출 #1351754

#제출 시각아이디문제언어결과실행 시간메모리
1351754killer_01Art Collections (BOI22_art)C++20
0 / 100
0 ms412 KiB
#include "art.h"    

#include <bits/stdc++.h>
using namespace std;

void solve(int n){
    vector<int> a(n);
    iota(a.begin(), a.end(), 1);

    for (int i = 0; i < n; i ++){
        int best = 1e9;
        vector<int> ja;
        for (int j = i + 1; j < n; j ++){
            swap(a[i], a[j]);
            int oldim = publish(a);
            if (oldim < best){
                best = oldim;
                ja = a;
            }
            swap(a[i], a[j]);
        }
        a = ja;
    }

    answer(a);
}
 
// signed main(){
//     ios::sync_with_stdio(false);
//     cin.tie(nullptr);
 
//     int t = 1;
//     // cin >> t; 
//     while (t --){
//         solve();
//         cout << endl;
//     }
// }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...