제출 #1073597

#제출 시각아이디문제언어결과실행 시간메모리
1073597EnzoMini tetris (IOI16_tetris)C++17
컴파일 에러
0 ms0 KiB
#include "tetris.h"
#include<iostream>
using namespace std;
void init(int n) {
}

int position;
int rotation;

void new_figure(int figure_type) {

	if(figure_type == 1){
		position = 0;
		rotation = 1;
	}
}

int get_position() {
	return position;
}

int get_rotation() {
	return rotation;
}

int main(){
	int n,l;
	cin >> n;
	init(n);

	for(int i = 0; i < n; i++){
		cin>>l;
		new_figure(l);
		cout<<get_position()<<" "<<get_rotation();
	}



}

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

/usr/bin/ld: /tmp/ccGScawb.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccSsyyDa.o:tetris.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status