Submission #1204077

#TimeUsernameProblemLanguageResultExecution timeMemory
1204077Ghulam_JunaidBroken Device (JOI17_broken_device)C++20
0 / 100
1 ms320 KiB
#include <bits/stdc++.h> #include "Annalib.h" using namespace std; typedef long long ll; void Anna(int n, ll X, int m, int pos[] ){ int i = 0, b = 0, p = 0; while (i < n){ if (b >= 60){ Set(i, 0); i++; continue; } while (p < m and pos[p] < i) p++; if (p < m and pos[p] == i){ Set(i, 0); i++; continue; } if (p < m and pos[p] == i + 1){ if ((1ll << b) & X){ Set(i, 0); i++; continue; } Set(i, 1); i++; b++; continue; } Set(i, 1); i++; if ((1ll << b) & X) Set(i, 1); else Set(i, 0); i++; b++; } }
#include <bits/stdc++.h> #include "Brunolib.h" using namespace std; typedef long long ll; ll Bruno(int N, int A[]){ int i = 0; ll b = 0; ll x = 0; while (i < N){ if (b >= 60) return x; if (!A[i]){ i++; continue; } x += (1ll << b) * (A[i + 1]); i += 2; b++; } return x; }
#Verdict Execution timeMemoryGrader output
Fetching results...