# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
777729 | tch1cherin | Council (JOI23_council) | C++17 | 2675 ms | 35140 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>
using namespace std;
const int N = 20, C = sqrt(300000);
int c[2][1 << (N / 2)][1 << (N / 2)], ans[1 << N] = {}, cnt[N] = {};
vector<int> go[2][1 << (N / 2)];
int occ[1 << N] = {}, a[1 << N];
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int n, m;
cin >> n >> m;
auto fhalf = [](int x) { return x & ((1 << (N / 2)) - 1); };
auto shalf = [](int x) { return x >> (N / 2); };
auto concat = [](int x, int y) { return (x << (N / 2)) + y; };
for (int i = 0; i < n; i++) {
int mask = 0;
for (int j = 0; j < m; j++) {
int x;
cin >> x;
if (x == 1) {
cnt[j]++;
}
mask += x << j;
}
occ[mask]++;
go[0][fhalf(mask)].push_back(shalf(mask));
go[1][shalf(mask)].push_back(fhalf(mask));
a[i] = mask;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |