제출 #1205643

#제출 시각아이디문제언어결과실행 시간메모리
1205643bongoboltoHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
#include "hack.h"
#include <vector>
#include <map>
using ll = long long;

int hack()
{
    for (int i = 1; i < 500001; ++i)
    {
            if(collisions({i} != 0))
            {
                return i;
            }
    }
}

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

hack.cpp: In function 'int hack()':
hack.cpp:10:30: error: expected ')' before '!=' token
   10 |             if(collisions({i} != 0))
      |                          ~   ^~~
      |                              )
hack.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^