제출 #1141348

#제출 시각아이디문제언어결과실행 시간메모리
1141348aarb_.tomatexdEaster Eggs (info1cup17_eastereggs)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; #define ll long long //1 int findEgg(int N,vector<pair<int, int>>bridges){ for(int i=0;i<n;i++){ vector<int>islands(1); islands[0]= i+1; int a = query(islands); if(a==1){ return i; } } }

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

eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:9:19: error: 'n' was not declared in this scope
    9 |     for(int i=0;i<n;i++){
      |                   ^
eastereggs.cpp:9:13: warning: control reaches end of non-void function [-Wreturn-type]
    9 |     for(int i=0;i<n;i++){
      |             ^