# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
572940 | MohamedFaresNebili | Art Collections (BOI22_art) | C++17 | 1397 ms | 712 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "art.h"
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
#define pb push_back
#define pp pop_back
#define ff first
#define ss second
#define lb lower_bound
#define all(x) (x).begin(), (x).end()
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> indexed_set;
void solve(int N) {
int income[N + 1]{0};
for(int l = 1; l <= N; l++) {
vector<int> R;
for(int i = 1; i <= N; i++) {
if(i == l) continue;
R.pb(i);
}
R.pb(l); int A = publish(R);
R.clear(); R.pb(l);
for(int i = 1; i <= N; i++) {
if(i == l) continue;
R.pb(i);
}
int B = publish(R);
income[l] = (N + A - B) / 2;
}
vector<int> R;
for(int l = N - 1; l >= 0; l--) {
for(int i = 1; i <= N; i++) {
if(income[i] != l) continue;
R.pb(i); break;
}
}
answer(R);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |