제출 #1343417

#제출 시각아이디문제언어결과실행 시간메모리
1343417BlockOGArt Collections (BOI22_art)C++20
100 / 100
691 ms528 KiB
#include <bits/stdc++.h>

// mrrrowwww meeowwwww :3
// go play vivid/stasis! !! !!! https://vividstasis.gay

#define fo(i, a, b) for (auto i = (a); i < (b); i++)
#define of(i, a, b) for (auto i = (b); i-- > (a);)
#define f first
#define s second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define be(a) a.begin(), a.end()
using namespace std;

int ____init = []{
    ios::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    return 0;
}();

int publish(vector<int>);
void answer(vector<int>);

void solve(int n) {
    vector<int> asked;
    fo(i, 0, n) {
        vector<int> ask;
        fo(j, 0, n) ask.pb((i + j) % n + 1);
        asked.pb(publish(ask));
    }
    asked.pb(asked[0]);

    vector<int> res(n);
    fo(i, 0, n) {
        res[(asked[i] - asked[i + 1] + n - 1) / 2] = i + 1;
    }
    answer(res);
}
#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...