Documentation for c26eea874d

This commit is contained in:
realstealthninja
2025-05-19 11:38:33 +00:00
parent c7a9a42397
commit 14583a2f33
2829 changed files with 30266 additions and 21669 deletions

View File

@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: dynamic_programming/longest_increasing_subsequence_nlogn.cpp Source File</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
@@ -60,7 +60,7 @@ window.MathJax = {
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -133,7 +133,7 @@ $(function(){initNavTree('d5/d21/longest__increasing__subsequence__nlogn_8cpp_so
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">using namespace </span>std;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">LIS</a>(<span class="keyword">const</span> std::vector&lt;int&gt;&amp; arr, <span class="keywordtype">int</span> n) {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keywordtype">int</span> LIS(<span class="keyword">const</span> std::vector&lt;int&gt;&amp; arr, <span class="keywordtype">int</span> n) {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> set&lt;int&gt; active; <span class="comment">// The current built LIS.</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> active.insert(arr[0]);</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// Loop through every element.</span></div>
@@ -164,19 +164,18 @@ $(function(){initNavTree('d5/d21/longest__increasing__subsequence__nlogn_8cpp_so
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n; ++i) {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> cin &gt;&gt; a[i];</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> }</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> cout &lt;&lt; <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">LIS</a>(a, n) &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> cout &lt;&lt; LIS(a, n) &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
<div class="ttc" id="agenerate__parentheses_8cpp_html_gae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00110">generate_parentheses.cpp:110</a></div></div>
<div class="ttc" id="amatrix__exponentiation_8cpp_html_a600eaf353befc174637855795f12d258"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a></div><div class="ttdeci">#define endl</div><div class="ttdef"><b>Definition</b> <a href="../../d7/d35/matrix__exponentiation_8cpp_source.html#l00036">matrix_exponentiation.cpp:36</a></div></div>
<div class="ttc" id="anamespacedynamic__programming_html_a0a2215194e58786c34db1ccaf8031079"><div class="ttname"><a href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a></div><div class="ttdeci">uint64_t LIS(const std::vector&lt; uint64_t &gt; &amp;a, const uint32_t &amp;n)</div><div class="ttdoc">Calculate the longest increasing subsequence for the specified numbers.</div><div class="ttdef"><b>Definition</b> <a href="../../d7/d57/longest__increasing__subsequence_8cpp_source.html#l00040">longest_increasing_subsequence.cpp:40</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><b>longest_increasing_subsequence_nlogn.cpp</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>