結果

問題 No.647 明太子
ユーザー pluto77pluto77
提出日時 2018-05-04 15:55:54
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 269 ms / 4,500 ms
コード長 495 bytes
コンパイル時間 1,768 ms
コンパイル使用メモリ 77,420 KB
実行使用メモリ 81,132 KB
最終ジャッジ日時 2023-09-10 09:38:08
合計ジャッジ時間 4,227 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,400 KB
testcase_01 AC 74 ms
76,232 KB
testcase_02 AC 73 ms
76,076 KB
testcase_03 AC 73 ms
76,396 KB
testcase_04 AC 75 ms
76,408 KB
testcase_05 AC 74 ms
76,652 KB
testcase_06 AC 75 ms
76,432 KB
testcase_07 AC 86 ms
78,632 KB
testcase_08 AC 85 ms
79,236 KB
testcase_09 AC 98 ms
79,364 KB
testcase_10 AC 104 ms
79,424 KB
testcase_11 AC 94 ms
79,208 KB
testcase_12 AC 101 ms
79,428 KB
testcase_13 AC 119 ms
79,800 KB
testcase_14 AC 220 ms
80,836 KB
testcase_15 AC 125 ms
79,928 KB
testcase_16 AC 99 ms
79,348 KB
testcase_17 AC 264 ms
80,716 KB
testcase_18 AC 269 ms
81,132 KB
testcase_19 AC 157 ms
79,672 KB
testcase_20 AC 163 ms
79,720 KB
testcase_21 AC 112 ms
79,684 KB
testcase_22 AC 239 ms
81,040 KB
testcase_23 AC 89 ms
79,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki647
import sys

n=int(raw_input())
ab=[map(int,raw_input().split()) for i in xrange(n)]
m=int(raw_input())
xy=[map(int,raw_input().split()) for i in xrange(m)]
cnt=[0 for i in xrange(m)]
for i in xrange(m):
 for j in xrange(n):
  if xy[i][0]<=ab[j][0] and xy[i][1]>=ab[j][1]:
   cnt[i]+=1
if len(cnt)<2 and cnt[0]==0:
 print 0
 sys.exit()
res=[]
for i in xrange(m):
 if max(cnt)==0:
  print 0
  sys.exit()
 elif cnt[i]==max(cnt):
  res.append(i+1)
for i in xrange(len(res)):
 print res[i]
 
0