제출 #201761

#제출 시각아이디문제언어결과실행 시간메모리
201761Leonardo_PaesLanguages (IOI10_languages)C++17
컴파일 에러
0 ms0 KiB
#include "lang.h"
#include "grader.h"

using namespace std;

const int maxl = 60, maxn = 67000;

int qtd[maxl], mark[maxn];

map<int,int> m[maxl];

void excerpt(int *e){
    memset(qtd, 0, sizeof qtd);

    int ans = 0;

    for(int i=0; i<100; i++){
        if(mark[e[i]]) continue;
        mark[e[i]]++;
        for(int j=0; j<56; j++){
            if(m[j][e[i]]) qtd[j]++;
            if(qtd[j] > qtd[ans]) ans = j;
        }
    }

    //int a = language(ans);

    for(int i=0; i<100; i++){
        m[a][e[i]] = 1;
    }
}

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

lang.cpp:10:1: error: 'map' does not name a type; did you mean 'mark'?
 map<int,int> m[maxl];
 ^~~
 mark
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:13:5: error: 'memset' was not declared in this scope
     memset(qtd, 0, sizeof qtd);
     ^~~~~~
lang.cpp:21:16: error: 'm' was not declared in this scope
             if(m[j][e[i]]) qtd[j]++;
                ^
lang.cpp:29:9: error: 'm' was not declared in this scope
         m[a][e[i]] = 1;
         ^
lang.cpp:29:11: error: 'a' was not declared in this scope
         m[a][e[i]] = 1;
           ^