結果

問題 No.647 明太子
ユーザー yomo3yomo3
提出日時 2020-02-18 20:29:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 603 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 13,056 KB
最終ジャッジ日時 2024-04-16 04:14:28
合計ジャッジ時間 10,006 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,624 KB
testcase_01 AC 32 ms
10,752 KB
testcase_02 AC 32 ms
10,752 KB
testcase_03 AC 31 ms
10,496 KB
testcase_04 AC 33 ms
10,624 KB
testcase_05 AC 33 ms
10,752 KB
testcase_06 AC 33 ms
10,752 KB
testcase_07 AC 32 ms
10,752 KB
testcase_08 AC 32 ms
10,624 KB
testcase_09 AC 51 ms
10,752 KB
testcase_10 AC 71 ms
11,008 KB
testcase_11 AC 43 ms
10,880 KB
testcase_12 AC 68 ms
10,752 KB
testcase_13 AC 106 ms
10,880 KB
testcase_14 AC 859 ms
12,416 KB
testcase_15 AC 149 ms
11,008 KB
testcase_16 AC 62 ms
10,624 KB
testcase_17 AC 1,059 ms
12,672 KB
testcase_18 AC 1,079 ms
12,544 KB
testcase_19 AC 67 ms
12,288 KB
testcase_20 AC 61 ms
12,160 KB
testcase_21 AC 45 ms
11,136 KB
testcase_22 TLE -
testcase_23 AC 33 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
import sys

def D(*a, **kwa):
    print(*a, file=sys.stderr, **kwa)

N = int(input())
AB = [list(map(int, input().split())) for _ in range(N)]
M = int(input())
XY = [[i] + list(map(int, input().split())) for i in range(M)]
XY.sort(key=lambda x: x[1])

c = Counter()

for i in range(N):
    a, b = AB[i]
    for xy in XY:
        if xy[1] <= a:
            if xy[2] >= b:
                c[xy[0]] += 1
        else:
            break
if len(c) == 0:
    ans = [0]
else:
    ma = max(c.values())
    ans = sorted(k+1 for k, v in c.items() if v == ma)

print(*ans, sep='\n')
0