結果
問題 | No.133 カードゲーム |
ユーザー |
![]() |
提出日時 | 2017-09-07 07:37:33 |
言語 | Nim (2.2.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,119 bytes |
コンパイル時間 | 831 ms |
コンパイル使用メモリ | 64,684 KB |
最終ジャッジ日時 | 2024-11-14 20:14:42 |
合計ジャッジ時間 | 1,268 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/judge/data/code/Main.nim(11, 20) Error: undeclared identifier: 'countBits32' candidates (edit distance, scope distance); see '--spellSuggest': (4, 6): 'countIt'
ソースコード
import sequtils,strutils,mathvarN = stdin.readline.parseIntA = stdin.readline.split.map(parseInt)B = stdin.readline.split.map(parseInt)hyou : array[17, array[17, array[5, int]]]hyou[0][0][0] = 1for i in 0..<(1 shl N):for j in 0..<(1 shl N):varibit = countBits32(i.int32)jbit = countBits32(j.int32)if ibit != jbit:continuefor a in 0..<N:for b in 0..<N:if (i and (1 shl a)) == 0 and (j and (1 shl b)) == 0:if A[a] > B[b]:for k in 0..<N:#echo @[i,j,a,b,(j or (1 shl b))]hyou[i or (1 shl a)][j or (1 shl b)][k + 1] += hyou[i][j][k]else:for k in 0..<N:hyou[i or (1 shl a)][j or (1 shl b)][k] += hyou[i][j][k]vark : intp : int = 1for i in 1..N:if i > (N - i):k += hyou[(1 shl N) - 1][(1 shl N) - 1][i]for i in 1..N:p *= ivar ans : float64 = k / (p * p)echo ans