結果

問題 No.133 カードゲーム
ユーザー tnodinotnodino
提出日時 2022-07-14 19:23:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 497 ms / 5,000 ms
コード長 360 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 10,780 KB
実行使用メモリ 8,936 KB
最終ジャッジ日時 2023-09-08 10:22:06
合計ジャッジ時間 11,405 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 294 ms
8,844 KB
testcase_01 AC 291 ms
8,900 KB
testcase_02 AC 289 ms
8,756 KB
testcase_03 AC 175 ms
8,900 KB
testcase_04 AC 392 ms
8,812 KB
testcase_05 AC 490 ms
8,728 KB
testcase_06 AC 481 ms
8,728 KB
testcase_07 AC 489 ms
8,852 KB
testcase_08 AC 386 ms
8,872 KB
testcase_09 AC 383 ms
8,900 KB
testcase_10 AC 485 ms
8,752 KB
testcase_11 AC 497 ms
8,936 KB
testcase_12 AC 483 ms
8,876 KB
testcase_13 AC 290 ms
8,728 KB
testcase_14 AC 377 ms
8,724 KB
testcase_15 AC 390 ms
8,876 KB
testcase_16 AC 485 ms
8,896 KB
testcase_17 AC 479 ms
8,844 KB
testcase_18 AC 484 ms
8,760 KB
testcase_19 AC 483 ms
8,900 KB
testcase_20 AC 484 ms
8,788 KB
testcase_21 AC 474 ms
8,732 KB
testcase_22 AC 483 ms
8,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from random import shuffle
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
s = 0
t = 0
for _ in range(100000):
    shuffle(A)
    shuffle(B)
    cnt = 0
    for i in range(N):
        if A[i] > B[i]:
            cnt += 1
        if A[i] < B[i]:
            cnt -= 1
    if cnt >= 1:
        s += 1
    t += 1
print(s / t)
0