# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
297297 | shivensinha4 | Longest beautiful sequence (IZhO17_subsequence) | C++17 | 7 ms | 7040 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;
#define for_(i, s, e) for (int i = s; i < (int) e; i++)
#define for__(i, s, e) for (ll i = s; i < e; i++)
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
#define endl '\n'
const int MXA = (1 << 20) - 1, MXH = (1 << 10) - 1, MXN = 1e5;
int bc[MXA+2], bestVal[MXH+2][MXH+2][21], bestIdx[MXH+2][MXH+2][21], nxt[MXN+1];
int main() {
#ifdef shiven
freopen("test.in", "r", stdin);
#endif
ios_base::sync_with_stdio(false);
cin.tie(0);
for_(i, 0, MXA+1) bc[i] = __builtin_popcount(i);
int n; cin >> n;
vi a(n), b(n);
for_(i, 0, n) cin >> a[n-i-1];
for_(i, 0, n) cin >> b[n-i-1];
int ans = 0, start = -1;
for (int i = n-1; i >= 0; i--) {
int temp = 0, suc = -1;
int h1 = a[i] >> 10, h2 = a[i] & MXH;
# | 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... |