結果

問題 No.647 明太子
ユーザー akitsugu777akitsugu777
提出日時 2018-10-25 15:28:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 503 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 91,136 KB
最終ジャッジ日時 2024-04-29 21:37:21
合計ジャッジ時間 11,874 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 29 ms
10,624 KB
testcase_06 AC 31 ms
10,624 KB
testcase_07 AC 31 ms
10,624 KB
testcase_08 AC 30 ms
10,752 KB
testcase_09 AC 56 ms
11,136 KB
testcase_10 AC 84 ms
11,520 KB
testcase_11 AC 43 ms
10,752 KB
testcase_12 AC 75 ms
11,392 KB
testcase_13 AC 127 ms
11,904 KB
testcase_14 AC 1,144 ms
22,400 KB
testcase_15 AC 185 ms
12,416 KB
testcase_16 AC 70 ms
11,264 KB
testcase_17 AC 1,440 ms
24,448 KB
testcase_18 AC 1,529 ms
25,088 KB
testcase_19 AC 387 ms
12,288 KB
testcase_20 AC 412 ms
12,032 KB
testcase_21 AC 161 ms
11,264 KB
testcase_22 TLE -
testcase_23 AC 33 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
nl = [list(map(int, input().split())) for _ in range(n)]

m = int(input())
ml = [list(map(int, input().split())) for _ in range(m)]

l = []
for i, (x, y) in enumerate(ml, 1):
    for a, b in nl:
        if x <= a and y >= b:
            l.append(i)

if len(l) == 0:
    print(0)
else:
    c = {}
    for i in l:
        if not i in c:
            c[i] = 1
        else:
            c[i] += 1
    x = max(c.values())

    l = []
    for i in c:
        if c[i] == x:
            print(i)
0