結果
| 問題 |
No.647 明太子
|
| コンテスト | |
| ユーザー |
tossy
|
| 提出日時 | 2018-02-09 22:53:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 216 ms / 4,500 ms |
| コード長 | 423 bytes |
| コンパイル時間 | 143 ms |
| コンパイル使用メモリ | 82,000 KB |
| 実行使用メモリ | 77,560 KB |
| 最終ジャッジ日時 | 2024-06-27 02:34:24 |
| 合計ジャッジ時間 | 2,931 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
m = int(input())
cand = []
cbest = 0
for i in range(m):
p,q = map(int, input().split())
cur = 0
for a,b in ab:
if p <= a and q >= b : cur += 1
if cbest == cur :
cand.append(i+1)
elif cbest < cur :
cbest = cur
cand = [i+1]
if cbest == 0 :
print(0)
else :
for i in cand :
print(i)
tossy