제출 #1310664

#제출 시각아이디문제언어결과실행 시간메모리
1310664dimitri.shengelia동굴 (IOI13_cave)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int tryCombination ( int S[] ); void answer( int S[], int D[] ); void exploreCave( int n ) { int a[n], b[n]; fill ( a, a + n, 0 ); if ( tryCombination ( a ) != -1 ) { for ( int i = 0; i < n; i++ ) { a[i] = 0; b[i] = i; if ( tryCombination ( a ) == i ) { a[i] = 1; } } answer( a, b ); } else { for ( int i = 0; i < n; i++ ) { a[i] = 1; b[i] = tryCombination ( a ); a[i] = 0; } answer( a, b ); } return; }

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

/usr/bin/ld: /tmp/ccP5t1Ov.o: in function `main':
grader.c:(.text.startup+0x10): undefined reference to `exploreCave'
/usr/bin/ld: /tmp/ccKQ5nRA.o: in function `exploreCave(int)':
cave.cpp:(.text+0xd4): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0xf9): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x119): undefined reference to `answer(int*, int*)'
/usr/bin/ld: cave.cpp:(.text+0x16c): undefined reference to `tryCombination(int*)'
collect2: error: ld returned 1 exit status