Submission #943177

# Submission time Handle Problem Language Result Execution time Memory
943177 2024-03-11T09:04:21 Z MilosMilutinovic Chameleon's Love (JOI20_chameleon) C++14
Compilation error
0 ms 0 KB
// 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);
}

Compilation message

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]){
      |           ^