結果

問題 No.647 明太子
ユーザー 👑 rin204rin204
提出日時 2020-08-20 01:21:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 219 ms / 4,500 ms
コード長 428 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 77,440 KB
最終ジャッジ日時 2024-04-20 16:42:14
合計ジャッジ時間 3,080 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,840 KB
testcase_01 AC 38 ms
51,840 KB
testcase_02 AC 38 ms
51,840 KB
testcase_03 AC 40 ms
52,352 KB
testcase_04 AC 38 ms
51,840 KB
testcase_05 AC 39 ms
52,224 KB
testcase_06 AC 37 ms
51,968 KB
testcase_07 AC 46 ms
59,264 KB
testcase_08 AC 45 ms
59,264 KB
testcase_09 AC 63 ms
63,232 KB
testcase_10 AC 69 ms
67,200 KB
testcase_11 AC 57 ms
64,640 KB
testcase_12 AC 70 ms
68,224 KB
testcase_13 AC 83 ms
70,656 KB
testcase_14 AC 194 ms
77,184 KB
testcase_15 AC 100 ms
76,800 KB
testcase_16 AC 63 ms
65,792 KB
testcase_17 AC 219 ms
77,312 KB
testcase_18 AC 211 ms
77,184 KB
testcase_19 AC 111 ms
77,056 KB
testcase_20 AC 102 ms
77,440 KB
testcase_21 AC 94 ms
77,184 KB
testcase_22 AC 177 ms
77,056 KB
testcase_23 AC 56 ms
63,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ans = []
max_cnt = 1
m = int(input())
for i in range(m):
    cnt = 0
    x, y = map(int, input().split())
    for a, b in ab:
        if x <= a and y >= b:
            cnt += 1
    if cnt > max_cnt:
        ans = [i + 1]
        max_cnt = cnt
    elif cnt == max_cnt:
        ans.append(i + 1)
if ans == []:
    print(0)
else:
    print(*ans, sep = "\n")
0