제출 #1256278

#제출 시각아이디문제언어결과실행 시간메모리
1256278nlknHack (APIO25_hack)C++20
컴파일 에러
0 ms0 KiB
int hack(){ vector<int> v={1,2}; while(v[1]++)if(collisions(v))return v[1]-1; }

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

hack.cpp: In function 'int hack()':
hack.cpp:2:1: error: 'vector' was not declared in this scope
    2 | vector<int> v={1,2};
      | ^~~~~~
hack.cpp:2:8: error: expected primary-expression before 'int'
    2 | vector<int> v={1,2};
      |        ^~~
hack.cpp:3:7: error: 'v' was not declared in this scope
    3 | while(v[1]++)if(collisions(v))return v[1]-1;
      |       ^
hack.cpp:3:17: error: 'collisions' was not declared in this scope
    3 | while(v[1]++)if(collisions(v))return v[1]-1;
      |                 ^~~~~~~~~~