結果
| 問題 |
No.647 明太子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-04 15:55:54 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 370 ms / 4,500 ms |
| コード長 | 495 bytes |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 76,800 KB |
| 実行使用メモリ | 79,744 KB |
| 最終ジャッジ日時 | 2024-06-28 01:06:41 |
| 合計ジャッジ時間 | 4,455 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#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]