제출 #254927

#제출 시각아이디문제언어결과실행 시간메모리
254927super_j6경찰관과 강도 (BOI14_coprobber)C++14
컴파일 에러
0 ms0 KiB
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second

const int mxn = 500;
int n, m, w, h;
int c;

pi f(int x){
	return {x / h, x % h};
}

int ff(pi p){
	return p.f * h + p.s;
}

int start(int N, bool g[mxn][mxn]){
	n = N;
	for(h = 1; h < n && g[h - 1][h]; h++);
	w = n / h;
	return c = ff({0, 0});
}

int nextMove(int r){
	pi pc = f(c), pr = f(r);
	pr.f -= pc.f, pr.s -= pc.s;
	
	if(abs(pr.f) > abs(pr.s)){
		pc.f += 2 * (pr.f > 0) - 1;
	}else if(abs(pr.s) > abs(pr.f)){
		pc.s += 2 * (pc.s > 0) - 1;
	}
	
	return c = ff(pc);
}

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	

	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccpebmyd.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cciZ1Nsf.o:coprobber.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status