結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-07 01:03:30 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| 記録 | |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 85,228 KB |
| 実行使用メモリ | 54,112 KB |
| 最終ジャッジ日時 | 2026-03-11 03:56:26 |
| 合計ジャッジ時間 | 1,636 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)