結果

問題 No.989 N×Mマス計算(K以上)
ユーザー syunsuke
提出日時 2020-09-16 19:33:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 86,764 KB
最終ジャッジ日時 2024-06-22 03:28:37
合計ジャッジ時間 3,033 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W,K=map(int,input().split())

B=list(input().split())
OP=B[0]
B=B[1:]
#print(B)
for i in range(len(B)):
    B[i]=int(B[i])
B.sort()
B=B+[10**10]
#print(B)

import bisect

ans=0
if OP=="+":
    for i in range(H):
        A=int(input())
        x=bisect.bisect_left(B,K-0.1-A)
        ans+=(W-x)
    print(ans)
else:
    for i in range(H):
        A=int(input())
        x=bisect.bisect_left(B,K//A)
        ans+=(W-x)
    print(ans)
        
    
0