| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 703935 | Chal1shkan | Art Collections (BOI22_art) | C++17 | 180 ms | 292 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"
# define pb push_back
# define ff first
# define ss second
# define nl "\n"
# define sz(x) ((int)(x).size())
# define deb(x) cerr << #x << " = " << x << endl;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const ll maxn = 2e5 + 25;
const ll inf = 2e9 + 0;
const ll mod = 998244353;
const ll dx[] = {-1, 1, 0, 0};
const ll dy[] = {0, 0, -1, 1};
using namespace std;
int n;
bool cmp (int x, int y)
{
vector <int> v;
v.pb(x);
v.pb(y);
bool used[n + 3] = {0};
used[x] = used[y] = 1;
for (int i = 1; i <= n; ++i)
{
if (!used[i])
{
v.pb(i);
}
}
int cnt1 = publish(v);
swap(v[0], v[1]);
int cnt2 = publish(v);
if (cnt2 == cnt1 + 1)
{
return 1;
}
else
{
return 0;
}
}
void solve (int N)
{
n = N;
vector <int> v;
for (int i = 1; i <= n; ++i) v.pb(i);
stable_sort(v.begin(), v.end(), cmp);
answer(v);
}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... | ||||
