답안 #89550

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
89550 2018-12-15T14:59:44 Z igzi Broken Device (JOI17_broken_device) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "Annalib.h"

using namespace std;

int a[155]={118, 71, 75, 109, 56, 22, 70, 112, 98, 47, 19, 94, 33, 132, 102, 72, 134, 37, 101, 50, 104, 46, 107, 66, 96, 14, 57, 100, 129, 73, 64, 28, 111, 27, 138, 126, 55, 35, 54, 139, 6, 40, 83, 42, 4, 116, 144, 140, 108, 3, 106, 39, 131, 9, 10, 69, 11, 68, 44, 38, 81, 148, 36, 26, 43, 86, 149, 8, 78, 80, 82, 113, 13, 5, 84, 130, 115, 76, 16, 124, 137, 122, 79, 67, 65, 20, 60, 59, 17, 34, 49, 87, 25, 119, 51, 105, 135, 89, 146, 125, 61, 74, 121, 62, 91, 2, 58, 120, 32, 85, 143, 127, 63, 133, 88, 24, 1, 30, 141, 147, 93, 103, 53, 95, 136, 12, 77, 123, 52, 0, 117, 48, 21, 7, 90, 145, 18, 29, 99, 23, 15, 41, 142, 114, 92, 110, 97, 31, 45, 128};
bool b[155];

void Anna( int N, long long x, int K, int P[]){
int i;
for(i=0;i<K;i++){
b[P[i]]=true;}
for(i=0;i<N;i+=2){
if(b[a[i]] || b[a[i+1]]) {Set(a[i],0); Set(a[i+1],0); continue;}
if(x%3==0) {Set(a[i],0); Set(a[i+1],1);}
if(x%3==1) {Set(a[i],1); Set(a[i+1],0);}
if(x%3==2) {Set(a[i],1); Set(a[i+1],1);}
x/=3;
}
}
#include <bits/stdc++.h>
#include "Brunolib.h."

using namespace std;

int a[155]={118, 71, 75, 109, 56, 22, 70, 112, 98, 47, 19, 94, 33, 132, 102, 72, 134, 37, 101, 50, 104, 46, 107, 66, 96, 14, 57, 100, 129, 73, 64, 28, 111, 27, 138, 126, 55, 35, 54, 139, 6, 40, 83, 42, 4, 116, 144, 140, 108, 3, 106, 39, 131, 9, 10, 69, 11, 68, 44, 38, 81, 148, 36, 26, 43, 86, 149, 8, 78, 80, 82, 113, 13, 5, 84, 130, 115, 76, 16, 124, 137, 122, 79, 67, 65, 20, 60, 59, 17, 34, 49, 87, 25, 119, 51, 105, 135, 89, 146, 125, 61, 74, 121, 62, 91, 2, 58, 120, 32, 85, 143, 127, 63, 133, 88, 24, 1, 30, 141, 147, 93, 103, 53, 95, 136, 12, 77, 123, 52, 0, 117, 48, 21, 7, 90, 145, 18, 29, 99, 23, 15, 41, 142, 114, 92, 110, 97, 31, 45, 128};

long long Bruno( int N, int A[]){
int i;
long long ans,st;
ans=0;
st=1;
for(i=0;i<N;i+=2){
if(A[a[i]]==0 && A[a[i+1]]==0) continue;
if(A[a[i]]==1 && A[a[i+1]]==0) ans+=st;
if(A[a[i]]==1 && A[a[i+1]]==1) ans+=2*st;
st*=3;
}
return ans;
}

Compilation message

Bruno.cpp:2:10: fatal error: Brunolib.h.: No such file or directory
 #include "Brunolib.h."
          ^~~~~~~~~~~~~
compilation terminated.