¿La página no carga? Prueba haciendo clic aquí.
Placeholder

#8290

Turning Red 3s 1024MB

Problemas


Ejemplo #1

8 6
GBRBRRRG
2 1 4
1 2
4 4 5 6 7
3 5 6 7
1 8
1 8
8

Ejemplo #2

4 3
RGBR
2 1 2
2 2 3
2 3 4
impossible

Ejemplo #3

4 4
GBRG
2 1 2
2 2 3
2 3 4
1 4
6

Ejemplo #4

3 3
RGB
1 1
1 2
1 3
3

Fuente

ICPC World Finals 2022 P번, ICPC World Finals 2023 G번

Debes iniciar sesión para escribir código.