{"id":78460,"date":"2021-12-01T12:49:32","date_gmt":"2021-12-01T12:49:32","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/12\/01\/minimum-size-of-a-board-you-are-given-n-pieces-and-a\/"},"modified":"2021-12-01T12:49:32","modified_gmt":"2021-12-01T12:49:32","slug":"minimum-size-of-a-board-you-are-given-n-pieces-and-a","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/12\/01\/minimum-size-of-a-board-you-are-given-n-pieces-and-a\/","title":{"rendered":"Minimum Size Of a board You are given n pieces and a"},"content":{"rendered":"<p>Minimum Size Of a board<\/p>\n<p> You are given n pieces and a m x m board. The rows and columns are numbered from 1 to m. A cell on the intersection of the row and column is denoted as (r, c).<\/p>\n<p> The game&#8217;s goal is to place n pieces numbered from 1 to n on the board. The ith piece lies on (, ) while the following rule must be satisfied:<\/p>\n<p> For all pairs of pieces i and j, | &#8211; | &gt;= k or || &#8211; | &gt;= k Here, |x| denotes the absolute value of x.<\/p>\n<p> Determine the smallest size of the board m x m on which you can put n pieces according to the rules.<\/p>\n<p> Input format: The only line contains two integer, n(1 \u2264 n \u2264 1000000) denoting the number of pieces and k(1 \u2264 k \u2264 1000000).<\/p>\n<p> Output format: Print a single integer denoting the minimum value of m denoting the length of sides of the suitable board.<\/p>\n<p> Sample input<\/p>\n<p> 5 2<\/p>\n<p> Sample output<\/p>\n<p> 5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Minimum Size Of a board You are given n pieces and a m x m board. The rows and columns are numbered from 1 to m. A cell on the intersection of the row and column is denoted as (r, c). The game&#8217;s goal is to place n pieces numbered from 1 to n on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10],"class_list":["post-78460","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-writing"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/78460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=78460"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/78460\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=78460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=78460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=78460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}