結果
| 問題 |
No.133 カードゲーム
|
| ユーザー |
nohakai3
|
| 提出日時 | 2022-10-17 20:39:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 417 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 82,308 KB |
| 実行使用メモリ | 62,516 KB |
| 最終ジャッジ日時 | 2024-06-28 10:14:05 |
| 合計ジャッジ時間 | 2,061 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / 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()))
l1=list(permutations(range(n)))
l2=list(permutations(range(n)))
cnt=0
for x in l1:
a,b=0,0
for y in l2:
for i in range(n):
if A[x[i]]>B[y[i]]:
a+=1
elif A[x[i]]<B[y[i]]:
b+=1
if a>b:
cnt+=1
print(cnt/n)
nohakai3