結果
問題 | No.989 N×Mマス計算(K以上) |
ユーザー | komkompi |
提出日時 | 2020-03-08 14:58:38 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 495 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 20,936 KB |
最終ジャッジ日時 | 2024-04-24 20:21:09 |
合計ジャッジ時間 | 3,860 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 25 ms
10,880 KB |
testcase_01 | AC | 27 ms
10,880 KB |
testcase_02 | AC | 25 ms
10,752 KB |
testcase_03 | WA | - |
testcase_04 | AC | 27 ms
10,752 KB |
testcase_05 | AC | 29 ms
10,752 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 27 ms
10,880 KB |
testcase_10 | AC | 202 ms
16,760 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 100 ms
16,148 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 95 ms
16,148 KB |
testcase_18 | AC | 151 ms
13,312 KB |
testcase_19 | AC | 164 ms
18,548 KB |
ソースコード
import bisect N,M,K=map(int,input().split()) temp=list(input().split()) col=list(map(int,temp[1:])) data=[] for i in range(N): data.append(int(input())) col.sort() data.sort() ans=N*M for item in col: index=bisect.bisect_left(data,K-item if temp[0]=="+" else K//item) ans-=index if temp[0]=="+" else N-index #print(index) print(ans)