結果

問題 No.647 明太子
ユーザー trineutrontrineutron
提出日時 2020-12-17 22:00:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,168 ms / 4,500 ms
コード長 478 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 11,900 KB
実行使用メモリ 10,988 KB
最終ジャッジ日時 2023-10-21 07:11:44
合計ジャッジ時間 10,163 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,108 KB
testcase_01 AC 31 ms
10,108 KB
testcase_02 AC 31 ms
10,108 KB
testcase_03 AC 30 ms
10,108 KB
testcase_04 AC 30 ms
10,108 KB
testcase_05 AC 30 ms
10,108 KB
testcase_06 AC 30 ms
10,108 KB
testcase_07 AC 31 ms
10,108 KB
testcase_08 AC 32 ms
10,112 KB
testcase_09 AC 55 ms
10,172 KB
testcase_10 AC 85 ms
10,180 KB
testcase_11 AC 41 ms
10,140 KB
testcase_12 AC 69 ms
10,184 KB
testcase_13 AC 125 ms
10,232 KB
testcase_14 AC 1,129 ms
10,764 KB
testcase_15 AC 173 ms
10,268 KB
testcase_16 AC 68 ms
10,172 KB
testcase_17 AC 1,330 ms
10,844 KB
testcase_18 AC 1,443 ms
10,900 KB
testcase_19 AC 412 ms
10,724 KB
testcase_20 AC 429 ms
10,652 KB
testcase_21 AC 176 ms
10,372 KB
testcase_22 AC 3,168 ms
10,988 KB
testcase_23 AC 33 ms
10,136 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