Skip to content

くじ引き (Lottery)

UnratedFunction
日本語

Language

Contribute a translation
Time limit
10000 ms
Memory limit
512 MB
Submissions
0
Correct
0
Solved by
0
AC rate
—

Statement

問題文 1ページ

問題文 2ページ

問題文 3ページ

問題文 4ページ

問題文 5ページ

問題文 6ページ

Examples

Sample input 1
5 3
2 1 3 1 0
1 1 0 2 0
0 3
1 4
2 3
Sample output 1
2
0
2
Sample input 2
6 5
1 3 3 2 1 0
1 2 1 1 2 1
0 1
1 2
1 4
2 5
4 5
Sample output 2
2
3
3
1
1

Notes

Tags

No tags yet

Source

This problem accepts only these languages.

C++20