Submission #222316

# Submission time Handle Problem Language Result Execution time Memory
222316 2020-04-13T02:52:59 Z mathking1021 Languages (IOI10_languages) C++11
33 / 100
362 ms 6312 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 = 1;
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 + sqrt(sqrt(mx - mx2)) * N;
    }
    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++;
}
# Verdict Execution time Memory Grader output
1 Correct 332 ms 6300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 362 ms 6312 KB Output is partially correct - 32.79%