| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1328468 | QuocSensei | ICC (CEOI16_icc) | C++20 | 170 ms | 616 KiB |
#include "icc.h"
#include <bits/stdc++.h>
#define ll long long
#define el cout << endl
#define ii pair<int, int>
#define fi first
#define se second
using namespace std;
const int maxn = 1e2;
int do_query(vector<int> a, vector<int> b)
{
int sz_a = a.size();
int sz_b = b.size();
int _a[sz_a];
int _b[sz_b];
for (int i = 0; i < sz_a; i++)
_a[i] = a[i];
for (int i = 0; i < sz_b; i++)
_b[i] = b[i];
return query(sz_a, sz_b, _a, _b);
}
namespace SUBTASK_1
{
int n;
bool check[maxn + 10][maxn + 10];
void run(int N)
{
n = N;
for (int _ = 1; _ <= n - 1; _++)
{
for (int i = 1; i <= n; i++)
{
bool flag = 0;
for (int j = i + 1; j <= n; j++)
{
if (check[i][j])
continue;
if (do_query({i}, {j}))
{
setRoad(i, j);
check[i][j] = 1;
flag = 1;
break;
}
}
if (flag)
break;
}
}
}
bool check_sub(int n)
{
return n == 15;
}
};
namespace SUBTASK_2
{
int n;
set<int> st[maxn + 10];
void run(int N)
{
n = N;
for (int i = 1; i <= n; i++)
{
st[i].clear();
for (int j = 1; j <= n; j++)
if (i != j)
st[i].insert(j);
}
for (int _ = 1; _ < n; _++)
{
vector<int> x;
for (int i = 1; i <= n; i++)
{
if (st[i].empty())
continue;
vector<int> y;
for (int x : st[i])
y.push_back(x);
if (do_query({i}, y))
x.push_back(i);
}
st[x[0]].erase(x[1]);
st[x[1]].erase(x[0]);
setRoad(x[0], x[1]);
}
}
};
void run(int N)
{
SUBTASK_1::run(N);
}| # | 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... | ||||
