이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//bs:sanitizers,flags:grader.cpp
#include "dango3.h"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
namespace x = __gnu_pbds;
template <typename T>
using ordered_set = x::tree<T, x::null_type, less<T>, x::rb_tree_tag, x::tree_order_statistics_node_update>;
template <typename T>
using normal_queue = priority_queue<T, vector<T>, greater<>>;
#define all(x) begin(x), end(x)
#define sz(x) ((int) (x).size())
#define x first
#define y second
using ll = long long;
using ld = long double;
const int N = 410, M = 26, V = N * M;
int group[V];
void Solve(int n, int m) {
fill(all(group), -1);
int cnt = 0;
for (int i = 0; i < n * m; ++i) {
if (group[i] != -1) {
continue;
}
group[i] = cnt++;
for (int j = i + 1; j < n * m; ++j) {
if (group[j] != -1) {
continue;
}
vector<int> vals(n * m);
iota(all(vals), 1);
vals.erase(find(all(vals), i + 1));
vals.erase(find(all(vals), j + 1));
if (Query(vals) == m - 2) {
group[j] = group[i];
}
}
}
vector<int> b[n];
for (int i = 0; i < n * m; ++i) {
b[group[i]].push_back(i + 1);
}
for (int i = 0; i < m; ++i) {
vector<int> c(n);
for (int j = 0; j < n; ++j) {
c[j] = b[j][i];
}
Answer(c);
}
}
# | 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... |