답안 #561583

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
561583 2022-05-13T08:05:35 Z amunduzbaev Broken Device (JOI17_broken_device) C++17
컴파일 오류
0 ms 0 KB
#include "Brunolib.h"
#include "bits/stdc++.h"
using namespace std;

long long Bruno( int n, int a[] ){
	int b = 1, l = -1;
	const int M = 4;
	int val = 0, t = 0;
	for(int i=0;i<n && t < M;i++){
		if(!a[i]) continue;
		if(a[i]){
			val |= (a[i + 1] << t);
			t++, i++, l = i + 1;
		}
	}
	
	if(l == -1) return 0ll;
	b = val + 1;
	int bit = 0;
	long long x = 0;
	for(int i=l;i<n;i++){
		if(a[i]){
			for(int j=i+1;j<=i+b && bit < 60;j++){
				x |= ((a[j] * 1ll) << bit);
				bit++;
			}
			
			i += b;
		}
	}
	
	//~ cout<<x<<endl;
	return x;
}



    

Compilation message

/usr/bin/ld: /tmp/ccjrXbDB.o: in function `main':
grader_anna.c:(.text.startup+0x10b): undefined reference to `Anna(int, long long, int, int*)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/ccjSY5en.o: in function `main':
grader_bruno.cpp:(.text.startup+0x13d): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status