結果

問題 No.989 N×Mマス計算(K以上)
ユーザー syunsukesyunsuke
提出日時 2020-09-16 19:33:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 88,220 KB
最終ジャッジ日時 2023-09-04 03:48:46
合計ジャッジ時間 4,440 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,300 KB
testcase_01 AC 72 ms
71,268 KB
testcase_02 AC 74 ms
71,044 KB
testcase_03 AC 77 ms
71,500 KB
testcase_04 AC 72 ms
71,552 KB
testcase_05 AC 73 ms
71,128 KB
testcase_06 WA -
testcase_07 AC 71 ms
71,112 KB
testcase_08 WA -
testcase_09 AC 72 ms
71,436 KB
testcase_10 AC 197 ms
83,480 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 156 ms
84,268 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 157 ms
81,932 KB
testcase_17 AC 156 ms
84,192 KB
testcase_18 AC 142 ms
77,584 KB
testcase_19 AC 190 ms
87,084 KB
権限があれば一括ダウンロードができます

ソースコード

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