結果

問題 No.133 カードゲーム
ユーザー 👑 KazunKazun
提出日時 2020-08-31 13:10:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,043 ms / 5,000 ms
コード長 340 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 78,048 KB
最終ジャッジ日時 2024-04-27 16:50:50
合計ジャッジ時間 98,076 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,042 ms
77,836 KB
testcase_01 AC 4,042 ms
77,648 KB
testcase_02 AC 4,041 ms
77,080 KB
testcase_03 AC 4,041 ms
64,116 KB
testcase_04 AC 4,042 ms
77,612 KB
testcase_05 AC 4,042 ms
77,924 KB
testcase_06 AC 4,042 ms
77,548 KB
testcase_07 AC 4,043 ms
77,740 KB
testcase_08 AC 4,041 ms
77,704 KB
testcase_09 AC 4,042 ms
77,748 KB
testcase_10 AC 4,041 ms
77,896 KB
testcase_11 AC 4,042 ms
77,912 KB
testcase_12 AC 4,042 ms
77,760 KB
testcase_13 AC 4,041 ms
77,776 KB
testcase_14 AC 4,042 ms
77,580 KB
testcase_15 AC 4,041 ms
77,572 KB
testcase_16 AC 4,042 ms
78,048 KB
testcase_17 AC 4,042 ms
77,516 KB
testcase_18 AC 4,040 ms
77,876 KB
testcase_19 AC 4,042 ms
77,520 KB
testcase_20 AC 4,042 ms
77,708 KB
testcase_21 AC 4,042 ms
77,756 KB
testcase_22 AC 4,042 ms
77,668 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