제출 #1359473

#제출 시각아이디문제언어결과실행 시간메모리
1359473ramez-hammadHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
#include "hack.h"
#include <bits/stdc++.h>

using namespace std;

int hack() {
    if (n<=500,000) {
        for (int i=1;i<=500,000)
            if ((int)collision(0,i)) return i; 
    }
}

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

hack.cpp: In function 'int hack()':
hack.cpp:7:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     if (n<=500,000) {
      |         ^
      |         yn
hack.cpp:8:32: error: expected ';' before ')' token
    8 |         for (int i=1;i<=500,000)
      |                                ^
      |                                ;
hack.cpp:9:22: error: 'collision' was not declared in this scope; did you mean 'collisions'?
    9 |             if ((int)collision(0,i)) return i;
      |                      ^~~~~~~~~
      |                      collisions
hack.cpp:11:1: warning: control reaches end of non-void function [-Wreturn-type]
   11 | }
      | ^