This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |