{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n div.illustration {\n float: right;\n padding-left: 20px;\n }\n div.illustration .illustration {\n width: 100%;\n border-radius: 4px;\n }\n pre {\n display: block;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\n\u003cdiv style\u003d\"width:40.00%\" class\u003d\"illustration\"\u003e\n \u003cimg src\u003d\"https://cdn.shopify.com/s/files/1/2114/3697/files/tall-bamboo-forest_480x480.jpg?v\u003d1660315768\" \n alt\u003d\"/problems/plantingtrees/file/statement/en/img-0001.JPG\" \n class\u003d\"illustration\"\n height\u003d\"250\"\n width\u003d\"400\"\n align\u003d\"Right\"\u003e\n\u003c/div\u003e\n\n \u003cp\u003eAfter earning CSE degree Priom \u0026 Sharif has recently started a business of bamboos. For growing bamboos they bought \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e bamboo tree seedlings, \n that they want to plant in the framing yard. \n It takes 1 day for them to plant a\n seedling, and for each tree they know exactly\n in how many days after planting it grows to full maturity. \n As an impatient person \u0026 also for show off purposes Sharif\n would also like to throw a party for his friends, who\n wants to buy bamboos from them, but in order to impress them \n Priom would like to organize the party only\n after all the trees have grown to full maturity. More precisely, \n the party can be organized at earliest on the \n next day after the last tree has grown up.\u003c/p\u003e\n\n \u003cp\u003eHelp Priom \u0026 Sharif to find out when is the earliest day when the party\n can take place. They can choose the order of planting the trees seedling\n as they likes, so they want to plant the trees in such a way that\n the party will be as soon as possible.\u003c/p\u003e\n\n \u003ch2\u003eInput\u003c/h2\u003e\n\n \u003cp\u003eThe input consists of two lines. The first line contains a\n single integer \u003cspan class\u003d\"tex2jax_process\"\u003e$N$\u003c/span\u003e\n (\u003cspan class\u003d\"tex2jax_process\"\u003e$1\\leq N \\leq 100\\, 000$\u003c/span\u003e)\n denoting the number of seedlings. Then a line with \u003cspan class\u003d\"tex2jax_process\"\u003e$N$\u003c/span\u003e integers \u003cspan class\u003d\"tex2jax_process\"\u003e$t_ i$\u003c/span\u003e follows (\u003cspan class\u003d\"tex2jax_process\"\u003e$1\\leq t_ i\\leq 1\\, 000\\, 000$\u003c/span\u003e), where\n \u003cspan class\u003d\"tex2jax_process\"\u003e$t_ i$\u003c/span\u003e denotes the number\n of days it takes for the \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003eth tree to grow.\u003c/p\u003e\n\n \u003ch2\u003eOutput\u003c/h2\u003e\n\n \u003cp\u003eYou program should output exactly one line containing one\n integer, denoting the earliest day when the party can be\n organized. The days are numbered \u003cspan class\u003d\"tex2jax_process\"\u003e$1,2,3,\\ldots $\u003c/span\u003e beginning from the\n current moment.\u003c/p\u003e\n\n \u003ch2\u003eSample 1\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e4\n2 3 4 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e7\n\u003c/pre\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n\n \u003ch2\u003eSample 2\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e6\n39 38 9 35 39 20\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e42\n\u003c/pre\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n"}}]}