結果
| 問題 |
No.133 カードゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-27 22:21:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 373 bytes |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-13 03:49:46 |
| 合計ジャッジ時間 | 1,461 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 19 |
ソースコード
from itertools import permutations
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
As = list(permutations(A, n))
Bs = list(permutations(B, n))
print(As)
print(Bs)
vic = 0
for a in As:
for b in Bs:
if sum([1 for i, j in zip(a, b) if i > j]) > int(n//2):
vic += 1
print(vic / (len(As)*len(Bs)))