답안 #875688

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
875688 2023-11-20T11:15:28 Z Aiperiii Easter Eggs (info1cup17_eastereggs) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
#define ff first
#define ss second
#define pb push_back
int findEgg (int N, vector < pair < int, int > > bridges)
{
    for(int i=1;i<=N;i++){
        if (query ({i})) return i;
    }
    return N;
}


Compilation message

eastereggs.cpp: In function 'long long int findEgg(long long int, std::vector<std::pair<long long int, long long int> >)':
eastereggs.cpp:12:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
   12 |         if (query ({i})) return i;
      |                     ^
eastereggs.cpp:12:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
/usr/bin/ld: /tmp/ccY5A1X3.o: in function `main':
grader.cpp:(.text.startup+0x1e6): undefined reference to `findEgg(int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >)'
collect2: error: ld returned 1 exit status