제출 #1353475

#제출 시각아이디문제언어결과실행 시간메모리
1353475isctHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
#include "hack.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;

int hack()
{
    for (long long i = 3; i++)
    {
        long long response = collisions({1, i});
        if (response == 1)
        {
            return (i - 1);
        }
    }
}

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

hack.cpp: In function 'int hack()':
hack.cpp:8:30: error: expected ';' before ')' token
    8 |     for (long long i = 3; i++)
      |                              ^
      |                              ;
hack.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^