답안 #67578

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
67578 2018-08-15T03:43:26 Z usefulhyun Languages (IOI10_languages) C
컴파일 오류
0 ms 0 KB
#include <stdlib.h>
#include <stdio.h>
#include <unordered_map>
using namespace std;

#include "grader.h"
#include "lang.h"

#define SZ 100

unordered_map<int, int> occurrence[56];

void excerpt(int *E) {
	
	int guess = 0;
	int max_similarity = 0;
	for (int lang = 0; lang < 56; lang++) {
		int similarity = 0;
		unordered_map<int, bool> words;

		for (int i = 0; i < 100; i++) {
			int key = E[i];
			words[key] = true;
		}

		for (int i = 0; i < 99; i++) {
			int key = E[i] * 65536 + E[i + 1];
			words[key] = true;
		}

		for (auto itr = words.begin(); itr != words.end(); itr++) {
			int key = itr->first;

			if (occurrence[lang].find(key) != occurrence[lang].end())
				similarity++;
		}
		

		if (max_similarity < similarity) {
			max_similarity = similarity;
			guess = lang;
		}
	}


	int ans = language(guess);

	for (int i = 0; i < 100; i++) {
		int key = E[i];
		occurrence[ans][key] = 1;
	}

	for (int i = 0; i < 99; i++) {
		int key = E[i] * 65536 + E[i + 1];
		occurrence[ans][key] = 1;
	}

//	printf("%d %d\n", guess, ans);

}

Compilation message

lang.c:3:10: fatal error: unordered_map: No such file or directory
 #include <unordered_map>
          ^~~~~~~~~~~~~~~
compilation terminated.