Submission #753500

#TimeUsernameProblemLanguageResultExecution timeMemory
753500piOOEBroken Device (JOI17_broken_device)C++17
69 / 100
41 ms2792 KiB
#include "Annalib.h" #include <bits/stdc++.h> using namespace std; using ll = long long; constexpr ll Y = 439789002196527822LL; void Anna(int N, long long X, int K, int P[]) { vector<int> a(N), used(N); X ^= Y; for (int i = 0; i < K; ++i) { used[P[i]] = true; } for (int i = 0, b = 0; i < N; ++i) { if (!used[i] && (X >> b & 1) == (i & 1)) { a[i] = 1; b += 1; } } for (int i = 0; i < N; i++) { Set(i, a[i]); } }
#include "Brunolib.h" #include <bits/stdc++.h> using namespace std; using ll = long long; constexpr ll Y = 439789002196527822LL; long long Bruno(int N, int A[]) { ll X = 0; for (int i = 0, b = 0; i < N; ++i) { if (A[i]) { X |= (i & 1LL) << b; b += 1; } } X ^= Y; return X; }
#Verdict Execution timeMemoryGrader output
Fetching results...