結果

問題 No.647 明太子
ユーザー tossytossy
提出日時 2018-02-09 22:53:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,167 ms / 4,500 ms
コード長 423 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 10,244 KB
最終ジャッジ日時 2023-09-09 09:25:52
合計ジャッジ時間 7,736 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,908 KB
testcase_01 AC 16 ms
7,756 KB
testcase_02 AC 15 ms
7,760 KB
testcase_03 AC 15 ms
7,936 KB
testcase_04 AC 15 ms
7,804 KB
testcase_05 AC 15 ms
7,796 KB
testcase_06 AC 15 ms
7,848 KB
testcase_07 AC 16 ms
7,928 KB
testcase_08 AC 16 ms
7,808 KB
testcase_09 AC 33 ms
8,288 KB
testcase_10 AC 53 ms
7,832 KB
testcase_11 AC 24 ms
7,824 KB
testcase_12 AC 46 ms
8,236 KB
testcase_13 AC 85 ms
8,192 KB
testcase_14 AC 752 ms
9,748 KB
testcase_15 AC 121 ms
8,244 KB
testcase_16 AC 42 ms
7,796 KB
testcase_17 AC 963 ms
10,036 KB
testcase_18 AC 1,011 ms
9,940 KB
testcase_19 AC 333 ms
9,776 KB
testcase_20 AC 355 ms
9,440 KB
testcase_21 AC 144 ms
8,588 KB
testcase_22 AC 2,167 ms
10,244 KB
testcase_23 AC 17 ms
7,908 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