# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
131609 | Osama_Alkhodairy | Broken Device (JOI17_broken_device) | C++17 | 51 ms | 3312 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
//~ #include "grader.cpp"
//~ #include "Bruno.cpp"
#include "Annalib.h"
using namespace std;
void Anna( int N, long long X, int K, int P[] ){
auto set = [&](int x, int y){
if(x < 0 || x >= N) return;
Set(x, y);
};
vector <int> p;
for(int i = 0 ; i < K ; i++){
p.push_back(P[i]);
}
int ind = 0;
for(int i = 59 ; i >= 0 ; i--){
if(count(p.begin(), p.end(), ind + 1)){
Set(ind++, 0);
i++;
continue;
}
if(count(p.begin(), p.end(), ind)){
Set(ind++, 0);
i++;
continue;
}
set(ind++, 1);
set(ind++, (X >> i) & 1);
}
while(ind < N) set(ind++, 0);
}
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
#define ll long long
long long Bruno( int N, int A[] ){
ll ret = 0;
int ind = 0;
while(ind < N){
if(A[ind] == 0){
ind++;
continue;
}
ret = ret * 2 + A[ind + 1];
ind += 2;
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |