# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
875939 | rainboy | Cards (LMIO19_korteles) | C11 | 77 ms | 5152 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>
#define A 26
#define M 531441 /* M = (A + 1)^4 */
int idx(int a, int b, int c, int d) {
return ((a * (A + 1) + b) * (A + 1) + c) * (A + 1) + d;
}
int main() {
static int kk[M];
int n, a, b, c, d, e, f, g, h, u, w;
long long ans;
scanf("%d", &n);
while (n--) {
static char s[4], t[4];
int u;
scanf("%s%s", s, t);
a = s[0] - 'A' + 1, b = s[1] - 'A' + 1;
c = t[0] - 'A' + 1, d = t[1] - 'A' + 1;
for (u = 0; u < 16; u++)
kk[idx((u & 1) != 0 ? a : 0, (u & 2) != 0 ? b : 0, (u & 4) != 0 ? c : 0, (u & 8) != 0 ? d : 0)]++;
}
ans = 0;
for (a = 1; a <= A; a++)
for (b = 1; b <= A; b++)
for (c = 1; c <= A; c++)
for (d = 1; d <= A; d++)
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |