結果
| 問題 |
No.133 カードゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-28 17:05:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 525 bytes |
| コンパイル時間 | 417 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-11-24 23:57:37 |
| 合計ジャッジ時間 | 1,995 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 19 |
ソースコード
import itertools
N = int(input())
A = input().split()
B = input().split()
cnt = 0
all = 0
for i in itertools.permutations(A):
for j in itertools.permutations(B):
a_win = 0
a_lose = 0
for k in range(N):
print(k,i[k],j[k])
if int(i[k]) > int(j[k]):
a_win += 1
if int(i[k]) < int(j[k]):
a_lose += 1
else:
all += 1
if a_win > a_lose:
cnt += 1
print(cnt/all)