結果

問題 No.647 明太子
ユーザー tossytossy
提出日時 2018-02-09 22:53:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 274 ms / 4,500 ms
コード長 423 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 78,132 KB
最終ジャッジ日時 2023-09-09 09:25:56
合計ジャッジ時間 4,211 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,348 KB
testcase_01 AC 66 ms
71,368 KB
testcase_02 AC 67 ms
71,128 KB
testcase_03 AC 66 ms
71,064 KB
testcase_04 AC 66 ms
71,196 KB
testcase_05 AC 67 ms
71,480 KB
testcase_06 AC 66 ms
71,156 KB
testcase_07 AC 72 ms
75,576 KB
testcase_08 AC 73 ms
76,056 KB
testcase_09 AC 85 ms
75,912 KB
testcase_10 AC 92 ms
76,952 KB
testcase_11 AC 83 ms
76,688 KB
testcase_12 AC 95 ms
76,608 KB
testcase_13 AC 105 ms
76,916 KB
testcase_14 AC 215 ms
78,108 KB
testcase_15 AC 119 ms
77,668 KB
testcase_16 AC 89 ms
76,668 KB
testcase_17 AC 274 ms
77,892 KB
testcase_18 AC 256 ms
77,948 KB
testcase_19 AC 140 ms
78,048 KB
testcase_20 AC 132 ms
78,132 KB
testcase_21 AC 111 ms
77,816 KB
testcase_22 AC 235 ms
78,100 KB
testcase_23 AC 83 ms
76,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

m = int(input())
cand = []
cbest = 0
for i in range(m):
    p,q = map(int, input().split())
    cur = 0
    for a,b in ab:
        if p <= a and q >= b : cur += 1
    if cbest == cur :
        cand.append(i+1)
    elif cbest < cur :
        cbest = cur
        cand = [i+1]

if cbest == 0 :
    print(0)
else :
    for i in cand :
        print(i)
0