# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
340979 | rqi | Broken Device (JOI17_broken_device) | C++14 | 49 ms | 3356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
vi res(150, 0);
bool bad[150];
void Anna( int N, ll _X, int K, int P[] ){
bitset<60> X = bitset<60>(_X);
for(int i = 0; i < K; i++){
bad[P[i]] = 1;
}
bool frontbad = 0;
for(int i = 0; i < 60; i++){
if(bad[i]) frontbad = 1;
}
if(!frontbad){
for(int i = 0; i < 60; i++){
res[i] = X[i];
}
}
else{
for(int i = 0; i < 60; i++){
res[90+i] = X[i];
}
}
for(int i = 0; i < N; i++){
Set(i, res[i]);
//cout << res[i];
}
//cout << "\n";
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
long long Bruno( int N, int A[] ){
bool frontbad = 1;
for(int i = 0; i < 60; i++){
if(A[i] == 1) frontbad = 0;
}
bitset<60> X;
if(!frontbad){
for(int i = 0; i < 60; i++){
X[i] = A[i];
}
}
else{
for(int i = 0; i < 60; i++){
X[i] = A[90+i];
}
}
//cout << ll(X.to_ulong()) << "\n";
return ll(X.to_ulong());
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |