제출 #1145762

#제출 시각아이디문제언어결과실행 시간메모리
1145762tishoEaster Eggs (info1cup17_eastereggs)C++20
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <set> #include "grader.h" #define endl '\n' #define ll long long int findEgg(int n, vector < pair < int, int > > bridges) { for(int i=1;i<=n;i++) { vector<int>v; v.push_back(i); int isThere = query(i); if(isThere==1) { return i; } } }

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

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:15:29: error: could not convert 'i' from 'int' to 'std::vector<int>'
   15 |         int isThere = query(i);
      |                             ^
      |                             |
      |                             int
eastereggs.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^