Submission #173697

# Submission time Handle Problem Language Result Execution time Memory
173697 2020-01-05T06:57:32 Z sean617 Languages (IOI10_languages) C++
0 / 100
254 ms 2936 KB
#include "grader.h"
#include "lang.h"
#include <unordered_map>
#include <vector>
#include <cstring>

using namespace std;
int l, v[60][100000];
void excerpt(int *E)
{
	int i, j, num, ans = 0, x, mx = 0, cnt;
	l = 100;
	for (x =0; x < 56; x++) {
		cnt = 0;
		for (i =0; i < l; i++) {
			cnt += v[x][E[i]];
		}
		if (cnt > mx) {
			mx = cnt;
			ans = x;
		}
	}
	ans = language(ans);
	for (i = 0; i < l; i++) {
		v[ans][E[i]]++;
	}
}

Compilation message

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:11:9: warning: unused variable 'j' [-Wunused-variable]
  int i, j, num, ans = 0, x, mx = 0, cnt;
         ^
lang.cpp:11:12: warning: unused variable 'num' [-Wunused-variable]
  int i, j, num, ans = 0, x, mx = 0, cnt;
            ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 236 ms 2936 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 254 ms 2936 KB Output isn't correct - 26.38%