1 solutions

  • 0
    @ 2023-11-26 14:26:16

    模拟题,把每天所有可能的模拟题都记下来就行了

    #include <iostream>
    #include <cstdio>
    #include <algorithm>
    
    int n, m, k, input_day, a[1010][1010];
    
    int main()
    {
    	scanf("%d %d %d", &n, &m, &k);
    	for(int i = 1; i <= n; i ++)
    	{
    		for(int j = 1; j <= m; j ++)
    		{
    			scanf("%d", &input_day);
    			a[input_day][j] = 1;
    		}
    	}
    	for(int i = 1; i <= k; i ++)
    	{
    		int sum = 0;
    		for(int j = 1; j <= m; j ++)
    		{
    			if(a[i][j] == 1)
    			{
    				sum ++;
    			}
    		}
    		printf("%d ", sum);
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    4577
    Time
    1000ms
    Memory
    500MiB
    Difficulty
    1
    Tags
    # Submissions
    3
    Accepted
    3
    Uploaded By