Submission #1034672

#TimeUsernameProblemLanguageResultExecution timeMemory
1034672adaawfBroken Device (JOI17_broken_device)C++17
8 / 100
32 ms3032 KiB
#include "Annalib.h" #include <bits/stdc++.h> using namespace std; void Anna(int N, long long int X, int K, int P[]) { set<int> s; for (int i = 0; i < K; i++) { s.insert(P[i]); } for (int i = 0; i < N; i++) { if ((X & (1ll << (i % 60))) && !s.count(i)) { Set(i, 1); } else { Set(i, 0); } } }
#include "Brunolib.h" #include <bits/stdc++.h> using namespace std; int dd[65]; long long int Bruno(int N, int A[]) { for (int i = 0; i < 61; i++) dd[i] = 0; for (int i = 0; i < N; i++) { if (A[i] == 1) { dd[i % 60] = 1; } } long long int res = 0; for (int i = 0; i < 60; i++) { if (dd[i] == 1) { res += (1ll << i); } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...