# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
448137 | JovanB | Broken Device (JOI17_broken_device) | C++17 | 2 ms | 624 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll K = 626237348924392349LL;
static int radi[1005];
void Anna(int _n, long long X, int _k, int P[] ){
int n = _n;
int k = _k;
for(int i=0; i<n; i++) radi[i] = 1;
for(int i=0; i<k; i++) radi[P[i]] = 0;
X ^= K;
int j = 0;
for(int i=0; i<38; i++){
int treba = X%3;
X /= 3;
treba++;
for(;;){
if(treba/2 <= radi[j] && treba%2 <= radi[j+1]){
Set(j, treba/2);
Set(j+1, treba%2);
j += 2;
break;
}
Set(j, 0);
Set(j+1, 0);
j += 2;
}
}
while(j < n){
Set(j, 0);
j++;
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll K = 626237348924392349LL;
long long Bruno( int N, int A[] ){
int j = 0;
ll p3 = 1;
ll res = 0;
for(int i=0; i<38; i++){
int tr;
for(;;){
tr = 2*A[j] + A[j+1];
j += 2;
if(tr) break;
}
res += (tr-1)*p3;
p3 *= 3;
}
return res ^ K;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |