Submission #39620

#TimeUsernameProblemLanguageResultExecution timeMemory
39620baactreeLanguages (IOI10_languages)C++14
56 / 100
708 ms3064 KiB
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "grader.h" #include "lang.h" #define SZ 100 int cnt[1 << 6][1 << 16]; int vote[1 << 6]; int idx; void excerpt(int *E) { int now; for (int i = 0; i < 56; i++){ vote[i] = 0; for (int j = 0; j < SZ; j++) if (cnt[i][E[j]]) vote[i]++; } int mm = 0; int ans = -1; for (int i = 0; i < 56; i++){ if (mm < vote[i]){ mm = vote[i]; ans = i; } } if (ans == -1) now = language(idx); else now = language(ans); for (int i = 0; i < SZ; i++) cnt[now][E[i]]++; idx++; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...