# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15963 | myungwoo | Sequence (BOI14_sequence) | C++14 | 223 ms | 2884 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 MAXN 100005
#define pb push_back
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
typedef long long lld;
int N;
int A[MAXN];
lld dfs(vector<int> &arr, bool last_zero)
{
if (sz(arr) == 1){
lld ret = 0;
for (int i=1;i<10;i++) if (arr[0] & (1 << i)){
ret = ret*10 + i;
if ((arr[0] & 1) && ret) ret *= 10, arr[0] ^= 1;
}
if (arr[0] & 1) ret = ret ? ret*10 : 10;
return ret ? ret : last_zero;
}
lld ret = 123456789000000L;
for (int i=0;i<10;i++){
vector <int> nxt = {0};
int k = i;
for (int t: arr){
if (k == 10) k = 0, nxt.pb(0);
int &b = nxt[sz(nxt)-1];
# | 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... |