cf/mirror

Orac and Game of Life

CF
1349C2000· candidate master2s128 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
3 3 3
000
111
000
1 1 1
2 2 2
3 3 3
Output
1
1
1
Sample 2of 4
Input
5 2 2
01
10
01
10
01
1 1 4
5 1 4
Output
0
0
Sample 3of 4
Input
5 5 3
01011
10110
01101
11010
10101
1 1 4
1 2 3
5 5 3
Output
1
0
1
Sample 4of 4
Input
1 1 3
0
1 1 1
1 1 2
1 1 3
Output
0
0
0
1349C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…