結果

問題 No.647 明太子
ユーザー liny_tailliny_tail
提出日時 2020-09-18 12:57:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,346 ms / 4,500 ms
コード長 528 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 11,000 KB
実行使用メモリ 9,344 KB
最終ジャッジ日時 2023-09-04 08:47:57
合計ジャッジ時間 7,776 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,788 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 AC 16 ms
7,792 KB
testcase_03 AC 16 ms
7,944 KB
testcase_04 AC 16 ms
7,784 KB
testcase_05 AC 16 ms
7,868 KB
testcase_06 AC 17 ms
7,912 KB
testcase_07 AC 17 ms
7,784 KB
testcase_08 AC 17 ms
7,836 KB
testcase_09 AC 35 ms
8,248 KB
testcase_10 AC 55 ms
8,384 KB
testcase_11 AC 25 ms
7,784 KB
testcase_12 AC 48 ms
8,252 KB
testcase_13 AC 87 ms
8,264 KB
testcase_14 AC 781 ms
8,996 KB
testcase_15 AC 122 ms
8,392 KB
testcase_16 AC 44 ms
8,268 KB
testcase_17 AC 968 ms
9,100 KB
testcase_18 AC 1,063 ms
9,036 KB
testcase_19 AC 335 ms
8,928 KB
testcase_20 AC 354 ms
8,800 KB
testcase_21 AC 142 ms
8,480 KB
testcase_22 AC 2,346 ms
9,344 KB
testcase_23 AC 18 ms
7,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input().strip())
A, B = [], []
for i in range(N):
  tmp = list(map(int, input().split()))
  A.append(tmp[0])
  B.append(tmp[1])

M = int(input().strip())
X, Y = [], []
for i in range(M):
  tmp = list(map(int, input().split()))
  X.append(tmp[0])
  Y.append(tmp[1])

lst = [0] * M

for n in range(len(X)):
  x, y = X[n], Y[n]
  for a, b in zip(A, B):
    if x <= a and y >= b:
      lst[n] += 1

m = max(lst)
cnt = 0
for n, i in enumerate(lst):
  if i == m and m > 0:
    print(n+1)
    cnt += 1

if cnt == 0:
  print(0)
0