Submission #61735

# Submission time Handle Problem Language Result Execution time Memory
61735 2018-07-26T13:27:34 Z zubec Languages (IOI10_languages) C++14
0 / 100
169 ms 3008 KB
#include <stdlib.h>
#include <stdio.h>

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

#define SZ 100

/*#include <iostream>
using namespace std;*/

int prev[1100000];

int kol[56][65536];

void excerpt(int *E) {
    int mx = -1, needLang = 0;
    for (int i = 0; i <= 55; i++){
        int sum = 0;
        for (int j = 0; j < SZ; j++)
            sum += kol[i][E[j]];
        if (sum > mx){
            mx = sum;
            needLang = i;
        }
        //cout << i << ' ' << sum << endl;
    }
    //cout << needLang << endl;
    //cout << endl;
    int curLang = language(rand()%56);
    for (int i = 0; i < SZ; i++)
        ++kol[curLang][E[i]];
}

/**


*/

Compilation message

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:17:18: warning: variable 'needLang' set but not used [-Wunused-but-set-variable]
     int mx = -1, needLang = 0;
                  ^~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 169 ms 3008 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 157 ms 2964 KB Output isn't correct - 1.86%