제출 #512747

#제출 시각아이디문제언어결과실행 시간메모리
512747lovro_nidogon1Languages (IOI10_languages)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "lang.h" #include "grader.h" int freq[56][70001], nocur[56], spac, cfreq[70001], x; const int cum = 2; set<pair<int, int> > ses[56]; set<pair<int, pair<int, int> > > sussy[56]; void excerpt(int *e) { x++; int exp = 0; int sd = 0; for(int i = 0; i < 56; i++) { int csd = 0; for(int j = 0; j < 100; j++) csd += freq[i][e[j]]; for(int j = 0; j < 99; j++) csd += (ses[i].find({e[j], e[j + 1]}) != ses[i].end()); for(int j = (x + i)%2; j < 98; j+=cum) csd += (sussy[i].find({e[j], {e[j + 1], e[j + 2]}}) != sussy[i].end()); if(csd > sd) sd = csd, exp = i; } int ca = language(exp); for(int i = 0; i < 100; i++) freq[ca][e[i]] = 1; for(int i = 0; i < 99; i++) ses[ca].insert({e[i], e[i + 1]}); for(int i = (x + exp)%2; i < 98; i+=cum) sussy[ca].insert({e[i], {e[i + 1], e[i + 2]}}); nocur[ca]++; }

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

lang.cpp:6:1: error: 'set' does not name a type; did you mean 'setns'?
    6 | set<pair<int, int> > ses[56];
      | ^~~
      | setns
lang.cpp:7:1: error: 'set' does not name a type; did you mean 'setns'?
    7 | set<pair<int, pair<int, int> > > sussy[56];
      | ^~~
      | setns
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:15:40: error: 'ses' was not declared in this scope
   15 |    for(int j = 0; j < 99; j++) csd += (ses[i].find({e[j], e[j + 1]}) != ses[i].end());
      |                                        ^~~
lang.cpp:16:51: error: 'sussy' was not declared in this scope
   16 |    for(int j = (x + i)%2; j < 98; j+=cum) csd += (sussy[i].find({e[j], {e[j + 1], e[j + 2]}}) != sussy[i].end());
      |                                                   ^~~~~
lang.cpp:21:31: error: 'ses' was not declared in this scope
   21 |   for(int i = 0; i < 99; i++) ses[ca].insert({e[i], e[i + 1]});
      |                               ^~~
lang.cpp:22:44: error: 'sussy' was not declared in this scope
   22 |   for(int i = (x + exp)%2; i < 98; i+=cum) sussy[ca].insert({e[i], {e[i + 1], e[i + 2]}});
      |                                            ^~~~~