結果
問題 |
No.647 明太子
|
ユーザー |
|
提出日時 | 2018-02-09 22:35:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 560 bytes |
コンパイル時間 | 135 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-12-26 07:42:22 |
合計ジャッジ時間 | 11,571 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 TLE * 1 |
ソースコード
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)