結果

問題 No.133 カードゲーム
ユーザー 👑 KazunKazun
提出日時 2020-08-31 13:10:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,048 ms / 5,000 ms
コード長 340 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 77,952 KB
最終ジャッジ日時 2024-11-15 20:42:47
合計ジャッジ時間 98,732 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,041 ms
77,896 KB
testcase_01 AC 4,042 ms
77,696 KB
testcase_02 AC 4,048 ms
77,184 KB
testcase_03 AC 4,047 ms
63,596 KB
testcase_04 AC 4,044 ms
77,608 KB
testcase_05 AC 4,043 ms
77,952 KB
testcase_06 AC 4,041 ms
77,368 KB
testcase_07 AC 4,043 ms
77,568 KB
testcase_08 AC 4,043 ms
77,440 KB
testcase_09 AC 4,044 ms
77,824 KB
testcase_10 AC 4,043 ms
77,696 KB
testcase_11 AC 4,043 ms
77,568 KB
testcase_12 AC 4,043 ms
77,864 KB
testcase_13 AC 4,044 ms
77,568 KB
testcase_14 AC 4,043 ms
77,288 KB
testcase_15 AC 4,044 ms
77,568 KB
testcase_16 AC 4,043 ms
77,696 KB
testcase_17 AC 4,042 ms
77,428 KB
testcase_18 AC 4,043 ms
77,536 KB
testcase_19 AC 4,043 ms
77,416 KB
testcase_20 AC 4,042 ms
77,820 KB
testcase_21 AC 4,043 ms
77,684 KB
testcase_22 AC 4,044 ms
77,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from time import time
from random import shuffle

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

START=time()
TIME_LIMIT=4

battle=win=0
while time()-START<=TIME_LIMIT:
    battle+=1
    shuffle(A)
    shuffle(B)

    k=0
    for i in range(N):
        k+=(A[i]>B[i])

    win+=(2*k>N)

print(win/battle)
0