제출 #1359484

#제출 시각아이디문제언어결과실행 시간메모리
1359484ramez-hammadHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
#include "hack.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int hack() {
    collisions({0});
    for (ll i=1;i<500,000;i++)
        if (collisions(i})) return i; 
    return 5e5;
}

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

hack.cpp: In function 'int hack()':
hack.cpp:8:25: error: expected ')' before '}' token
    8 |         if (collisions(i})) return i;
      |                       ~ ^
      |                         )
hack.cpp:8:25: error: expected ')' before '}' token
    8 |         if (collisions(i})) return i;
      |            ~            ^
      |                         )
hack.cpp:8:25: error: expected primary-expression before '}' token
hack.cpp:8:25: warning: no return statement in function returning non-void [-Wreturn-type]
hack.cpp: At global scope:
hack.cpp:8:26: error: expected unqualified-id before ')' token
    8 |         if (collisions(i})) return i;
      |                          ^
hack.cpp:9:5: error: expected unqualified-id before 'return'
    9 |     return 5e5;
      |     ^~~~~~
hack.cpp:10:1: error: expected declaration before '}' token
   10 | }
      | ^