Submission #7524871


Source Code Expand

Copy
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		new Main().solver();
	}

	void solver() {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		long K = sc.nextLong();
		int Q = sc.nextInt();
		long[] P = new long[N];
		Arrays.fill(P, K - Q);
		for (int i = 0; i < Q; ++i) {
			int A = sc.nextInt();
			--A;
			P[A]++;
		}
		PrintWriter pw = new PrintWriter(System.out);
		for (int i = 0; i < N; ++i) {
			if (P[i] <= 0)
				pw.println("No");
			else
				pw.println("Yes");
		}
		pw.close();
	}

	void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}

Submission Info

Submission Time
Task C - Attack Survival
User fortoobye
Language Java8 (OpenJDK 1.8.0)
Score 300
Code Size 785 Byte
Status AC
Exec Time 459 ms
Memory 50312 KB

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt, sub1_14.txt, sub1_15.txt, sub1_16.txt, sub1_17.txt, sub1_18.txt, sub1_19.txt, sub1_20.txt, sub1_21.txt, sub1_22.txt, sub1_23.txt
Case Name Status Exec Time Memory
sample_01.txt AC 94 ms 20948 KB
sample_02.txt AC 94 ms 20692 KB
sample_03.txt AC 94 ms 18900 KB
sub1_01.txt AC 454 ms 50312 KB
sub1_02.txt AC 331 ms 46208 KB
sub1_03.txt AC 451 ms 46356 KB
sub1_04.txt AC 338 ms 44696 KB
sub1_05.txt AC 212 ms 29172 KB
sub1_06.txt AC 431 ms 44620 KB
sub1_07.txt AC 384 ms 50056 KB
sub1_08.txt AC 305 ms 41812 KB
sub1_09.txt AC 399 ms 44620 KB
sub1_10.txt AC 414 ms 47384 KB
sub1_11.txt AC 459 ms 49824 KB
sub1_12.txt AC 458 ms 48652 KB
sub1_13.txt AC 154 ms 21588 KB
sub1_14.txt AC 361 ms 43636 KB
sub1_15.txt AC 448 ms 48424 KB
sub1_16.txt AC 441 ms 47848 KB
sub1_17.txt AC 425 ms 47364 KB
sub1_18.txt AC 266 ms 31304 KB
sub1_19.txt AC 433 ms 49092 KB
sub1_20.txt AC 244 ms 31412 KB
sub1_21.txt AC 422 ms 47680 KB
sub1_22.txt AC 410 ms 45592 KB
sub1_23.txt AC 133 ms 19796 KB