제출 #65847

#제출 시각아이디문제언어결과실행 시간메모리
65847asonetuLanguages (IOI10_languages)C++14
56 / 100
394 ms2984 KiB
#include <stdlib.h> #include <stdio.h> #include "grader.h" #include "lang.h" #define SZ 100 int langChk[56][65536] = {0}; int my_getExistLang(int *E, int existLang[56]); int my_getExistLang(int *E, int existLang[56]) { int isExist = 0; for(int i=0; i<100; i++) { for(int j=0; j<56; j++) { if(langChk[j][E[i]] != 0) { existLang[j]++; isExist = 1; } } } return isExist; } void excerpt(int *E) { int existLang[56] = {0}; int isExist = my_getExistLang(E, existLang); int maxExist = 0; int result = 0; if(isExist) { for(int i=0; i<56; i++) { if(maxExist < existLang[i]) { maxExist = existLang[i]; result = i; } } } int ans = language(result); for(int i=0; i<100; i++) { langChk[ans][E[i]] = 1; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...