제출 #512765

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

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

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:10:18: error: expected unqualified-id before 'int'
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |                  ^~~
lang.cpp:10:17: error: expected ';' before 'int'
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |                 ^~~~
      |                 ;
lang.cpp:10:33: warning: for increment expression has no effect [-Wunused-value]
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |                               ~~^~~~
lang.cpp:10:37: error: expected ')' before ';' token
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |      ~                              ^
      |                                     )
lang.cpp:10:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |   ^~~
lang.cpp:10:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |                                       ^
lang.cpp:10:22: warning: unused variable 'csd' [-Wunused-variable]
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |                      ^~~
lang.cpp:10:39: error: 'i' was not declared in this scope
   10 |   for(int i = 0, int csd = 0; i < 56; i++) {
      |                                       ^
lang.cpp:9:16: warning: unused variable 'sd' [-Wunused-variable]
    9 |   int exp = 0, sd = 0;
      |                ^~