#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 |
1 |
Correct |
389 ms |
2984 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
394 ms |
2948 KB |
Output is partially correct - 52.92% |