# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
490368 | 2021-11-27T10:20:49 Z | mathking1021 | Languages (IOI10_languages) | C++17 | 596 ms | 16776 KB |
#include <stdlib.h> #include <stdio.h> #include <cmath> #include <unordered_set> #include "grader.h" #include "lang.h" #define SZ 100 using namespace std; typedef unsigned long long ll; const int M = 100; const int N = 2; const int K = 15; unordered_set<ll> x; unordered_set<ll> xxx; int y[65]; //int cnt = 0; void excerpt(int *E) { // int mx2 = -1, mi2 = 0; // for(int i = 0; i < 56; i++) y[i] = 0; // for(int i = 0; i < 100; i++) // { // int mx = -1, mi = 0, mx2 = -1; // for(int j = 0; j < 56; j++) // { // if(x[E[i]][j] > mx) mx = x[E[i]][j], mi = j; // else if(x[E[i]][j] > mx2) mx2 = x[E[i]][j]; // } // y[mi] += M + N * sqrt(mx - mx2) + K * sqrt(sqrt(mx - mx2)); // } // mx2 = -1; // for(int i = 0; i < 56; i++) // { // if(y[i] > mx2) mx2 = y[i], mi2 = i; // } int mx = -1, mi = -1; for(int i = 0; i < 56; i++) { int cnt = 0; for(int j = 0; j < 5; j++) { ll t = E[j] * 65536LL * 65536LL + E[j + 1] * 65536LL + E[j + 2]; ll t2 = E[j + 1] * 65536LL + E[j + 2]; cnt += 5 * x.count(t * 100 + i); } for(int j = 5; j < 10; j++) { ll t = E[j] * 65536LL * 65536LL + E[j + 1] * 65536LL + E[j + 2]; ll t2 = E[j + 1] * 65536LL + E[j + 2]; cnt += 1 * x.count(t * 100 + i); } if(mx < cnt) mx = cnt, mi = i; } int k = language(mi); for(int i = 0; i < 97; i++) { ll t = E[i] * 65536ULL * 65536ULL + E[i + 1] * 65536ULL + E[i + 2]; x.insert(t * 100 + k); ll t2 = E[i] * 65536LL + E[i + 1]; xxx.insert(t2 * 100 + k); } // cnt++; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 589 ms | 16776 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 596 ms | 16736 KB | Output is partially correct - 42.97% |