結果
問題 | No.133 カードゲーム |
ユーザー |
|
提出日時 | 2024-10-04 20:19:14 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 494 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 82,336 KB |
実行使用メモリ | 67,144 KB |
最終ジャッジ日時 | 2024-10-04 20:19:17 |
合計ジャッジ時間 | 2,465 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 19 |
ソースコード
import itertoolsimport numpy as npN = int(input())cards_a = list(map(int, input().split()))cards_b = list(map(int, input().split()))total = 0win_a = 0for pattern_a in itertools.permutations(cards_a):for pattern_b in itertools.permutations(cards_b):pattern_a = np.array(list(pattern_a))pattern_b = np.array(list(pattern_b))fight = np.sum(pattern_a > pattern_b)if fight > N - fight:win_a += 1total += 1print(win_a / total)