結果
| 問題 |
No.647 明太子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-01 16:54:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 3,190 ms / 4,500 ms |
| コード長 | 718 bytes |
| コンパイル時間 | 284 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 12,672 KB |
| 最終ジャッジ日時 | 2024-09-19 16:49:56 |
| 合計ジャッジ時間 | 10,913 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
N = int(input())
ABs = [[int(j) for j in input().split()] for i in range(N)]
M = int(input())
XYs = [[int(j) for j in input().split()] for i in range(M)]
def be_wanted(A, B, X, Y):
if X <= A and B <= Y:
return True
else:
return False
def argmax_s(X):
tmp = -99999
for i, x in enumerate(X):
if tmp < x:
tmp = x
res = [i]
elif tmp == x:
res.append(i)
return res
point = [0 for i in range(M)]
for i, xy in enumerate(XYs):
for ab in ABs:
if be_wanted(ab[0], ab[1], xy[0], xy[1]):
point[i] += 1
if sum(point) == 0:
print(0)
else:
for i in (argmax_s(point)):
print(i+1)