제출 #699597

#제출 시각아이디문제언어결과실행 시간메모리
699597qwerasdfzxclLanguages (IOI10_languages)C++17
82 / 100
5089 ms5688 KiB
#include "grader.h" #include "lang.h" #include <bits/stdc++.h> typedef long long ll; using namespace std; constexpr ll DIG = 1e5; set<int> st[101]; set<ll> st2[101]; void push(int *E, int typ){ for (int i=0;i<100;i++) st[typ].insert(E[i]); for (int i=0;i<99;i++) st2[typ].insert((ll)E[i]*DIG + E[i+1]); } int calc(int *E, int typ){ int ret = 0; for (int i=0;i<100;i++) if (st[typ].find(E[i])==st[typ].end()) ret++; for (int i=0;i<99;i++) if (st2[typ].find((ll)E[i]*DIG + E[i+1])==st2[typ].end()) ret++; return ret; } void excerpt(int *E){ int mn = 1e9, idx = -1; for (int i=0;i<56;i++){ int score = calc(E, i); if (score < mn){ mn = score; idx = i; } } push(E, language(idx)); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...