結果

問題 No.647 明太子
ユーザー ikdikd
提出日時 2018-02-10 00:26:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 494 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 9,156 KB
最終ジャッジ日時 2023-08-27 02:19:52
合計ジャッジ時間 3,901 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 13 ms
7,780 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 120 ms
8,908 KB
testcase_20 AC 130 ms
8,668 KB
testcase_21 AC 57 ms
8,408 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
  n=int(input())
  a, b=[0]*n, [0]*n
  for i in range(n):
    ai, bi=map(int, input().split())
    a[i], b[i]=ai, bi
  m=int(input())
  x, y=[0]*m, [0]*m
  for i in range(m):
    xi, yi=map(int, input().split())
    x[i], y[i]=xi, yi

  c=[0]*m
  for i in range(n):
    for j in range(m):
      if x[j]<=a[i] and y[j]>=b[i]:
        c[j]+=1

  mx=max(c)
  if mx==0:
    print(0)
  else:
    for i in range(m):
      if c[i]==mx:
        print(i)

if __name__ == '__main__':
  main()
0