Submission #72143

#TimeUsernameProblemLanguageResultExecution timeMemory
72143인프라웨어 상한가 가주세요. 물렸어요 (#118)Magic Dowsing (FXCUP3_magic)C++17
Compilation error
0 ms0 KiB
#include "dowsing.h" int FindTreasure(int N) { int hasIdx = -1; for (int i = 1; i <= N; ++i) { int check = Detect(1, i); if (check) { hasIdx = i; break; } } if (hasIdx == -1) for (int i = 1; i <= N; ++i) { int check = Detect(2, i); if (check) { hasIdx = i; break; } } int yIdx = -1; for (int i = 1; i <= N; ++i) { int check = Detect(i, hasIdx); if (check == 0) { yIdx = i; break; } } Report(yIdx, hasIdx); return 0; }

Compilation message (stderr)

dowsing.cpp: In function 'int FindTreasure(int)':
dowsing.cpp:2:6: error: ambiguating new declaration of 'int FindTreasure(int)'
 int  FindTreasure(int  N)  {
      ^~~~~~~~~~~~
In file included from dowsing.cpp:1:0:
dowsing.h:3:6: note: old declaration 'void FindTreasure(int)'
 void FindTreasure(int N);
      ^~~~~~~~~~~~