Submission #173696

# Submission time Handle Problem Language Result Execution time Memory
173696 2020-01-05T06:39:34 Z sean617 Languages (IOI10_languages) C++
0 / 100
2509 ms 4268 KB
#include "grader.h"
#include "lang.h"
#include <unordered_map>
#include <vector>
#include <cstring>

using namespace std;
int l, v[1000000];
void excerpt(int *E)
{
	int i, j, num, ans = 0;
	memset(v, -1, sizeof(v));
	l = 100;
	for (i =0; i < l; i++) {
		if (v[E[i]] != -1) {
			ans = v[E[i]];
			break;
		}
	}
	ans = language(ans);
	for (i = 0; i < l; i++) {
		v[E[i]] = ans;
	}
}

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;
         ^
lang.cpp:11:12: warning: unused variable 'num' [-Wunused-variable]
  int i, j, num, ans = 0;
            ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 2509 ms 4264 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1606 ms 4268 KB Output isn't correct - 1.91%