Submission #4830430


Source Code Expand

Copy
public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt(), a[] = java.util.stream.IntStream.range(0, n).map(i -> scanner.nextInt()).toArray();
        System.out.println(java.util.stream.IntStream.range(0, n).peek(i -> java.util.stream.IntStream.range(0, n).filter(j -> a[i] != 0 && i != j && a[j] % a[i] == 0 && Integer.bitCount(a[j] / a[i]) == 1).forEach(j -> a[j] = 0)).filter(i -> a[i] != 0).count());
    }
}

Submission Info

Submission Time
Task C - 高橋くんと魔法の箱
User Yu_212
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 539 Byte
Status
Exec Time 2109 ms
Memory 62996 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
Subtask1 0 / 20 subtask1_0.txt, subtask1_1.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt, subtask1_7.txt, subtask1_8.txt, subtask1_9.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
Subtask2 0 / 30 subtask2_0.txt, subtask2_1.txt, subtask2_2.txt, subtask2_3.txt, subtask2_4.txt, subtask2_5.txt, subtask2_6.txt, subtask2_7.txt, subtask2_8.txt, subtask2_9.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
All 0 / 50 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask1_0.txt, subtask1_1.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt, subtask1_7.txt, subtask1_8.txt, subtask1_9.txt, subtask2_0.txt, subtask2_1.txt, subtask2_2.txt, subtask2_3.txt, subtask2_4.txt, subtask2_5.txt, subtask2_6.txt, subtask2_7.txt, subtask2_8.txt, subtask2_9.txt, subtask3_0.txt, subtask3_1.txt, subtask3_2.txt, subtask3_3.txt, subtask3_4.txt, subtask3_5.txt, subtask3_6.txt, subtask3_7.txt, subtask3_8.txt, subtask3_9.txt
Case Name Status Exec Time Memory
subtask0_0.txt 205 ms 31444 KB
subtask0_1.txt 200 ms 25044 KB
subtask0_2.txt 195 ms 25044 KB
subtask1_0.txt 358 ms 29612 KB
subtask1_1.txt 383 ms 27908 KB
subtask1_10.txt 327 ms 29412 KB
subtask1_11.txt 379 ms 27896 KB
subtask1_12.txt 378 ms 27948 KB
subtask1_13.txt 382 ms 28092 KB
subtask1_14.txt 375 ms 29520 KB
subtask1_15.txt 375 ms 29192 KB
subtask1_16.txt 381 ms 28808 KB
subtask1_17.txt 377 ms 29564 KB
subtask1_18.txt 377 ms 27916 KB
subtask1_19.txt 385 ms 29688 KB
subtask1_2.txt 379 ms 29432 KB
subtask1_3.txt 374 ms 29180 KB
subtask1_4.txt 376 ms 27336 KB
subtask1_5.txt 380 ms 29364 KB
subtask1_6.txt 383 ms 29772 KB
subtask1_7.txt 373 ms 31224 KB
subtask1_8.txt 376 ms 29176 KB
subtask1_9.txt 382 ms 29560 KB
subtask2_0.txt 2109 ms 51820 KB
subtask2_1.txt 2109 ms 50364 KB
subtask2_2.txt 2109 ms 51284 KB
subtask2_3.txt 2109 ms 50664 KB
subtask2_4.txt 2109 ms 49368 KB
subtask2_5.txt 2109 ms 49332 KB
subtask2_6.txt 2109 ms 49020 KB
subtask2_7.txt 2109 ms 48468 KB
subtask2_8.txt 2109 ms 62996 KB
subtask2_9.txt 2109 ms 51936 KB
subtask3_0.txt 2109 ms 51452 KB
subtask3_1.txt 2109 ms 61604 KB
subtask3_2.txt 2109 ms 51348 KB
subtask3_3.txt 2108 ms 48848 KB
subtask3_4.txt 2109 ms 50672 KB
subtask3_5.txt 2109 ms 49376 KB
subtask3_6.txt 2109 ms 59584 KB
subtask3_7.txt 2109 ms 51460 KB
subtask3_8.txt 2109 ms 45480 KB
subtask3_9.txt 2109 ms 49208 KB