# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
48543 | tincamatei | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 493 ms | 131212 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200000;
const int MAX_M = 200000;
const int MAX_COORD = 2 * MAX_N + MAX_M;
int a[MAX_N], b[MAX_N], query[MAX_M];
int realval[MAX_COORD];
int maxval;
int* p[MAX_COORD];
bool cmp(int *a, int *b) {
return *a < *b;
}
void normalize(int n) {
sort(p, p + n, cmp);
int last = *p[0], j = 0;
realval[0] = *p[0];
for(int i = 0; i < n; ++i)
if(*p[i] == last) {
*p[i] = j;
} else {
last = *p[i];
realval[++j] = last;
*p[i] = j;
}
maxval = j;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |