제출 #106667

#제출 시각아이디문제언어결과실행 시간메모리
106667thebesBroken Device (JOI17_broken_device)C++14
0 / 100
8 ms1020 KiB
#include "Annalib.h" #include <bits/stdc++.h> using namespace std; int lol[200], i, j; void Anna(int N, long long X, int K, int *P){ memset(lol, 0, sizeof(lol)); for(i=0;i<K;i++) lol[P[i]]=1; j = 60; for(i=0;i<N;i+=2){ if(j<0){ Set(i, 0); Set(i+1, 0); } if((1LL<<j)&X){ if(!lol[i]){ Set(i, 1); Set(i+1, 0); j--; } else{ Set(i, 0); Set(i+1, 0); } } else{ if(!lol[i+1]){ Set(i, 0); Set(i+1, 1); j--; } else{ Set(i, 0); Set(i+1, 0); } } } }
#include "Brunolib.h" #include <bits/stdc++.h> using namespace std; long long Bruno(int N, int *A){ long long ans = 0; int j = 60; for(int i=0;i<N;i+=2){ if(A[i]!=A[i+1]&&j>=0){ if(A[i]==1) ans += (1LL<<j); j--; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...