답안 #313384

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
313384 2020-10-15T23:04:20 Z bigg Broken Device (JOI17_broken_device) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#include "Annalib.h"
using namespace std;

void Anna( int N, long long X, int K, int P[] ){
  int marc[200], isbit[200];
	memset(marc, 0, sizeof(marc));
	memset(isbit, 0, sizeof(isbit));
	int itlista = 0;
	for(int i = 0; i < K; i++) marc[P[i]] = 1;
	for(ll itreal = 0; itreal <= 60; itreal++){
		while((marc[itlista] || marc[itlista + 1]) && itlista < N - 2)	itlista++;
		isbit[itlista] = 1;
		itlista++;
		if(itlista > N - 1) break;
		isbit[itlista] = ((1LL<<itreal) & X) ? 1 : 0;
		//printf("%d\n", itlista );
		itlista++;
		if(itlista > N-1) break;
	}
	for(int i = 0; i < N; i++) Set(i, isbit[i]);
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
long long Bruno( int N, int A[] ){
  	ll itreal = 0;
	ll resp = 0;
	for(int ilista = 0; ilista < N - 1&& itreal <= 60; ilista++ ){
		if(!A[ilista]) continue;
		ilista++;
		//printf("%d %d\n",ilista, A[ilista] );
		resp |= ((long long) A[ilista] << itreal);
		itreal++;
	}
	return resp;
}

Compilation message

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:11:6: error: 'll' was not declared in this scope
   11 |  for(ll itreal = 0; itreal <= 60; itreal++){
      |      ^~
Anna.cpp:11:21: error: 'itreal' was not declared in this scope
   11 |  for(ll itreal = 0; itreal <= 60; itreal++){
      |                     ^~~~~~