結果
| 問題 |
No.133 カードゲーム
|
| ユーザー |
nohakai3
|
| 提出日時 | 2022-10-17 20:42:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 314 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-06-28 10:15:55 |
| 合計ジャッジ時間 | 2,020 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 1 WA * 18 |
ソースコード
from itertools import permutations
n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
cnt=0
win=0
for i in permutations(A,n):
cnt+=1
w=0
for x,y in zip(i,B):
if x>y:
w+=1
elif y<x:
w-=1
if w>0:
win+=1
print(win/cnt)
nohakai3