Inconvenient Pairs solution codeforces

Inconvenient Pairs solution codeforces There is a city that can be represented as a square grid with corner points in (0,0)(0,0) and (106,106)(106,106). The city has nn vertical and mm horizontal streets that goes across the whole city, i. e. the ii-th vertical streets goes from (xi,0)(xi,0) to (xi,106)(xi,106) and the jj-th horizontal street goes from (0,yj)(0,yj) to (106,yj)(106,yj). All streets are bidirectional. Borders of the city…

Read More