제출 #359280

#제출 시각아이디문제언어결과실행 시간메모리
359280mohamedsobhi777Languages (IOI10_languages)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "lang.h" #include "grader.h" using namespace std; const int Lang = 56; int lang[Lang + 1][66000]; int *glo; int freq[66000]; set<int> sit[66000]; long long calc(int lan) { for (int i = 0; i < 100; ++i) freq[glo[i]] = 0; long long ret = 0; for (int i = 0; i < 100; ++i) { if (sz(sit[glo[i]]) > 10) continue; ret += ++freq[glo[i]] * lang[lan][glo[i]]; } return ret; } void excerpt(int *ex) { glo = ex; long long simi = 0; int wnr = 0; for (int i = 0; i < Lang; ++i) { double y = calc(i); if (y > simi) { simi = y; wnr = i; } } int z = language(wnr); for (int i = 0; i < 100; ++i) { // lang[z][ex[i]]++; lang[z][ex[i]] = min(lang[z][ex[i]] + 1, 15); sit[ex[i]].insert(z); } }

컴파일 시 표준 에러 (stderr) 메시지

lang.cpp: In function 'long long int calc(int)':
lang.cpp:21:19: error: 'sz' was not declared in this scope
   21 |               if (sz(sit[glo[i]]) > 10)
      |                   ^~