藤藤的序列
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.
Description
给定一个长度为N的序列,每个位置上的数只可能是中的一种。
有次询问,每次给定两个数,请分别输出区间里数字的个数。
Format
Input
第一行两个整数和,
接下来行表示个数字,且每个数字均为中的一种,
接下来行,每行两个数字和,表示询问区间里数字的个数。
Output
对于每一次询问,每行输出三个用空格隔开的数字,分别表示区间内1,2,3出现的个数
Samples
样例输入
6 3
2
1
1
3
2
1
1 6
3 3
2 4
样例输出
3 2 1
1 0 0
2 0 1
Limitation
的分数,
另有的分数,
的分数,
20250220周赛
- Status
- Done
- Rule
- IOI
- Problem
- 7
- Start at
- 2025-2-20 16:30
- End at
- 2025-2-20 18:30
- Duration
- 2 hour(s)
- Host
- Partic.
- 26