結果
問題 |
No.647 明太子
|
ユーザー |
![]() |
提出日時 | 2019-11-27 19:56:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 3,057 ms / 4,500 ms |
コード長 | 659 bytes |
コンパイル時間 | 125 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-11-14 06:46:24 |
合計ジャッジ時間 | 9,423 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
# coding: utf-8 # Your code here! n = int(input()) a = [] b = [] for i in range(n): ai,bi=[int(i) for i in input().split()] a.append(ai) b.append(bi) m = int(input()) x = [] y = [] for i in range(m): xi,yi=[int(i) for i in input().split()] x.append(xi) y.append(yi) count = [0] * m for i in range(n): price = a[i] hot = b[i] for j in range(m): if x[j] <= price and y[j] >= hot: count[j] += 1 max_tarako = max(count) if max_tarako != 0: max_index = [i for i, x in enumerate(count) if x == max_tarako] for i in range(len(max_index)): print(max_index[i]+1) else: print(0)