結果
| 問題 | No.647 明太子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-09 22:35:46 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 3,399 ms / 4,500 ms |
| コード長 | 560 bytes |
| 記録 | |
| コンパイル時間 | 701 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 16,220 KB |
| 最終ジャッジ日時 | 2026-06-01 04:46:04 |
| 合計ジャッジ時間 | 13,625 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
from collections import defaultdict
N = int(input())
rec = []
for i in range(N):
a, b = map(int, input().split())
rec.append((i, 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[1] >= x and s[2] <= 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)