結果
問題 | No.647 明太子 |
ユーザー |
|
提出日時 | 2020-04-12 04:02:18 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,045 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 82,856 KB |
実行使用メモリ | 90,412 KB |
最終ジャッジ日時 | 2024-09-21 18:12:17 |
合計ジャッジ時間 | 5,190 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 20 |
ソースコード
import sys, refrom collections import deque, defaultdict, Counterfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radiansfrom itertools import accumulate, permutations, combinations, productfrom operator import itemgetter, mul, addfrom copy import deepcopyfrom string import ascii_lowercase, ascii_uppercase, digitsfrom bisect import bisect, bisect_leftfrom fractions import gcdfrom heapq import heappush, heappopfrom functools import reducedef input(): return sys.stdin.readline().strip()def INT(): return int(input())def MAP(): return map(int, input().split())def LIST(): return list(map(int, input().split()))def ZIP(n): return zip(*(MAP() for _ in range(n)))sys.setrecursionlimit(10 ** 9)INF = float('inf')mod = 10 ** 9 + 7N = INT()AB = [LIST() for _ in range(N)]M = INT()XY = [LIST() for _ in range(M)]cnt = [0]*Mfor A, B in AB:for i, (X, Y) in enumerate(XY):if X <= A and Y >= B:cnt[i] += 1if not any(cnt):print(0)else:ma = max(cnt)for i in range(M):if cnt[i] == ma:print(i+1)