結果
| 問題 |
No.133 カードゲーム
|
| コンテスト | |
| ユーザー |
ディグ田
|
| 提出日時 | 2020-04-16 13:57:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 414 bytes |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 82,012 KB |
| 実行使用メモリ | 62,684 KB |
| 最終ジャッジ日時 | 2024-10-01 19:16:28 |
| 合計ジャッジ時間 | 2,034 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 3 WA * 16 |
ソースコード
import itertools n = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) a_rate_numerator = 0 for a in itertools.permutations(A, n): for b in itertools.permutations(B, n): a_score = 0 b_score = 0 for i in range(n): if a[i] > b[i]: a_score += 1 elif b[i] > a[i]: b_score += 1 if a_score > b_score: a_rate_numerator += 1 print(a_rate_numerator / (n**2))
ディグ田