結果

問題 No.647 明太子
ユーザー trineutrontrineutron
提出日時 2020-12-17 21:59:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 239 ms / 4,500 ms
コード長 478 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,788 KB
実行使用メモリ 76,624 KB
最終ジャッジ日時 2023-10-21 07:10:54
合計ジャッジ時間 4,655 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,520 KB
testcase_01 AC 39 ms
53,520 KB
testcase_02 AC 38 ms
53,520 KB
testcase_03 AC 38 ms
53,520 KB
testcase_04 AC 38 ms
53,520 KB
testcase_05 AC 39 ms
53,520 KB
testcase_06 AC 39 ms
53,520 KB
testcase_07 AC 47 ms
61,692 KB
testcase_08 AC 45 ms
59,564 KB
testcase_09 AC 60 ms
64,152 KB
testcase_10 AC 65 ms
66,340 KB
testcase_11 AC 53 ms
61,688 KB
testcase_12 AC 64 ms
66,340 KB
testcase_13 AC 84 ms
72,988 KB
testcase_14 AC 177 ms
76,528 KB
testcase_15 AC 93 ms
72,992 KB
testcase_16 AC 62 ms
66,340 KB
testcase_17 AC 227 ms
76,600 KB
testcase_18 AC 239 ms
76,596 KB
testcase_19 AC 90 ms
76,336 KB
testcase_20 AC 86 ms
74,304 KB
testcase_21 AC 76 ms
72,932 KB
testcase_22 AC 162 ms
76,624 KB
testcase_23 AC 51 ms
61,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [None] * n
b = [None] * n
for i in range(n):
    a[i], b[i] = map(int, input().split())
m = int(input())
x = [None] * m
y = [None] * m
for i in range(m):
    x[i], y[i] = map(int, input().split())
bought = [0] * m
for i in range(n):
    for j in range(m):
        if x[j] <= a[i] and y[j] >= b[i]:
            bought[j] += 1
miracle = max(bought)
if miracle == 0:
    print(0)
    exit()
for i in range(m):
    if bought[i] == miracle:
        print(i + 1)
0