0789 - Max 2 Ap: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

19 April 2023

3 April 2023

  • curprev 19:3119:31, 3 April 2023Andor Giulia talk contribs 548 bytes +548 Pagină nouă: == Rezolvare == <syntaxhighlight lang="python" line="1"> n, m = map(int, input().split()) matrix = [] for i in range(n): row = list(map(int, input().split())) matrix.append(row) seen = set() max_duplicate = None for i in range(n): for j in range(m): value = matrix[i][j] if value in seen and (max_duplicate is None or value > max_duplicate): max_duplicate = value else: seen.add(value) if max_duplicate is None:...