結果
問題 | No.647 明太子 |
ユーザー | pluto77 |
提出日時 | 2018-02-19 13:57:43 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 560 bytes |
コンパイル時間 | 2,313 ms |
コンパイル使用メモリ | 76,900 KB |
実行使用メモリ | 80,912 KB |
最終ジャッジ日時 | 2023-08-27 02:22:35 |
合計ジャッジ時間 | 5,845 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
76,548 KB |
testcase_01 | AC | 71 ms
76,048 KB |
testcase_02 | WA | - |
testcase_03 | AC | 73 ms
76,068 KB |
testcase_04 | AC | 73 ms
76,356 KB |
testcase_05 | AC | 72 ms
76,352 KB |
testcase_06 | AC | 71 ms
76,240 KB |
testcase_07 | AC | 99 ms
78,836 KB |
testcase_08 | AC | 77 ms
78,552 KB |
testcase_09 | AC | 94 ms
79,348 KB |
testcase_10 | AC | 97 ms
79,448 KB |
testcase_11 | AC | 89 ms
79,156 KB |
testcase_12 | AC | 98 ms
79,508 KB |
testcase_13 | AC | 112 ms
79,768 KB |
testcase_14 | AC | 178 ms
80,472 KB |
testcase_15 | AC | 114 ms
79,852 KB |
testcase_16 | AC | 94 ms
79,068 KB |
testcase_17 | AC | 204 ms
80,824 KB |
testcase_18 | AC | 212 ms
80,832 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 300 ms
80,912 KB |
testcase_23 | WA | - |
ソースコード
#yuki647 import sys n=int(raw_input()) ab=[] for i in xrange(n): a,b=map(int,raw_input().split()) ab.append([a,b]) m=int(raw_input()) xy=[] for i in xrange(m): x,y=map(int,raw_input().split()) xy.append([x,y,0,i+1]) ab.sort() xy.sort() for i in xrange(n): for j in xrange(m): if xy[j][0]<=ab[i][0] and xy[j][1]>=ab[i][1]: xy[j][2]+=1 if xy[j][0]>ab[i][0]: break res=sorted(xy,key=lambda x:x[2], reverse=True) if res[0][3]==0: print 0 sys.exit() print res[0][3] for i in xrange(1,m): if res[i][2]==res[0][2]: print res[i][3] else: break