# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1075016 | matthew | Norela (info1cup18_norela) | C++17 | 4 ms | 348 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 <stdio.h>
#include <vector>
const int MAXM = 24;
std::vector<int> v[MAXM];
int res;
int popcount(int a) {
int cnt = 0;
while(a > 0) {
cnt++;
a &= a - 1;
}
return cnt;
}
void bkt(int pos, int m, int n, long long mask, int op) {
if(pos >= m) {
if(mask == (1LL << n) - 1 && (popcount(op) < popcount(res) ||
(popcount(op) == popcount(res) && op < res))) {
res = op;
}
} else {
int i;
bkt(pos + 1, m, n, mask, op);
op |= (1 << pos);
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... |