{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eLong long ago, there was a gunner whose name is Jack. He likes to go hunting very much. One day he go to the grove. There are n birds and n trees. The i-th bird stands on the top of the i-th tree. The trees stand in straight line from left to the right. Every tree has its height. Jack stands on the left side of the left most tree. When Jack shots a bullet in height H to the right, the nearest bird which stands in the tree with height H will falls.\u003cbr\u003e\u003cbr\u003eJack will shot many times, he wants to know which bird will fall during each shot.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are multiple test cases (about 5), every case gives n, m in the first line, n indicates there are n trees and n birds, m means Jack will shot m times. \u003cbr\u003e\u003cbr\u003eIn the second line, there are n numbers h[1],h[2],h[3],…,h[n] which describes the height of the trees.\u003cbr\u003e\u003cbr\u003eIn the third line, there are m numbers q[1],q[2],q[3],…,q[m] which describes the height of the Jack’s shots.\u003cbr\u003e\u003cbr\u003ePlease process to the end of file.\u003cbr\u003e\u003cbr\u003e[Technical Specification]\u003cbr\u003e\u003cbr\u003eAll input items are integers.\u003cbr\u003e\u003cbr\u003e1\u0026lt;\u003dn,m\u0026lt;\u003d100000(10^5)\u003cbr\u003e\u003cbr\u003e1\u0026lt;\u003dh[i],q[i]\u0026lt;\u003d1000000000(10^9)\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each q[i], output an integer in a single line indicates the id of bird Jack shots down. If Jack can’t shot any bird, just output -1.\u003cbr\u003e\u003cbr\u003eThe id starts from 1.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 5\r\n1 2 3 4 1\r\n1 3 1 4 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n3\r\n5\r\n4\r\n2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"Huge input, fast IO is recommended."}}]}