結果

問題 No.647 明太子
ユーザー takakintakakin
提出日時 2020-04-24 01:08:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 555 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 16,640 KB
最終ジャッジ日時 2024-04-22 10:22:24
合計ジャッジ時間 21,927 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 30 ms
10,624 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 30 ms
10,624 KB
testcase_04 AC 31 ms
10,624 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 AC 31 ms
10,624 KB
testcase_07 AC 33 ms
10,624 KB
testcase_08 AC 31 ms
10,624 KB
testcase_09 AC 91 ms
10,624 KB
testcase_10 AC 160 ms
10,624 KB
testcase_11 AC 58 ms
10,624 KB
testcase_12 AC 129 ms
10,752 KB
testcase_13 AC 271 ms
10,752 KB
testcase_14 AC 2,764 ms
11,264 KB
testcase_15 AC 408 ms
10,880 KB
testcase_16 AC 125 ms
10,752 KB
testcase_17 AC 3,472 ms
11,264 KB
testcase_18 AC 3,757 ms
11,264 KB
testcase_19 AC 1,241 ms
11,136 KB
testcase_20 AC 1,339 ms
11,008 KB
testcase_21 AC 493 ms
10,752 KB
testcase_22 TLE -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
AB=[]
XY=[]
append=AB.append
for _ in range(n):
  a,b=map(int,input().split())
  append(a*10**9+b)
append=XY.append
m=int(input())
for _ in range(m):
  a,b=map(int,input().split())
  append(a*10**9+b)

def f(a,b):
  if a//10**9>=b//10**9 and a%10**9<=b%10**9:
    return True
  else:
    return False
Ans=[0]*m
for i in range(n):
  for j in range(m):
    if f(AB[i],XY[j]):
      Ans[j]+=1
ma=max(Ans)
if ma!=0:
  for i in range(m):
    if Ans[i]==ma:
      print(i+1)
else:
  print(0)
0