結果

問題 No.647 明太子
ユーザー motor_radialmotor_radial
提出日時 2019-08-17 21:56:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,763 ms / 4,500 ms
コード長 514 bytes
コンパイル時間 846 ms
コンパイル使用メモリ 11,796 KB
実行使用メモリ 11,772 KB
最終ジャッジ日時 2023-10-25 22:17:06
合計ジャッジ時間 10,134 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,008 KB
testcase_01 AC 29 ms
10,008 KB
testcase_02 AC 29 ms
10,008 KB
testcase_03 AC 29 ms
10,008 KB
testcase_04 AC 29 ms
10,008 KB
testcase_05 AC 29 ms
10,008 KB
testcase_06 AC 29 ms
10,008 KB
testcase_07 AC 29 ms
10,012 KB
testcase_08 AC 29 ms
10,016 KB
testcase_09 AC 50 ms
10,128 KB
testcase_10 AC 76 ms
10,152 KB
testcase_11 AC 40 ms
10,076 KB
testcase_12 AC 64 ms
10,156 KB
testcase_13 AC 110 ms
10,236 KB
testcase_14 AC 934 ms
11,388 KB
testcase_15 AC 154 ms
10,312 KB
testcase_16 AC 60 ms
10,132 KB
testcase_17 AC 1,143 ms
11,500 KB
testcase_18 AC 1,259 ms
11,476 KB
testcase_19 AC 379 ms
11,348 KB
testcase_20 AC 406 ms
11,104 KB
testcase_21 AC 166 ms
10,524 KB
testcase_22 AC 2,763 ms
11,772 KB
testcase_23 AC 32 ms
10,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
member=[]
for _ in range(N):
    A,B=map(int,input().split())
    member.append([A,B])
M=int(input())
kind=[]
for _ in range(M):
    X,Y=map(int,input().split())
    kind.append([X,Y])
cnt=0
M_cnt=[]
for i in range(M):
    X,Y=kind[i][0],kind[i][1]
    for k in range(N):
        if member[k][0]>=X and member[k][1]<=Y:
            cnt+=1
    M_cnt.append(cnt)
    cnt=0
max_cnt=max(M_cnt)
if max_cnt==0:
    print(0)
else:
    for i in range(M):
        if M_cnt[i]==max_cnt:
            print(i+1)
0