#B. [S0001B]kunkka's question

    Type: Default 1000ms 256MiB

[S0001B]kunkka's question

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

S1B{\color{Red} \mathcal {{\LARGE S_{1B}} } }

背景

刘老师要为夏令营发奖励了!

说明

有N个人,刘老师买了M个礼品。 输入人名SiS_i,分数AiA_i。 每人至少一个,分多的礼品多。 尽量平均但不能完全一样(除非分一样)

格式

输入

N+1行,第一行N,M,第i行SiS_iAiA_i

N M

S1S_1 A1A_1

S2S_2 A2A_2

S3S_3 A3A_3

. . .

SNS_N ANA_N

输出

是否能平均分配(“Yes”|“No”)

样例

输入数据 1

5 7
test1 1000
test2 61
test3 1100
test4 1000
test5 400

test3 2 test1 2 test4 1 test5 1 test2 1

test4 会认为不公平

输出数据 1

No

提示

最少的必须是最多的-1。

分多的礼品多,分一样礼品数不一样也不行。

N100,M200,Si10,bi3000N\le 100,M\le 200,S_{i}\le 10,b_{i}\le 3000

S1考前模拟赛

Not Attended
Status
Done
Rule
OI
Problem
3
Start at
2024-10-19 12:00
End at
2024-10-22 12:00
Duration
72 hour(s)
Host
Partic.
1