답안 #882334

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
882334 2023-12-03T04:42:33 Z ono_de206 CEOI16_icc (CEOI16_icc) C++14
컴파일 오류
0 ms 0 KB
#include "icc.h"
#include <bits/stdc++.h>
using namespace std;

#include<bits/stdc++.h>
using namespace std;

#define in insert
#define all(x) x.begin(),x.end()
#define pb push_back
#define eb emplace_back
#define ff first
#define ss second

//#define int long long

typedef long long ll;
typedef vector<int> vi;
typedef set<int> si;
typedef multiset<int> msi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

const int mxn = 110;
int A[mxn], B[mxn];
vector<int> g[mxn];

int ask(vector<int> a, vector<int> b) {
	int sza = 0, szb = 0;
	for(int x : a) {
		for(int y : g[x]) {
			A[sza++] = y;
		}
	}
	for(int x : b) {
		for(int y : g[x]) {
			B[szb++] = y;
		}
	}
	return query(sza, szb, A, B);
}

void run(int n) {
	vector<int> all;
	for(int i = 1; i <= n; i++) {
		g[i].pb(i);
		all.pb(i);
	}
	for(int t = 1; t < n; t++) {
		int A[n + 1], B[n + 1];
		int sza = 0, szb = n;
		for(int i = 0; i < n; i++) {
			B[i] = n - i;
		}
		int x = -1, y = -1;
		for(int i = 1; i <= n; i++) {
			A[sza++] = i;
			szb--;
			int tmp = ask(sza, szb, A, B);
			if(tmp == 0 && y == -1 && x != -1) y = i;
			if(tmp == 1 && x == -1) x = i;
		}
		setRoad(x, y);
	}
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:59:18: error: could not convert 'sza' from 'int' to 'std::vector<int>'
   59 |    int tmp = ask(sza, szb, A, B);
      |                  ^~~
      |                  |
      |                  int