제출 #923526

#제출 시각아이디문제언어결과실행 시간메모리
923526alexander707070카멜레온의 사랑 (JOI20_chameleon)C++14
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h> #include "chameleon.h" #define MAXN 1007 namespace { int n; } // namespace vector<int> to[MAXN]; void Solve(int N) { n=N; for(int i=1;i<=2*n;i++){ for(int f=i+1;f<=2*n;f++){ if(Query({i,f})==1){ to[i].push_back(f); to[f].push_back(i); } } } for(int i=1;i<=2*n;i++){ if(to[i].size()==1){ if(i<to[i][0])Answer(i,to[i][0]); }else{ for(int f:to[to[i][0]]){ if(f==i and i<to[i][0])Answer(i,to[i][0]); } for(int f:to[to[i][1]]){ if(f==i and i<to[i][1])Answer(i,to[i][1]); } } } }

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

chameleon.cpp:1:10: warning: missing terminating " character
    1 | #include "bits/stdc++.h>
      |          ^
chameleon.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include "bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
chameleon.cpp:12:1: error: 'vector' does not name a type
   12 | vector<int> to[MAXN];
      | ^~~~~~
chameleon.cpp: In function 'void Solve(int)':
chameleon.cpp:19:17: error: 'to' was not declared in this scope
   19 |                 to[i].push_back(f);
      |                 ^~
chameleon.cpp:26:12: error: 'to' was not declared in this scope
   26 |         if(to[i].size()==1){
      |            ^~