Submission #1074723

#TimeUsernameProblemLanguageResultExecution timeMemory
1074723thinknoexitBroken Device (JOI17_broken_device)C++17
41 / 100
27 ms3360 KiB
#include "Annalib.h" #include<bits/stdc++.h> using namespace std; using ll = long long; namespace { int n; bool ch[155]; } void Anna(int N, ll x, int K, int P[]) { n = N; for (int i = 0;i < n;i++) ch[i] = 1; for (int i = 0;i < K;i++) ch[P[i]] = 0; ll now = 59; for (int i = 0;i < n;i++) { if (now == -1) { Set(i, 0); continue; } if (ch[i] && ch[i + 1]) { Set(i, 1); Set(i + 1, (x >> (now--)) & 1ll); i++; } else Set(i, 0); } }
#include "Brunolib.h" #include<bits/stdc++.h> using namespace std; using ll = long long; int n; ll Bruno(int N, int A[]) { ll res = 0; n = N; for (int i = 0;i < n;i++) { if (A[i] == 1) { res = (res << 1ll) | A[i + 1]; i++; } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...