B. Yet Another Crosses Problem
B. Yet Another Crosses Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a picture consisting of n n rows and m m columns. Rows are numbered from 1 1 to n n from the top to the bottom, columns are numbered from 1 1 to m m from the left to the right. Each cell is painted either black or white. You think that this picture is not interesting enough. You consider a picture to be interesting if there is at least one cross in it. A cross is represented by a pair of numbers x x and y y, where 1 ≤ x ≤ n 1≤x≤n and 1 ≤ y ≤