Submission #61735

#TimeUsernameProblemLanguageResultExecution timeMemory
61735zubecLanguages (IOI10_languages)C++14
0 / 100
169 ms3008 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...