답안 #222318

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
222318 2020-04-13T02:54:14 Z mathking1021 Languages (IOI10_languages) C++11
컴파일 오류
0 ms 0 KB
#include <stdlib.h>
#include <stdio.h>
#include <cmath>

#include "grader.h"
#include "lang.h"

#define SZ 100

const int M = 5;
const int N = 2;
const int K = 10
int x[66000][65];
int y[65];
int cnt = 0;

void excerpt(int *E)
{
    int mx2 = -1, mi2 = 0;
    for(int i = 0; i < 56; i++) y[i] = 0;
    for(int i = 0; i < 100; i++)
    {
        int mx = -1, mi = 0, mx2 = -1;
        for(int j = 0; j < 56; j++)
        {
            if(x[E[i]][j] > mx) mx = x[E[i]][j], mi = j;
            else if(x[E[i]][j] > mx2) mx2 = x[E[i]][j];
        }
        y[mi] += M + N * sqrt(mx - mx2) + K * sqrt(sqrt(mx - mx2));
    }
    for(int i = 0; i < 56; i++)
    {
        if(y[i] > mx2) mx2 = y[i], mi2 = i;
    }
    int k = language(mi2);
    for(int i = 0; i < 100; i++)
    {
        x[E[i]][k]++;
    }
    cnt++;
}

Compilation message

lang.cpp:13:1: error: expected ',' or ';' before 'int'
 int x[66000][65];
 ^~~
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:26:16: error: 'x' was not declared in this scope
             if(x[E[i]][j] > mx) mx = x[E[i]][j], mi = j;
                ^
lang.cpp:38:9: error: 'x' was not declared in this scope
         x[E[i]][k]++;
         ^