답안 #677993

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
677993 2023-01-04T23:33:12 Z Mher777 CONSUL (info1cup19_consul) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

int kth(int k);
void say_answer(int k);
int cnt(int k);

void solve(int n) {
	mii mp;
	int sum = 0;
	for (int i = 1; i <= n; i++) {
		int k1 = kth(i); 
		if (!mp[k1]) {
			int k2 = cnt(k1);
			mp[k1] += k2;
			if (k2 > n / 3) {
				say_answer(k1);
				return;
			}
			sum += k2;
		}
		if (sum >= (n / 3) * 2) {
			say_answer(-1);
			return;
		}
	}
}

Compilation message

consul.cpp: In function 'void solve(int)':
consul.cpp:9:2: error: 'mii' was not declared in this scope
    9 |  mii mp;
      |  ^~~
consul.cpp:13:8: error: 'mp' was not declared in this scope
   13 |   if (!mp[k1]) {
      |        ^~