結果
| 問題 | No.647 明太子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-20 01:21:19 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 429 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 82,448 KB |
| 実行使用メモリ | 77,888 KB |
| 最終ジャッジ日時 | 2024-10-12 12:30:13 |
| 合計ジャッジ時間 | 3,243 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 17 WA * 3 |
ソースコード
n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ans = []
max_cnt = -1
m = int(input())
for i in range(m):
cnt = 0
x, y = map(int, input().split())
for a, b in ab:
if x <= a and y >= b:
cnt += 1
if cnt > max_cnt:
ans = [i + 1]
max_cnt = cnt
elif cnt == max_cnt:
ans.append(i + 1)
if ans == []:
print(0)
else:
print(*ans, sep = "\n")