結果
問題 |
No.647 明太子
|
ユーザー |
|
提出日時 | 2018-02-09 22:37:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 555 bytes |
コンパイル時間 | 279 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-26 07:47:32 |
合計ジャッジ時間 | 2,115 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 20 |
ソースコード
from collections import defaultdict N = int(input()) rec = [] for i in range(N): a, b = map(int, input().split()) rec.append(a, b) M = int(input()) max_ = 0 dic = defaultdict(int) tmp = [] for i in range(M): x, y = map(int, input().split()) for s in rec: if s[0] >= x and s[1] <= y: dic[i] += 1 if dic[i] == max_: tmp.append(i) if dic[i] > max_: max_ = dic[i] tmp = [i] if len(tmp) == 0: print(0) else: for i in tmp: print(i + 1)