結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-10-17 20:42:55 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 314 bytes |
| 記録 | |
| コンパイル時間 | 344 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 53,204 KB |
| 最終ジャッジ日時 | 2026-03-17 00:27:35 |
| 合計ジャッジ時間 | 1,631 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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