Submission #274858

# Submission time Handle Problem Language Result Execution time Memory
274858 2020-08-19T17:35:02 Z Toirov_Sadi Languages (IOI10_languages) C++17
0 / 100
1 ms 528 KB
#include<bits/stdc++.h>
#include "grader.h"

using namespace std;

const int N = 1e2 + 7;
const int M = 65536;
const long long MAX = 281474976710656;

long long d[N][3];
long long lang[56][N][3];
void excerpt(int *E) {


    for(int i = 0; i < N; i ++){
        d[i][0] = E[i];
        d[i][1] = (d[i][0] << 16) + E[i];
        d[i][2] = (d[i][1] << 16) + E[i];
    }
    vector<pair<long long, int>> a;
    for(int j = 0; j < 56; j ++){
        long long x = 0;
        for(int i = 0; i < N; i ++){
            for(int k = 0; k < 3; k ++){
                x += max(0ll, MAX - (d[i][k] / lang[j][i][k]));
            }
        }
        a.push_back({x, j});
    }
    sort(a.begin(), a.end());

    int lan = a.back().second;

    int ans = language(lan);

    for(int i = 0; i < N; i ++){
        for(int k = 0; k < 3; k ++){
            lang[ans][i][k] = d[i][k];
        }
    }
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 512 KB Execution killed with signal 8
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 528 KB Execution killed with signal 8