# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
336131 | tevdore | Beautiful row (IZhO12_beauty) | C++14 | 911 ms | 205804 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;
int const N = 1 << 23;
int n;
ll a[25], dp[N][25], F1[25], F2[25];
ll ans;
int bin(ll x) {
int r = 0;
while(x) {
r += x % 2;
x /= 2;
}
return r;
}
int ter(ll x) {
int r = 0;
while(x) {
r += (x % 3 == 1);
x /= 3;
}
return r;
}
main() {
ios::sync_with_stdio(0);
cin.tie();
cin >> n;
for(int i = 1; i <= n; i++) cin >> a[i];
int mask = 1 << n;
mask--;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |