結果
問題 |
No.1669 パズル作成
|
ユーザー |
![]() |
提出日時 | 2025-06-12 14:14:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 372 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 76,784 KB |
最終ジャッジ日時 | 2025-06-12 14:14:16 |
合計ジャッジ時間 | 3,320 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 26 |
ソースコード
n, m = map(int, input().split()) # Initialize a list to count the number of black cells in each column black_counts = [0] * (n + 1) # columns are 1-based for _ in range(m): r, c = map(int, input().split()) black_counts[c] += 1 result = 0 for c in range(1, n + 1): black = black_counts[c] white = n - black result += min(black, white) print(result)