제출 #797562

#제출 시각아이디문제언어결과실행 시간메모리
797562XJP12수천개의 섬 (IOI22_islands)C++17
컴파일 에러
0 ms0 KiB
union(bool, int[]) find_journey(int n, int m, int[] u, int[] v){ bool ban=false; int ban1=0; for(int i=0; i<m; i++){ if(u[i]==0){ ban1++; }else{ ban=true; } } int a[7]; //return {ban, a}; if(ban==false && ban1>1){ a={0,1,0,1,0,1,0}; return {true,a}; }else{ return {false,a}; } }

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

islands.cpp:1:6: error: expected identifier before '(' token
    1 | union(bool, int[]) find_journey(int n, int m, int[] u, int[] v){
      |      ^
islands.cpp:1:7: error: expected unqualified-id before 'bool'
    1 | union(bool, int[]) find_journey(int n, int m, int[] u, int[] v){
      |       ^~~~
islands.cpp:1:7: error: expected ')' before 'bool'
    1 | union(bool, int[]) find_journey(int n, int m, int[] u, int[] v){
      |      ~^~~~
      |       )