# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
955835 | rainboy | Graphic Madness (CERC12_K) | C11 | 17 ms | 3676 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N1 1000
#define N2 1000
#define L 1000
#define N (N1 + L + N2 + L)
#define M (N + L)
int *ej[N], eo[N], n, n1, n2, l;
void append(int i, int j) {
int o = eo[i]++;
if (o >= 2 && (o & o - 1) == 0)
ej[i] = (int *) realloc(ej[i], o * 2 * sizeof *ej[i]);
ej[i][o] = j;
}
int read_() {
static char s[8];
int i;
scanf("%s", s);
i = atoi(s + 2) - 1;
if (s[0] == 'A' && s[1] == 'S')
i += n1;
else if (s[0] == 'B' && s[1] == 'P')
i += n1 + l;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |