結果
| 問題 | No.133 カードゲーム | 
| コンテスト | |
| ユーザー |  _matumo_ | 
| 提出日時 | 2019-07-20 14:33:13 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 32 ms / 5,000 ms | 
| コード長 | 267 bytes | 
| コンパイル時間 | 144 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-12-29 17:28:48 | 
| 合計ジャッジ時間 | 1,872 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 19 | 
ソースコード
import itertools
N =int(input())
pa=[int(x) for x in input().split()]
pb=[int(x) for x in input().split()]
nv,nt=0,0
for p in itertools.permutations(pa):
    n=0
    for i in range(N):
        if p[i]>pb[i]:  n +=1
    if n*2>N:           nv+=1
    nt+=1
print(nv/nt)
            
            
            
        