結果

問題 No.647 明太子
ユーザー caleicalei
提出日時 2020-01-25 19:26:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 242 ms / 4,500 ms
コード長 424 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 87,312 KB
実行使用メモリ 78,232 KB
最終ジャッジ日時 2023-10-12 04:42:06
合計ジャッジ時間 3,974 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,376 KB
testcase_01 AC 68 ms
71,156 KB
testcase_02 AC 68 ms
71,344 KB
testcase_03 AC 68 ms
71,372 KB
testcase_04 AC 73 ms
71,432 KB
testcase_05 AC 68 ms
71,504 KB
testcase_06 AC 68 ms
71,340 KB
testcase_07 AC 74 ms
76,176 KB
testcase_08 AC 74 ms
76,260 KB
testcase_09 AC 90 ms
76,592 KB
testcase_10 AC 97 ms
76,904 KB
testcase_11 AC 85 ms
76,200 KB
testcase_12 AC 95 ms
76,576 KB
testcase_13 AC 112 ms
77,752 KB
testcase_14 AC 216 ms
78,192 KB
testcase_15 AC 120 ms
77,752 KB
testcase_16 AC 90 ms
76,472 KB
testcase_17 AC 242 ms
78,176 KB
testcase_18 AC 232 ms
77,976 KB
testcase_19 AC 122 ms
78,056 KB
testcase_20 AC 118 ms
77,876 KB
testcase_21 AC 107 ms
77,932 KB
testcase_22 AC 192 ms
78,232 KB
testcase_23 AC 80 ms
76,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# yukicoder No.647 明太子 2020/01/25

n=int(input())
ab=[tuple(map(int,input().split())) for _ in range(n)]
m=int(input())
xy=[tuple(map(int,input().split())) for _ in range(m)]

ans=[0]*m
MAX=0
for i in range(m):
    x,y=xy[i]
    for a,b in ab:
        if x<=a and b<=y:
            ans[i]+=1
            MAX=max(MAX,ans[i])
if MAX==0:
    print(0)
    exit()

for i in range(m):
    if ans[i]==MAX:
        print(i+1) 
0