# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
927584 | mohammedMonem | cmp (balkan11_cmp) | C++14 | 1158 ms | 106832 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 "cmp.h"
#include <bits/stdc++.h>
using namespace std;
void remember(int n) {
bitset<12> bsn = n;
for (int i = 0; i < bsn.size(); ++i) {
if (bsn[i]) {
bit_set(i + 1);
}
}
}
int compare(int b) {
bitset<12> bsb = b;
for (int i = bsb.size() - 1; i >= 0; --i) {
int get = bit_get(i + 1);
if (bsb[i] > get) {
return 1;
} else if (bsb[i] < get) {
return -1;
}
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |