제출 #943177

#제출 시각아이디문제언어결과실행 시간메모리
943177MilosMilutinovic카멜레온의 사랑 (JOI20_chameleon)C++14
컴파일 에러
0 ms0 KiB
// rispekt za vasu #include "chameleon.h" #include<bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; namespace { int f[105][105]; vector<int> c[105]; } // namespace void Solve(int n){ vector<pair<int,int>> res; for(int i=1;i<=2*n;i++){ for(int j=i+1;j<=2*n;j++){ f[i][j]=f[j][i]=Query({i},{j}); } } for(int i=1;i<=2*n;i++){ c[i].clear(); for(int j=1;j<=2*n;j++){ if(i==j||f[i][j]!=1) continue; c[i].pb(j); } } for(int i=1;i<=2*n;i++){ for(int j:c[i]){ } } for(auto&p:res) Answer(p.fi,p.se); }

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

chameleon.cpp: In function 'void Solve(int)':
chameleon.cpp:23:33: error: too many arguments to function 'int Query(const std::vector<int>&)'
   23 |    f[i][j]=f[j][i]=Query({i},{j});
      |                                 ^
In file included from chameleon.cpp:2:
chameleon.h:9:5: note: declared here
    9 | int Query(const std::vector<int> &p);
      |     ^~~~~
chameleon.cpp:34:11: warning: unused variable 'j' [-Wunused-variable]
   34 |   for(int j:c[i]){
      |           ^