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