結果
問題 | No.452 横着者のビンゴゲーム |
ユーザー | t8m8⛄️ |
提出日時 | 2016-12-03 16:20:23 |
言語 | Nim (2.0.2) |
結果 |
AC
|
実行時間 | 2,565 ms / 3,000 ms |
コード長 | 2,948 bytes |
コンパイル時間 | 3,593 ms |
コンパイル使用メモリ | 70,988 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-29 20:57:35 |
合計ジャッジ時間 | 23,000 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | AC | 1 ms
6,812 KB |
testcase_02 | AC | 2 ms
6,816 KB |
testcase_03 | AC | 5 ms
6,820 KB |
testcase_04 | AC | 1 ms
6,940 KB |
testcase_05 | AC | 6 ms
6,940 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 2 ms
6,944 KB |
testcase_08 | AC | 3 ms
6,940 KB |
testcase_09 | AC | 2 ms
6,944 KB |
testcase_10 | AC | 2 ms
6,940 KB |
testcase_11 | AC | 3 ms
6,944 KB |
testcase_12 | AC | 0 ms
6,940 KB |
testcase_13 | AC | 1 ms
6,944 KB |
testcase_14 | AC | 2,565 ms
6,940 KB |
testcase_15 | AC | 2,526 ms
6,940 KB |
testcase_16 | AC | 1,350 ms
6,944 KB |
testcase_17 | AC | 132 ms
6,940 KB |
testcase_18 | AC | 101 ms
6,940 KB |
testcase_19 | AC | 88 ms
6,940 KB |
testcase_20 | AC | 89 ms
6,944 KB |
testcase_21 | AC | 274 ms
6,940 KB |
testcase_22 | AC | 98 ms
6,944 KB |
testcase_23 | AC | 763 ms
6,940 KB |
testcase_24 | AC | 91 ms
6,944 KB |
testcase_25 | AC | 41 ms
6,940 KB |
testcase_26 | AC | 288 ms
6,944 KB |
testcase_27 | AC | 206 ms
6,944 KB |
testcase_28 | AC | 117 ms
6,940 KB |
testcase_29 | AC | 85 ms
6,944 KB |
testcase_30 | AC | 370 ms
6,940 KB |
testcase_31 | AC | 55 ms
6,940 KB |
testcase_32 | AC | 52 ms
6,940 KB |
testcase_33 | AC | 152 ms
6,944 KB |
testcase_34 | AC | 126 ms
6,940 KB |
testcase_35 | AC | 132 ms
6,940 KB |
testcase_36 | AC | 50 ms
6,944 KB |
testcase_37 | AC | 65 ms
6,944 KB |
testcase_38 | AC | 1,575 ms
6,944 KB |
testcase_39 | AC | 1,354 ms
6,944 KB |
testcase_40 | AC | 1,383 ms
6,944 KB |
testcase_41 | AC | 1,383 ms
6,940 KB |
testcase_42 | AC | 1,380 ms
6,944 KB |
testcase_43 | AC | 1,356 ms
6,944 KB |
コンパイルメッセージ
/home/judge/data/code/Main.nim(15, 11) Warning: Deprecated since v0.20, use 'initHashSet'; initSet is deprecated [Deprecated]
ソースコード
import strutils, sequtils, sets when isMainModule: var tmp = stdin.readLine.split.map(parseInt) (n, m) = (tmp[0], tmp[1]) a = newSeqWith(m, newSeqWith(n, newSeq[int](n))) for i in 0..m-1: for j in 0..n-1: a[i][j] = stdin.readLine.split.map(parseInt) var min = 1 shl 30 cnt = initSet[int]() for i in 0..m-1: for j in i+1..m-1: # yoko * yoko for li in 0..n-1: for lj in 0..n-1: cnt.init for ci in 0..n-1: cnt.incl(a[i][li][ci]) for cj in 0..n-1: cnt.incl(a[j][lj][cj]) min = min(min, cnt.len) # tate * tate for ci in 0..n-1: for cj in 0..n-1: cnt.init for li in 0..n-1: cnt.incl(a[i][li][ci]) for lj in 0..n-1: cnt.incl(a[j][lj][cj]) min = min(min, cnt.len) # yoko * tate for li in 0..n-1: for cj in 0..n-1: cnt.init for ci in 0..n-1: cnt.incl(a[i][li][ci]) for lj in 0..n-1: cnt.incl(a[j][lj][cj]) min = min(min, cnt.len) # tate * yoko for ci in 0..n-1: for lj in 0..n-1: cnt.init for li in 0..n-1: cnt.incl(a[i][li][ci]) for cj in 0..n-1: cnt.incl(a[j][lj][cj]) min = min(min, cnt.len) # naname * naname for si in 0..1: for sj in 0..1: cnt.init for k in 0..n-1: if si == 0: cnt.incl(a[i][k][k]) else: cnt.incl(a[i][k][n-k-1]) for k in 0..n-1: if sj == 0: cnt.incl(a[j][k][k]) else: cnt.incl(a[j][k][n-k-1]) min = min(min, cnt.len) # yoko * naname for li in 0..n-1: for sj in 0..1: cnt.init for ci in 0..n-1: cnt.incl(a[i][li][ci]) for k in 0..n-1: if sj == 0: cnt.incl(a[j][k][k]) else: cnt.incl(a[j][k][n-k-1]) min = min(min, cnt.len) # naname * yoko for si in 0..1: for lj in 0..n-1: cnt.init for k in 0..n-1: if si == 0: cnt.incl(a[i][k][k]) else: cnt.incl(a[i][k][n-k-1]) for cj in 0..n-1: cnt.incl(a[j][lj][cj]) min = min(min, cnt.len) # tate * naname for ci in 0..n-1: for sj in 0..1: cnt.init for li in 0..n-1: cnt.incl(a[i][li][ci]) for k in 0..n-1: if sj == 0: cnt.incl(a[j][k][k]) else: cnt.incl(a[j][k][n-k-1]) min = min(min, cnt.len) # naname * tate for si in 0..1: for cj in 0..n-1: cnt.init for k in 0..n-1: if si == 0: cnt.incl(a[i][k][k]) else: cnt.incl(a[i][k][n-k-1]) for lj in 0..n-1: cnt.incl(a[j][lj][cj]) min = min(min, cnt.len) echo min - 1