Submission #522202

#TimeUsernameProblemLanguageResultExecution timeMemory
522202sean617Languages (IOI10_languages)C++98
0 / 100
111 ms262148 KiB
#include "grader.h" #include "lang.h" //#include <unordered_map> //#include <vector> //#include <cstring> #include <algorithm> #include <set> using namespace std; int l, v[58][100000]; set<int> v2[58][100000]; void excerpt(int *E) { int i, j, num, ans = 0, x, mx = 0, cnt; l = 100; //sort(E, E + l); for (x =0; x < 56; x++) { cnt = 0; for (i =1; i < l; i++) { if (v2[x][E[i - 1]].count(E[i]) == 1) cnt++; } if (cnt > mx) { mx = cnt; ans = x; } } ans = language(ans); for (i = 1; i < l; i++) { v2[ans][E[i - 1]].insert(E[i]); } }

Compilation message (stderr)

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:13:9: warning: unused variable 'j' [-Wunused-variable]
   13 |  int i, j, num, ans = 0, x, mx = 0, cnt;
      |         ^
lang.cpp:13:12: warning: unused variable 'num' [-Wunused-variable]
   13 |  int i, j, num, ans = 0, x, mx = 0, cnt;
      |            ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...