Need help in Problem E , 836 ( div 2 )

Revision en2, by papa-ka-para, 2023-01-18 16:03:17

Hi everyone,

I am trying to solve the problem here :

https://codeforces.net/contest/1758/problem/E

This is an editorial for the problem : https://codeforces.net/blog/entry/109438

I am having few doubts after reading the editorial. Can someone help out ?

My doubts : 1)

Using these relationships, we can create a weighted directed graph using our rows as nodes.

What is direction of the edge in graph ? What should be the weight of the edge ?

2) Obviously, no solutions exist if there are discrepancies in the graph (modℎ), no solution exists.

What is meaning of discrepancies in the graph ?

3) Now, for each connected component, if there is an assigned value in one of the rows it contains, we can determine all of the other values for that column in the connected component.

How can we have connected components in the directed graph ? Are there all nodes reachable from all the other nodes in the component ?

Can someone help me clear doubts so I can upsolve ?

Tags upsolve, 836, div2

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English papa-ka-para 2023-01-18 16:03:17 10
en1 English papa-ka-para 2023-01-18 16:02:33 1050 Initial revision (published)