結果

問題 No.647 明太子
ユーザー wajima_wataruwajima_wataru
提出日時 2018-03-03 19:33:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 236 ms / 4,500 ms
コード長 473 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 86,740 KB
実行使用メモリ 77,688 KB
最終ジャッジ日時 2023-09-09 09:39:26
合計ジャッジ時間 3,946 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,464 KB
testcase_01 AC 70 ms
71,092 KB
testcase_02 AC 69 ms
71,364 KB
testcase_03 AC 70 ms
71,096 KB
testcase_04 AC 72 ms
71,464 KB
testcase_05 AC 73 ms
71,404 KB
testcase_06 AC 71 ms
71,368 KB
testcase_07 AC 78 ms
76,024 KB
testcase_08 AC 77 ms
75,944 KB
testcase_09 AC 90 ms
76,072 KB
testcase_10 AC 94 ms
76,180 KB
testcase_11 AC 86 ms
75,940 KB
testcase_12 AC 93 ms
76,296 KB
testcase_13 AC 113 ms
77,528 KB
testcase_14 AC 185 ms
77,504 KB
testcase_15 AC 120 ms
77,416 KB
testcase_16 AC 94 ms
76,184 KB
testcase_17 AC 223 ms
77,688 KB
testcase_18 AC 236 ms
77,504 KB
testcase_19 AC 114 ms
77,352 KB
testcase_20 AC 115 ms
77,360 KB
testcase_21 AC 105 ms
76,896 KB
testcase_22 AC 175 ms
77,540 KB
testcase_23 AC 81 ms
75,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = []
B = []
for _ in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

M = int(input())
X = []
Y = []
for _ in range(M):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y)

ans = [0] * M
for i in range(N):
    for j in range(M):
        if A[i] >= X[j] and B[i] <= Y[j]:
            ans[j] += 1

max_n = max(ans)
if max_n > 0:
    [print(i + 1) for i, n in enumerate(ans) if n == max_n]
else:
    print(0)
0