結果

問題 No.1280 Beyond C
ユーザー jensenjensen
提出日時 2021-01-06 16:13:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 743 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 54,676 KB
最終ジャッジ日時 2024-04-24 17:02:29
合計ジャッジ時間 14,856 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 482 ms
43,504 KB
testcase_01 AC 484 ms
43,624 KB
testcase_02 AC 484 ms
43,632 KB
testcase_03 AC 477 ms
43,480 KB
testcase_04 AC 490 ms
43,376 KB
testcase_05 AC 493 ms
43,352 KB
testcase_06 AC 481 ms
43,628 KB
testcase_07 AC 461 ms
43,752 KB
testcase_08 AC 470 ms
43,628 KB
testcase_09 AC 467 ms
43,356 KB
testcase_10 AC 482 ms
43,636 KB
testcase_11 AC 472 ms
43,604 KB
testcase_12 AC 468 ms
43,496 KB
testcase_13 AC 459 ms
43,372 KB
testcase_14 AC 481 ms
43,504 KB
testcase_15 AC 595 ms
47,820 KB
testcase_16 AC 552 ms
47,712 KB
testcase_17 AC 579 ms
49,076 KB
testcase_18 AC 590 ms
54,240 KB
testcase_19 AC 737 ms
54,104 KB
testcase_20 AC 736 ms
54,676 KB
testcase_21 AC 730 ms
54,552 KB
testcase_22 AC 743 ms
54,364 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