結果

問題 No.1280 Beyond C
ユーザー jensenjensen
提出日時 2021-01-06 16:13:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 371 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 44,648 KB
最終ジャッジ日時 2023-08-06 22:37:22
合計ジャッジ時間 6,486 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
29,536 KB
testcase_01 AC 133 ms
29,612 KB
testcase_02 AC 135 ms
29,632 KB
testcase_03 AC 132 ms
29,464 KB
testcase_04 AC 129 ms
29,476 KB
testcase_05 AC 131 ms
29,624 KB
testcase_06 AC 131 ms
29,696 KB
testcase_07 AC 132 ms
29,660 KB
testcase_08 AC 130 ms
29,676 KB
testcase_09 AC 130 ms
29,492 KB
testcase_10 AC 131 ms
29,608 KB
testcase_11 AC 133 ms
29,768 KB
testcase_12 AC 130 ms
29,680 KB
testcase_13 AC 132 ms
29,672 KB
testcase_14 AC 133 ms
29,684 KB
testcase_15 AC 242 ms
38,312 KB
testcase_16 AC 198 ms
38,188 KB
testcase_17 AC 238 ms
39,220 KB
testcase_18 AC 230 ms
44,416 KB
testcase_19 AC 329 ms
44,524 KB
testcase_20 AC 369 ms
44,648 KB
testcase_21 AC 371 ms
44,400 KB
testcase_22 AC 362 ms
44,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

def findX(l,i,a,c):
    j=i
    for j in range(i,len(l)):
        if(l[j]*a>c):
            break
        if(j==len(l)-1):
            return 0,0
    return len(l)-j,j

[n,m,c]=list(map(int,input().split()))
a=list(map(int, input().split()))
b=list(map(int, input().split()))
b.sort()
a=np.array(a)
b=np.array(b)
a=np.sort(a)[::-1]
count=0
s=n*m
idx=0
for i in range(n):
    po,idx=findX(b,idx,a[i],c)
    count+=po
    if(po==0): 
        break
print(count/s) 
0