結果
問題 | No.133 カードゲーム |
ユーザー |
![]() |
提出日時 | 2020-08-07 23:20:17 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 47 ms / 5,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 225 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 62,324 KB |
最終ジャッジ日時 | 2024-09-25 00:13:15 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
from itertools import permutationsn=int(input())a=list(permutations(list(map(int,input().split()))))b=list(permutations(list(map(int,input().split()))))ca=0ct=0for i in range(len(a)):for j in range(len(b)):cnta=0cntb=0for l,m in zip(a[i],b[j]):if l>m:cnta+=1else:cntb+=1if cnta>cntb:ca+=1ct+=1print(ca/ct)