結果
問題 | No.989 N×Mマス計算(K以上) |
ユーザー | rkyiolklo |
提出日時 | 2020-04-21 10:11:07 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 397 ms / 2,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,700 KB |
最終ジャッジ日時 | 2024-04-16 17:40:46 |
合計ジャッジ時間 | 3,375 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 32 ms
10,880 KB |
testcase_01 | AC | 31 ms
10,880 KB |
testcase_02 | AC | 31 ms
10,752 KB |
testcase_03 | AC | 32 ms
10,752 KB |
testcase_04 | AC | 30 ms
10,752 KB |
testcase_05 | AC | 31 ms
10,880 KB |
testcase_06 | AC | 31 ms
10,880 KB |
testcase_07 | AC | 30 ms
10,752 KB |
testcase_08 | AC | 31 ms
10,752 KB |
testcase_09 | AC | 32 ms
10,752 KB |
testcase_10 | AC | 238 ms
16,908 KB |
testcase_11 | AC | 175 ms
17,676 KB |
testcase_12 | AC | 283 ms
18,168 KB |
testcase_13 | AC | 102 ms
15,660 KB |
testcase_14 | AC | 397 ms
20,700 KB |
testcase_15 | AC | 134 ms
13,312 KB |
testcase_16 | AC | 237 ms
15,316 KB |
testcase_17 | AC | 94 ms
15,652 KB |
testcase_18 | AC | 200 ms
13,312 KB |
testcase_19 | AC | 169 ms
18,312 KB |
ソースコード
n,m,k=map(int,input().split()) c=list(map(str,input().split())) a=[0]*(n) for i in range(n): a[i]=int(input()) op=c[0] b=[0]*m for i in range(m): b[i]=int(c[i+1]) a.sort() b.sort() from bisect import bisect_left if op=='+': cnt=n*m for i in range(n): cnt-=bisect_left(b,k-a[i]) print(cnt) else: cnt=n*m for i in range(n): cnt-=bisect_left(b,k/a[i]) print(cnt)