제출 #1205649

#제출 시각아이디문제언어결과실행 시간메모리
1205649bongoboltoHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
#include "hack.h" #include <iostream> #include <vector> #include <map> using namespace std; int hack() { int n = 1; for (int i = 0; i < 500000; ++i) { // vector<long long> vec = {n}; if(collisions(vector<long long> vec = {n}) != 0LL) { cout<<n<<endl; } n++; } }

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

hack.cpp: In function 'int hack()':
hack.cpp:14:41: error: expected primary-expression before 'vec'
   14 |         if(collisions(vector<long long> vec = {n}) != 0LL)
      |                                         ^~~
hack.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^