이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// chrono::system_clock::now().time_since_epoch().count()
#include "park.h"
#include<bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << " = " << x << endl;
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
namespace {
int subtask_no, n;
bool ask(int a, int b, vector<int> &vec) {
if (a > b) {
swap(a, b);
}
int tmp[n];
fill(tmp, tmp + n, 0);
for (int x : vec) {
tmp[x] = 1;
}
return Ask(a, b, tmp);
}
void report(int a, int b) {
Answer(a, b);
}
void solve() {
for (int a = 0; a < n; ++a) {
for (int b = a + 1; b < n; ++b) {
vector<int> S;
S.pb(a);
S.pb(b);
if (ask(a, b, S)) {
report(a, b);
}
}
}
}
};
void Detect(int T, int N) {
subtask_no = T;
n = N;
solve();
}
# | 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... |