結果

問題 No.647 明太子
ユーザー 👑 H20H20
提出日時 2021-01-19 10:55:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 204 ms / 4,500 ms
コード長 464 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 82,240 KB
実行使用メモリ 77,132 KB
最終ジャッジ日時 2024-05-09 13:45:48
合計ジャッジ時間 3,198 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,712 KB
testcase_01 AC 37 ms
51,840 KB
testcase_02 AC 37 ms
51,840 KB
testcase_03 AC 37 ms
51,840 KB
testcase_04 AC 38 ms
52,224 KB
testcase_05 AC 37 ms
51,840 KB
testcase_06 AC 37 ms
52,096 KB
testcase_07 AC 45 ms
59,776 KB
testcase_08 AC 47 ms
58,880 KB
testcase_09 AC 56 ms
64,000 KB
testcase_10 AC 62 ms
65,920 KB
testcase_11 AC 50 ms
61,952 KB
testcase_12 AC 59 ms
65,536 KB
testcase_13 AC 78 ms
72,832 KB
testcase_14 AC 157 ms
76,672 KB
testcase_15 AC 83 ms
73,088 KB
testcase_16 AC 58 ms
65,024 KB
testcase_17 AC 192 ms
76,800 KB
testcase_18 AC 204 ms
76,672 KB
testcase_19 AC 80 ms
76,288 KB
testcase_20 AC 79 ms
74,828 KB
testcase_21 AC 70 ms
71,680 KB
testcase_22 AC 140 ms
77,132 KB
testcase_23 AC 47 ms
61,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [0]*N
B = [0]*N
for i in range(N):
    a,b = map(int,input().split())
    A[i]=a
    B[i]=b
M = int(input())
X = [0]*M
Y = [0]*M
BUY = [0]*M
for i in range(M):
    x,y = map(int,input().split())
    X[i]=x
    Y[i]=y
for n in range(N):
    for m in range(M):
        if A[n]>=X[m] and B[n]<=Y[m]:
            BUY[m]+=1
maxbuy = max(BUY)
if maxbuy==0:
    print(0)
else:
    for i in range(M):
        if maxbuy==BUY[i]:
            print(i+1)
0