結果
| 問題 |
No.133 カードゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-07 01:03:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 357 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-06-24 23:51:34 |
| 合計ジャッジ時間 | 2,086 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 9 WA * 10 |
ソースコード
import itertools
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
per = itertools.permutations(list(range(N)), 2)
cnt = 0
count = 0
for (x, y) in per:
if a[x]>b[y]:
cnt += 1
count += 1
if count ==0:
print(0)
else:
ans = cnt / count
print(ans)