제출 #552276

#제출 시각아이디문제언어결과실행 시간메모리
552276pckien콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define fto(i, a, b) for (int i = a; i <= b; ++i) using namespace std; int n; string haha[5] = {"A", "B", "X", "Y"}; string guess_sequence(int n){ int hoho, hehe = 0; string tmp = "", G = ""; fto(i, 1, n){ fto(j, 0, 3){ tmp = G + haha[j]; cout << tmp << endl; cin >> hoho; if (hehe < hoho){ hehe = hoho; G = tmp; break; } } } return G; } int press(string p){ } // int main(){ // cin >> n; // return 0; // }

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

combo.cpp: In function 'int press(std::string)':
combo.cpp:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
   28 | }
      | ^
/usr/bin/ld: /tmp/cc45TPOR.o: in function `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x0): multiple definition of `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'; /tmp/ccxNAVCN.o:combo.cpp:(.text.unlikely+0x26): first defined here
collect2: error: ld returned 1 exit status