結果

問題 No.647 明太子
ユーザー gorugo30gorugo30
提出日時 2021-02-24 11:31:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 235 ms / 4,500 ms
コード長 418 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 81,668 KB
実行使用メモリ 76,740 KB
最終ジャッジ日時 2023-10-24 18:41:51
合計ジャッジ時間 3,319 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,368 KB
testcase_01 AC 34 ms
53,372 KB
testcase_02 AC 34 ms
53,376 KB
testcase_03 AC 33 ms
53,372 KB
testcase_04 AC 33 ms
53,372 KB
testcase_05 AC 33 ms
53,372 KB
testcase_06 AC 33 ms
53,372 KB
testcase_07 AC 40 ms
59,476 KB
testcase_08 AC 39 ms
59,404 KB
testcase_09 AC 56 ms
66,288 KB
testcase_10 AC 68 ms
66,352 KB
testcase_11 AC 48 ms
61,524 KB
testcase_12 AC 60 ms
66,352 KB
testcase_13 AC 73 ms
70,456 KB
testcase_14 AC 183 ms
76,556 KB
testcase_15 AC 89 ms
74,032 KB
testcase_16 AC 58 ms
66,300 KB
testcase_17 AC 210 ms
76,560 KB
testcase_18 AC 235 ms
76,740 KB
testcase_19 AC 96 ms
76,544 KB
testcase_20 AC 97 ms
76,524 KB
testcase_21 AC 77 ms
73,656 KB
testcase_22 AC 146 ms
76,736 KB
testcase_23 AC 46 ms
61,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
AB = [list(map(int, input().split())) for i in range(N)]
M = int(input())
XY = [list(map(int, input().split())) for i in range(M)]
cnt = [0] * M
for i in range(N):
    A, B = AB[i]
    for j in range(M):
        X, Y = XY[j]
        if X <= A and B <= Y:
            cnt[j] += 1
maxcnt = max(cnt)
if maxcnt == 0:
    print(0)
    exit()
for i in range(M):
    if cnt[i] == maxcnt:
        print(i + 1)
0