結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2021-02-18 01:12:02 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 98 ms / 5,000 ms |
| + 624µs | |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 21,284 KB |
| 実行使用メモリ | 15,740 KB |
| 最終ジャッジ日時 | 2026-08-27 01:03:55 |
| 合計ジャッジ時間 | 4,297 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
from itertools import permutations
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
wins = 0
games = 0
for a in permutations(A):
for b in permutations(B):
games += 1
t = 0
for i in range(N):
if a[i] > b[i]:
t += 1
if t > N // 2:
wins += 1
print(wins / games)
c-yan