結果

問題 No.647 明太子
ユーザー kohei2019kohei2019
提出日時 2022-03-01 00:28:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 255 ms / 4,500 ms
コード長 417 bytes
コンパイル時間 1,838 ms
コンパイル使用メモリ 86,920 KB
実行使用メモリ 78,128 KB
最終ジャッジ日時 2023-09-21 09:22:39
合計ジャッジ時間 5,623 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,068 KB
testcase_01 AC 75 ms
71,200 KB
testcase_02 AC 74 ms
71,356 KB
testcase_03 AC 73 ms
71,196 KB
testcase_04 AC 73 ms
71,000 KB
testcase_05 AC 75 ms
71,412 KB
testcase_06 AC 75 ms
71,048 KB
testcase_07 AC 83 ms
75,764 KB
testcase_08 AC 78 ms
75,652 KB
testcase_09 AC 95 ms
76,472 KB
testcase_10 AC 100 ms
76,516 KB
testcase_11 AC 89 ms
76,084 KB
testcase_12 AC 100 ms
76,608 KB
testcase_13 AC 118 ms
77,768 KB
testcase_14 AC 205 ms
77,796 KB
testcase_15 AC 124 ms
77,608 KB
testcase_16 AC 96 ms
76,432 KB
testcase_17 AC 242 ms
78,088 KB
testcase_18 AC 255 ms
78,012 KB
testcase_19 AC 127 ms
77,592 KB
testcase_20 AC 129 ms
77,832 KB
testcase_21 AC 112 ms
77,568 KB
testcase_22 AC 180 ms
78,128 KB
testcase_23 AC 87 ms
76,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
lsAB = [tuple(map(int,input().split())) for i in range(N)]
M = int(input())
lsXY = [tuple(map(int,input().split())) for i in range(M)]
cnt = [0]*(M)
for i in range(N):
    a,b = lsAB[i]
    for j in range(M):
        x,y = lsXY[j]
        if x <= a and y >= b:
            cnt[j] += 1
maxj = max(cnt)
if maxj == 0:
    print(0)
    exit()

for i in range(M):
    if cnt[i] == maxj:
        print(i+1)
0