# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
745684 | rahulverma | Kocka (COCI18_kocka) | Java | 785 ms | 58120 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.
import java.util.*;
import java.io.*;
public class kocka {
static final int N = 1_00_005, M = 2_010;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int ok = 0;
int[][] ans = new int[4][N];
HashSet<Integer>[] st = new HashSet[N];
for (int i = 0; i < N; i++) {
st[i] = new HashSet<>();
}
StringTokenizer ts = new StringTokenizer(br.readLine());
for (int i = 1; i <= n; i++) {
int x = Integer.parseInt(ts.nextToken());
if (x == -1)
x = n + 1;
ans[0][i] = x + 1;
st[x + 1].add(i);
}
ts = new StringTokenizer(br.readLine());
for (int i = 1; i <= n; i++) {
int x = Integer.parseInt(ts.nextToken());
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... |