# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125298 | PizzaLovers007 | Exhibition (JOI19_ho_t2) | Java | 978 ms | 60656 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.io.*;
import java.util.*;
public class joi2019_ho_t2
{
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
public void go() throws IOException
{
StringTokenizer tok = new StringTokenizer(in.readLine());
int n = Integer.parseInt(tok.nextToken());
int m = Integer.parseInt(tok.nextToken());
Picture[] pics = new Picture[n];
for (int i = 0; i < n; i++)
{
tok = new StringTokenizer(in.readLine());
long size = Long.parseLong(tok.nextToken());
long value = Long.parseLong(tok.nextToken());
pics[i] = new Picture(size, value);
}
long[] frames = new long[m];
for (int i = 0; i < m; i++)
{
tok = new StringTokenizer(in.readLine());
frames[i] = Long.parseLong(tok.nextToken());
}
Arrays.sort(frames);
Arrays.sort(pics, (one, two) -> {
if (one.value == two.value)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |