# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72143 | 2018-08-26T05:31:46 Z | 인프라웨어 상한가 가주세요. 물렸어요(#2188, c4big, cepiloth) | Magic Dowsing (FXCUP3_magic) | C++17 | 0 ms | 0 KB |
#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; }