結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2023-12-26 22:36:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 454 bytes |
| 記録 | |
| コンパイル時間 | 315 ms |
| コンパイル使用メモリ | 82,584 KB |
| 実行使用メモリ | 61,968 KB |
| 最終ジャッジ日時 | 2024-09-27 15:17:46 |
| 合計ジャッジ時間 | 2,164 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 7 WA * 12 |
ソースコード
from itertools import permutations
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
if N == 1:
if A[0] > B[0]:
print(1)
else:
print(0)
exit()
win = 0
for a in permutations(A, N):
for b in permutations(B, N):
cnt = 0
for i in range(N):
if a[i] > b[i]:
cnt += 1
if cnt > N // 2:
win += 1
print(win / (N * (N - 1))**2)
ntuda