# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1077759 | coolboy19521 | Beautiful row (IZhO12_beauty) | C++17 | 1087 ms | 180992 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"
#define ll long long
using namespace std;
const int sz = 22;
ll dp[1 << sz][sz];
int tr[sz], tw[sz];
bool ok[sz][sz];
int a[sz];
int cO(int a, int b) {
int r = 0;
for (int c = a; c; c /= b)
r += 1 == c % b;
return r;
}
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i ++)
cin >> a[i];
for (int i = 0; i < n; i ++) {
tw[i] = cO(a[i], 2);
tr[i] = cO(a[i], 3);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |