제출 #270865

#제출 시각아이디문제언어결과실행 시간메모리
270865TMJNLanguages (IOI10_languages)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; map<int,int>mp[56]; map<pair<int,int>,int>mpp[56]; int C[56]; void excerpt(int *E) { pair<double,int>mx={0,0}; for(int i=0;i<56;i++){ if(C[i]==0)continue; int c=0; for(int j=0;j<100;j++){ c+=mp[i][E[j]]; } for(int j=0;j<99;j++){ c++mpp[j][{E[j],E[j+1]}]*3; } mx=max(mx,{(double)c/C[i],i}); } int l=language(mx.second); C[l]++; for(int i=0;i<100;i++){ mp[l][E[i]]++; } for(int i=0;i<99;i++){ mpp[l][{E[i],E[i+1]}]++; } }

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

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:18:7: error: expected ';' before 'mpp'
   18 |    c++mpp[j][{E[j],E[j+1]}]*3;
      |       ^~~
      |       ;
lang.cpp:18:27: error: expected primary-expression before ']' token
   18 |    c++mpp[j][{E[j],E[j+1]}]*3;
      |                           ^