結果

問題 No.647 明太子
ユーザー dangodango
提出日時 2023-06-06 20:58:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 293 ms / 4,500 ms
コード長 376 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 78,440 KB
最終ジャッジ日時 2023-08-28 10:49:45
合計ジャッジ時間 5,139 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,188 KB
testcase_01 AC 71 ms
70,996 KB
testcase_02 AC 71 ms
71,040 KB
testcase_03 AC 71 ms
71,284 KB
testcase_04 AC 71 ms
71,188 KB
testcase_05 AC 72 ms
71,096 KB
testcase_06 AC 70 ms
71,168 KB
testcase_07 AC 83 ms
75,832 KB
testcase_08 AC 78 ms
75,580 KB
testcase_09 AC 92 ms
76,116 KB
testcase_10 AC 99 ms
76,844 KB
testcase_11 AC 90 ms
76,876 KB
testcase_12 AC 104 ms
76,780 KB
testcase_13 AC 114 ms
76,932 KB
testcase_14 AC 247 ms
77,928 KB
testcase_15 AC 131 ms
77,600 KB
testcase_16 AC 97 ms
76,764 KB
testcase_17 AC 289 ms
78,440 KB
testcase_18 AC 293 ms
77,972 KB
testcase_19 AC 148 ms
78,012 KB
testcase_20 AC 136 ms
78,336 KB
testcase_21 AC 118 ms
77,752 KB
testcase_22 AC 282 ms
78,432 KB
testcase_23 AC 88 ms
77,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = [list(map(int,input().split())) for _ in range(N)]
M = int(input())
C = [0] * M
for i in range(M):
    P, S = map(int, input().split())
    T = 0
    for j in range(N):
        if P <= L[j][0] and S >= L[j][1]:
            T += 1
    C[i] = T
if sum(C) == 0:
    print(0)
else: 
    for i in range(M):
        if C[i] == max(C): 
            print(i + 1)
0