結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-02 22:30:37 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 64 ms / 5,000 ms |
| + 696µs | |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2026-08-28 20:00:38 |
| 合計ジャッジ時間 | 3,301 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
import itertools
N = int(input())
lsA = list(map(int,input().split()))
lsB = list(map(int,input().split()))
lspa = itertools.permutations(lsA,N)
lspb = itertools.permutations(lsB,N)
cntall = 0
cntwin = 0
for A in lspa:
for B in lspb:
point = 0
for i in range(N):
if A[i] > B[i]:
point += 1
if point > N//2:
cntwin += 1
cntall += 1
print(cntwin/cntall)