Problem Description
You are given a following process.
There is a platform with n columns. 1×1 squares are appearing one after another in some columns on this platform. If there are no squares in the column, a square will occupy the bottom row. Otherwise a square will appear at the top of the highest square of this column.
When all of the n columns have at least one square in them, the bottom row is being removed. You will receive 1 point for this, and all the squares left will fall down one row.
You task is to calculate the amount of points you will receive.
Input
The first line of input contain 2 integer numbers n and m (1≤n,m≤1000) — the length of the platform and the number of the squares.
The next line contain mm integer numbers c1,c2,…,cm (1≤ci≤n) — column in which i-th square w

这篇博客介绍了CodeForces 961-A题目的模拟过程,讨论了类似俄罗斯方块的问题,其中玩家在n列平台上放置m个方块,每列至少有一个方块时,底部一行会消除并得分。博客内容包括问题描述、输入输出格式、样例输入输出以及解题思路和代码实现。通过模拟找到最小相同数的个数来计算得分。
最低0.47元/天 解锁文章
604

被折叠的 条评论
为什么被折叠?



