結果

問題 No.452 横着者のビンゴゲーム
ユーザー titiatitia
提出日時 2023-08-03 01:30:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,638 ms / 3,000 ms
コード長 671 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 79,248 KB
最終ジャッジ日時 2024-04-21 01:16:19
合計ジャッジ時間 17,132 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,012 KB
testcase_01 AC 40 ms
53,360 KB
testcase_02 AC 40 ms
54,068 KB
testcase_03 AC 54 ms
65,916 KB
testcase_04 AC 41 ms
53,424 KB
testcase_05 AC 53 ms
68,064 KB
testcase_06 AC 40 ms
53,492 KB
testcase_07 AC 49 ms
60,964 KB
testcase_08 AC 50 ms
63,492 KB
testcase_09 AC 43 ms
52,616 KB
testcase_10 AC 43 ms
53,428 KB
testcase_11 AC 51 ms
62,872 KB
testcase_12 AC 46 ms
54,992 KB
testcase_13 AC 41 ms
53,196 KB
testcase_14 AC 1,638 ms
79,248 KB
testcase_15 AC 1,630 ms
79,184 KB
testcase_16 AC 804 ms
76,732 KB
testcase_17 AC 160 ms
76,096 KB
testcase_18 AC 198 ms
76,064 KB
testcase_19 AC 177 ms
76,112 KB
testcase_20 AC 143 ms
76,564 KB
testcase_21 AC 328 ms
76,132 KB
testcase_22 AC 134 ms
75,888 KB
testcase_23 AC 596 ms
76,712 KB
testcase_24 AC 123 ms
75,984 KB
testcase_25 AC 94 ms
75,632 KB
testcase_26 AC 389 ms
76,392 KB
testcase_27 AC 322 ms
76,156 KB
testcase_28 AC 211 ms
76,276 KB
testcase_29 AC 181 ms
76,084 KB
testcase_30 AC 425 ms
76,348 KB
testcase_31 AC 129 ms
76,316 KB
testcase_32 AC 110 ms
76,040 KB
testcase_33 AC 249 ms
76,128 KB
testcase_34 AC 205 ms
76,176 KB
testcase_35 AC 220 ms
76,348 KB
testcase_36 AC 101 ms
75,776 KB
testcase_37 AC 104 ms
75,688 KB
testcase_38 AC 1,391 ms
77,452 KB
testcase_39 AC 870 ms
77,332 KB
testcase_40 AC 887 ms
76,948 KB
testcase_41 AC 858 ms
76,804 KB
testcase_42 AC 851 ms
77,416 KB
testcase_43 AC 859 ms
77,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
ALIST=[]

for i in range(m):
    A=[list(map(int,input().split())) for i in range(n)]

    LIST=[]

    for j in range(n):
        X=A[j][:]
        LIST.append(X)

    for j in range(n):
        X=[]
        for k in range(n):
            X.append(A[k][j])
        LIST.append(X)

    X=[]
    for j in range(n):
        X.append(A[j][j])
    LIST.append(X)

    X=[]
    for j in range(n):
        X.append(A[n-1-j][j])
    LIST.append(X)

    ALIST.append(LIST)

MIN=1<<60

for i in range(m):
    for p in ALIST[i]:
        for j in range(i+1,m):
            for q in ALIST[j]:
                MIN=min(MIN,len(set(p+q)))

print(MIN-1)




0