cf/mirror

Professor Higashikata

CF
1847D1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
2 2 4
01
1 2
1 2
1
1
2
2
Output
0
1
0
1
Sample 2of 2
Input
8 6 10
10011010
5 6
2 3
6 8
5 7
5 8
6 8
3
5
6
2
5
2
5
8
4
1
Output
2
3
2
2
1
2
2
2
2
2
1847D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…