Submission #1697378


Source Code Expand

import java.util.Scanner;
import java.util.Stack;

class Main {

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

    void compute() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] nanbon = new int[N];
        for (int i = 0; i < M; i++) {
            nanbon[sc.nextInt() - 1]++;
            nanbon[sc.nextInt() - 1]++;
        }
        for (int i = 0; i < N; i++) {
            System.out.println(nanbon[i]);
        }
    }
}

Submission Info

Submission Time
Task B - Counting Roads
User packer_jp
Language Java8 (OpenJDK 1.8.0)
Score 200
Code Size 558 Byte
Status AC
Exec Time 100 ms
Memory 23764 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt
Case Name Status Exec Time Memory
sample_01.txt AC 93 ms 20556 KB
sample_02.txt AC 95 ms 21972 KB
sample_03.txt AC 93 ms 21716 KB
subtask_1_1.txt AC 98 ms 23764 KB
subtask_1_2.txt AC 96 ms 19668 KB
subtask_1_3.txt AC 97 ms 19796 KB
subtask_1_4.txt AC 94 ms 21716 KB
subtask_1_5.txt AC 100 ms 21460 KB
subtask_1_6.txt AC 98 ms 21588 KB
subtask_1_7.txt AC 100 ms 19924 KB