結果
| 問題 | No.647 明太子 |
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2026-01-17 11:55:47 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 226 ms / 4,500 ms |
| コード長 | 653 bytes |
| 記録 | |
| コンパイル時間 | 301 ms |
| コンパイル使用メモリ | 82,248 KB |
| 実行使用メモリ | 74,420 KB |
| 最終ジャッジ日時 | 2026-01-17 11:55:51 |
| 合計ジャッジ時間 | 3,806 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
a = []
for _ in range(n):
x, y = MI()
a.append([x, y])
m = I()
k = [0]*m
for j in range(m):
x, y = MI()
for i in range(n):
if x <= a[i][0] and y >= a[i][1]:
k[j] += 1
max_k = max(k)
if max_k == 0:
print(0)
else:
for j in range(m):
if k[j] == max_k:
print(j+1)
r_ishida