답안 #313023

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
313023 2020-10-15T01:47:12 Z YJU Broken Device (JOI17_broken_device) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
const ll MOD=1e9+7;
const ll MOD2=998244353;
const ll N=4e5+5;
const ll K=350;
const ld pi=3.14159265359;
const ll INF=(1LL<<40);
#define SQ(i) ((i)*(i))
#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define setp setprecision
#define lwb lower_bound
#define SZ(_a) (ll)_a.size()



void Anna(ll n,ll x,ll k,vector<ll> p){
	bool vis[200];
	memset(vis,0,sizeof(vis));
	ll ti=0;
	for(ll i:p)vis[i]=1;
	for(int i=0;i<n;i++){
		if(vis[i]||vis[i+1]||vis[i+2]||i+2>=n||ti>=60)continue;
		Set(i,1);
		if((x&(1LL<<ti)))Set(i+1,1);
		else Set(i+1,0);
		ti++;
		if((x&(1LL<<ti)))Set(i+2,1);
		else Set(i+2,0);
		ti++;
		i=i+2;
	}
}

#include<bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
const ll MOD=1e9+7;
const ll MOD2=998244353;
const ll N=4e5+5;
const ll K=350;
const ld pi=3.14159265359;
const ll INF=(1LL<<40);
#define SQ(i) ((i)*(i))
#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define setp setprecision
#define lwb lower_bound
#define SZ(_a) (ll)_a.size()



ll Bruno(ll n,vector<ll> A){
	ll ti=0,ans=0;
	REP(i,n){
		if(A[i]==1){
			ans|=(A[i+1]*(1LL<<ti));ti++;
			ans|=(A[i+2]*(1LL<<ti));ti++;
			i+=2;
		}
	}
	return ans;
}

Compilation message

Anna.cpp: In function 'void Anna(ll, ll, ll, std::vector<long long int>)':
Anna.cpp:33:3: error: 'Set' was not declared in this scope
   33 |   Set(i,1);
      |   ^~~

/tmp/ccbWwnZU.o: In function `main':
grader_bruno.cpp:(.text.startup+0x115): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status