ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1709. Penguin-Avia

Universal test for any WA, including WA6
Posted by D4nick 12 May 2023 13:49
Input:
9
16372 24788
000010111
001111101
010010001
010011001
111100101
010100100
110011000
100000000
111110000

Possible answer (a's should be the same, d's can differ in you answer):
163720
000000000
000000d0d
0000d000d
0000dd00d
00dd00d0d
000d00d00
0d00dd000
000000000
0dddd0000

Matrix for the graph in the answer:
000010111
001111000
010000000
010000000
110000000
010000000
100000000
100000000
100000000

Edited by author 12.05.2023 13:49
Re: Universal test for any WA, including WA6
Posted by D4nick 12 May 2023 13:54
Use this site to visualise the graph using matrix and firstly change enumeration from 1,2,3... to 0,1,2... :
https://graphonline.ru/#

Edited by author 12.05.2023 13:55

Edited by author 12.05.2023 13:55