結果

問題 No.647 明太子
ユーザー pete1288998pete1288998
提出日時 2020-06-27 19:06:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 336 ms / 4,500 ms
コード長 475 bytes
コンパイル時間 709 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 78,664 KB
最終ジャッジ日時 2023-09-19 07:33:39
合計ジャッジ時間 7,394 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
71,328 KB
testcase_01 AC 155 ms
71,160 KB
testcase_02 AC 153 ms
71,276 KB
testcase_03 AC 158 ms
71,220 KB
testcase_04 AC 164 ms
71,332 KB
testcase_05 AC 119 ms
71,032 KB
testcase_06 AC 163 ms
71,328 KB
testcase_07 AC 183 ms
75,944 KB
testcase_08 AC 178 ms
75,680 KB
testcase_09 AC 214 ms
76,036 KB
testcase_10 AC 226 ms
76,580 KB
testcase_11 AC 206 ms
76,524 KB
testcase_12 AC 220 ms
76,612 KB
testcase_13 AC 290 ms
77,796 KB
testcase_14 AC 336 ms
78,280 KB
testcase_15 AC 131 ms
77,624 KB
testcase_16 AC 101 ms
76,392 KB
testcase_17 AC 256 ms
78,352 KB
testcase_18 AC 276 ms
78,664 KB
testcase_19 AC 128 ms
78,228 KB
testcase_20 AC 129 ms
77,832 KB
testcase_21 AC 114 ms
77,012 KB
testcase_22 AC 242 ms
78,348 KB
testcase_23 AC 89 ms
76,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

mb = []
for i in range(n):
    a,b = map(int,input().split())
    mb.append([a,b])
    
m = int(input())

c = []
for i in range(m):
    x,y = map(int,input().split())
    c.append([x,y])

l = []
for i in range(m):
    cnt = 0
    for j in range(n):
        if c[i][0] <= mb[j][0] and c[i][1] >= mb[j][1]:
            cnt += 1
    l.append(cnt)

if max(l) == 0:
    print(0)
else:
    for i in range(len(l)):
        if l[i] == max(l):
            print(i+1)
0