제출 #1205111

#제출 시각아이디문제언어결과실행 시간메모리
1205111tamzidHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
#include "hack.h" #include <vector> #include <map> using ll = long long; int hack(){ // std::vector<long long> x = {3333,2565454,21223,898997,9999,4,8,100,2340040,222,44,2222211}; // long long a = collisions(x); std::vector<ll> x; ll n; for(n=1;n<=500000;++n) { x.pb(n); ll a = collisions(x); if(a==1) return n; } }

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

hack.cpp: In function 'int hack()':
hack.cpp:15:11: error: 'class std::vector<long long int>' has no member named 'pb'
   15 |         x.pb(n);
      |           ^~
hack.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^