编程语言
首页 > 编程语言> > [Java] 202104-1

[Java] 202104-1

作者:互联网

import java.io.*;
import java.util.*;

class Main {

    public Main() throws IOException
    {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(f.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        int L = Integer.parseInt(st.nextToken());
        int[] h = new int[L];

        for (int i = 0; i < n; i++)
        {
        	st = new StringTokenizer(f.readLine());
            for (int j = 0; j < m; j++)
            {
                int pixel = Integer.parseInt(st.nextToken());
                h[pixel]++;
            }
        }

        for (int i = 0; i < L; i++)
        {
            out.print(h[i] + " ");
        }
        out.println();
        out.close();
        f.close();
    }
    public static void main(String[] args) throws IOException
    {
        new Main();
    }

}

标签:Java,int,st,Integer,parseInt,new,202104,out
来源: https://blog.csdn.net/weixin_41714373/article/details/115603132