Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8560fc3

Browse files
1 parent00768e8 commit8560fc3

File tree

8 files changed

+68
-33
lines changed

8 files changed

+68
-33
lines changed

‎1525/dynamic_programming/longest_increasing_subsequence.html‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6810,10 +6810,6 @@
68106810

68116811

68126812

6813-
6814-
6815-
6816-
68176813

68186814

68196815

@@ -6826,7 +6822,7 @@
68266822
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
68276823

68286824
Last update:
6829-
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="September 21, 202500:15:21 UTC">September 21, 2025</span>&emsp;
6825+
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="September 21, 202522:22:46 UTC">September 21, 2025</span>&emsp;
68306826

68316827
<!-- Tags -->
68326828

@@ -6961,7 +6957,7 @@ <h3 id="alternative-way-of-restoring-the-subsequence">Alternative way of restori
69616957
<h2id="solution-in-on-log-n-with-dynamic-programming-and-binary-search">Solution in<spanclass="arithmatex">$O(n \log n)$</span> with dynamic programming and binary search<aclass="headerlink"href="#solution-in-on-log-n-with-dynamic-programming-and-binary-search"title="Permanent link">&para;</a></h2>
69626958
<p>In order to obtain a faster solution for the problem, we construct a different dynamic programming solution that runs in<spanclass="arithmatex">$O(n^2)$</span>, and then later improve it to<spanclass="arithmatex">$O(n \log n)$</span>.</p>
69636959
<p>We will use the dynamic programming array<spanclass="arithmatex">$d[0 \dots n]$</span>.
6964-
This time<spanclass="arithmatex">$d[l]$</span> doesn'tcorresponds to the element<spanclass="arithmatex">$a[i]$</span> or to a prefix of the array.
6960+
This time<spanclass="arithmatex">$d[l]$</span> doesn'tcorrespond to the element<spanclass="arithmatex">$a[i]$</span> or to a prefix of the array.
69656961
<spanclass="arithmatex">$d[l]$</span> will be the smallest element at which an increasing subsequence of length<spanclass="arithmatex">$l$</span> ends.</p>
69666962
<p>Initially we assume<spanclass="arithmatex">$d[0] = -\infty$</span> and for all other lengths<spanclass="arithmatex">$d[l] = \infty$</span>.</p>
69676963
<p>We will again gradually process the numbers, first<spanclass="arithmatex">$a[0]$</span>, then<spanclass="arithmatex">$a[1]$</span>, etc, and in each step maintain the array<spanclass="arithmatex">$d[]$</span> so that it is up to date.</p>
@@ -7131,7 +7127,7 @@ <h2 id="practice-problems">Practice Problems<a class="headerlink" href="#practic
71317127

71327128
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
71337129
<spanclass="contributors-text">Contributors:</span>
7134-
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/mhayter"title="mhayter"data-bi-name="contributorprofile"target="_blank">mhayter</a> (99.72%)</li><li><ahref="https://github.com/arjunUpatel"title="arjunUpatel"data-bi-name="contributorprofile"target="_blank">arjunUpatel</a> (0.28%)</li></ul>
7130+
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/mhayter"title="mhayter"data-bi-name="contributorprofile"target="_blank">mhayter</a> (100.0%)</li></ul>
71357131
</ul>
71367132

71377133
</article>

‎1525/feed_json_updated.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎1525/feed_rss_created.xml‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎1525/feed_rss_updated.xml‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎1525/geometry/enclosing-circle.html‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6638,6 +6638,18 @@
66386638

66396639

66406640

6641+
6642+
6643+
6644+
6645+
6646+
6647+
6648+
6649+
6650+
6651+
6652+
66416653

66426654

66436655

@@ -6648,6 +6660,10 @@
66486660

66496661

66506662

6663+
6664+
6665+
6666+
66516667

66526668

66536669

@@ -6660,7 +6676,7 @@
66606676
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
66616677

66626678
Last update:
6663-
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="August 23, 202522:03:07 UTC">August 23, 2025</span>&emsp;
6679+
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="September 21, 202509:00:38 UTC">September 21, 2025</span>&emsp;
66646680

66656681
<!-- Tags -->
66666682

@@ -6724,6 +6740,7 @@ <h2 id="welzls-algorithm">Welzl's algorithm<a class="headerlink" href="#welzls-a
67246740
<spanclass="c1">// Choose some good generator of randomness for the shuffle</span>
67256741
<spanclass="n">mt19937_64</span><spanclass="w"></span><spanclass="nf">gen</span><spanclass="p">(...);</span>
67266742
<spanclass="n">mec</span><spanclass="w"></span><spanclass="nf">enclosing_circle</span><spanclass="p">(</span><spanclass="n">vector</span><spanclass="o">&lt;</span><spanclass="n">point</span><spanclass="o">&gt;</span><spanclass="w"></span><spanclass="o">&amp;</span><spanclass="n">p</span><spanclass="p">)</span><spanclass="w"></span><spanclass="p">{</span>
6743+
<spanclass="w"></span><spanclass="kt">int</span><spanclass="w"></span><spanclass="n">n</span><spanclass="w"></span><spanclass="o">=</span><spanclass="w"></span><spanclass="n">p</span><spanclass="p">.</span><spanclass="n">size</span><spanclass="p">();</span>
67276744
<spanclass="w"></span><spanclass="n">ranges</span><spanclass="o">::</span><spanclass="n">shuffle</span><spanclass="p">(</span><spanclass="n">p</span><spanclass="p">,</span><spanclass="w"></span><spanclass="n">gen</span><spanclass="p">);</span>
67286745
<spanclass="w"></span><spanclass="k">auto</span><spanclass="w"></span><spanclass="n">C</span><spanclass="w"></span><spanclass="o">=</span><spanclass="w"></span><spanclass="n">mec</span><spanclass="p">{</span><spanclass="n">p</span><spanclass="p">[</span><spanclass="mi">0</span><spanclass="p">],</span><spanclass="w"></span><spanclass="n">p</span><spanclass="p">[</span><spanclass="mi">1</span><spanclass="p">]};</span>
67296746
<spanclass="w"></span><spanclass="k">for</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="w"></span><spanclass="n">i</span><spanclass="w"></span><spanclass="o">=</span><spanclass="w"></span><spanclass="mi">0</span><spanclass="p">;</span><spanclass="w"></span><spanclass="n">i</span><spanclass="w"></span><spanclass="o">&lt;</span><spanclass="w"></span><spanclass="n">n</span><spanclass="p">;</span><spanclass="w"></span><spanclass="n">i</span><spanclass="o">++</span><spanclass="p">)</span><spanclass="w"></span><spanclass="p">{</span>
@@ -6778,7 +6795,7 @@ <h4 id="mec-of-3-points">MEC of 3 points<a class="headerlink" href="#mec-of-3-po
67786795
<divclass="arithmatex">$$
67796796
\angle azb + \angle bca
67806797
$$</div>
6781-
<p>In a<ahref="https://en.wikipedia.org/wiki/Cyclic_quadrilateral">cyclic quadrilateral</a>, if<spanclass="arithmatex">$c$</span> and<spanclass="arithmatex">$z$</span> are from the same side of<spanclass="arithmatex">$ab$</span>, then the angles are equal, and willad up to<spanclass="arithmatex">$0^\circ$</span> when summed up signed (i.e. positive if counter-clockwise and negative if clockwise). Correspondingly, if<spanclass="arithmatex">$c$</span> and<spanclass="arithmatex">$z$</span> are on the opposite sides, the angles will add up to<spanclass="arithmatex">$180^\circ$</span>.</p>
6798+
<p>In a<ahref="https://en.wikipedia.org/wiki/Cyclic_quadrilateral">cyclic quadrilateral</a>, if<spanclass="arithmatex">$c$</span> and<spanclass="arithmatex">$z$</span> are from the same side of<spanclass="arithmatex">$ab$</span>, then the angles are equal, and willadd up to<spanclass="arithmatex">$0^\circ$</span> when summed up signed (i.e. positive if counter-clockwise and negative if clockwise). Correspondingly, if<spanclass="arithmatex">$c$</span> and<spanclass="arithmatex">$z$</span> are on the opposite sides, the angles will add up to<spanclass="arithmatex">$180^\circ$</span>.</p>
67826799
<center>
67836800
<imgsrc="https://upload.wikimedia.org/wikipedia/commons/3/30/Opposing_inscribed_angles.svg">
67846801
<br>
@@ -6838,7 +6855,7 @@ <h2 id="practice-problems">Practice problems<a class="headerlink" href="#practic
68386855

68396856
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
68406857
<spanclass="contributors-text">Contributors:</span>
6841-
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/adamant-pwn"title="adamant-pwn"data-bi-name="contributorprofile"target="_blank">adamant-pwn</a> (98.09%)</li><li><ahref="https://github.com/MKLOL"title="MKLOL"data-bi-name="contributorprofile"target="_blank">MKLOL</a> (1.91%)</li></ul>
6858+
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/adamant-pwn"title="adamant-pwn"data-bi-name="contributorprofile"target="_blank">adamant-pwn</a> (97.14%)</li><li><ahref="https://github.com/MKLOL"title="MKLOL"data-bi-name="contributorprofile"target="_blank">MKLOL</a> (1.9%)</li><li><ahref="https://github.com/mhayter"title="mhayter"data-bi-name="contributorprofile"target="_blank">mhayter</a> (0.95%)</li></ul>
68426859
</ul>
68436860

68446861
</article>

‎1525/index.html‎

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,24 @@
379379
</label>
380380
<ulclass="md-nav__list"data-md-component="toc"data-md-scrollfix>
381381

382+
<liclass="md-nav__item">
383+
<ahref="#become-a-contributor"class="md-nav__link">
384+
<spanclass="md-ellipsis">
385+
Become a Contributor
386+
</span>
387+
</a>
388+
389+
</li>
390+
391+
<liclass="md-nav__item">
392+
<ahref="#sponsor-us"class="md-nav__link">
393+
<spanclass="md-ellipsis">
394+
Sponsor Us
395+
</span>
396+
</a>
397+
398+
</li>
399+
382400
<liclass="md-nav__item">
383401
<ahref="#changelog"class="md-nav__link">
384402
<spanclass="md-ellipsis">
@@ -401,15 +419,6 @@
401419
</ul>
402420
</nav>
403421

404-
</li>
405-
406-
<liclass="md-nav__item">
407-
<ahref="#contributing"class="md-nav__link">
408-
<spanclass="md-ellipsis">
409-
Contributing
410-
</span>
411-
</a>
412-
413422
</li>
414423

415424
</ul>
@@ -6931,7 +6940,18 @@ <h1 id="algorithms-for-competitive-programming">Algorithms for Competitive Progr
69316940
and data structures especially popular in field of competitive programming.
69326941
Moreover we want to improve the collected knowledge by extending the articles
69336942
and adding new articles to the collection.</p>
6943+
<p>We're an ad-free, volunteer-run website that's free for everyone. Users can contribute articles or help sponsor bounties on articles for greater algorithmic coverage. Your help is greatly appreciated.</p>
69346944
<p>Compiled pages are published at<ahref="https://cp-algorithms.com/">https://cp-algorithms.com/</a>.</p>
6945+
<h2id="become-a-contributor">Become a Contributor<aclass="headerlink"href="#become-a-contributor"title="Permanent link">&para;</a></h2>
6946+
<ul>
6947+
<li><ahref="https://cp-algorithms.com/contrib.html">How to Contribute</a></li>
6948+
<li><ahref="https://cp-algorithms.com/code_of_conduct.html">Code of Conduct</a></li>
6949+
<li><ahref="https://cp-algorithms.com/preview.html">Test-Your-Page Form</a></li>
6950+
</ul>
6951+
<h2id="sponsor-us">Sponsor Us<aclass="headerlink"href="#sponsor-us"title="Permanent link">&para;</a></h2>
6952+
<ul>
6953+
<li><ahref="https://github.com/sponsors/cp-algorithms">Become a Financial Supporter</a></li>
6954+
</ul>
69356955
<h2id="changelog">Changelog<aclass="headerlink"href="#changelog"title="Permanent link">&para;</a></h2>
69366956
<ul>
69376957
<li>August, 2025: Overhaul of CP-Algorithms<ahref="https://github.com/sponsors/cp-algorithms">donation system</a>. Please consider supporting us, so that we can grow!</li>
@@ -6966,12 +6986,6 @@ <h3 id="new-articles">New articles<a class="headerlink" href="#new-articles" tit
69666986
</ul>
69676987
<p>Full list of updates:<ahref="https://github.com/cp-algorithms/cp-algorithms/commits/main">Commit History</a></p>
69686988
<p>Full list of articles:<ahref="https://cp-algorithms.com/navigation.html">Navigation</a></p>
6969-
<h2id="contributing">Contributing<aclass="headerlink"href="#contributing"title="Permanent link">&para;</a></h2>
6970-
<ul>
6971-
<li><ahref="https://cp-algorithms.com/contrib.html">Information for contributors</a></li>
6972-
<li><ahref="https://cp-algorithms.com/code_of_conduct.html">Code of conduct</a></li>
6973-
<li><ahref="https://cp-algorithms.com/preview.html">Test-Your-Page form</a></li>
6974-
</ul>
69756989

69766990
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
69776991
<spanclass="contributors-text">Contributors:</span>

‎1525/index_body‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@ and data structures especially popular in field of competitive programming.
1212
Moreover we want to improve the collected knowledge by extending the articles
1313
and adding new articles to the collection.
1414

15+
We're an ad-free, volunteer-run website that's free for everyone. Users can contribute articles or help sponsor bounties on articles for greater algorithmic coverage. Your help is greatly appreciated.
16+
1517
Compiled pages are published at [https://cp-algorithms.com/](https://cp-algorithms.com/).
1618

19+
## Become a Contributor
20+
21+
- [How to Contribute](https://cp-algorithms.com/contrib.html)
22+
- [Code of Conduct](https://cp-algorithms.com/code_of_conduct.html)
23+
- [Test-Your-Page Form](https://cp-algorithms.com/preview.html)
24+
25+
## Sponsor Us
26+
27+
- [Become a Financial Supporter](https://github.com/sponsors/cp-algorithms)
28+
1729
## Changelog
1830

1931
- August, 2025: Overhaul of CP-Algorithms [donation system](https://github.com/sponsors/cp-algorithms). Please consider supporting us, so that we can grow!
@@ -50,8 +62,4 @@ Full list of updates: [Commit History](https://github.com/cp-algorithms/cp-algor
5062

5163
Full list of articles: [Navigation](https://cp-algorithms.com/navigation.html)
5264

53-
## Contributing
5465

55-
- [Information for contributors](https://cp-algorithms.com/contrib.html)
56-
- [Code of conduct](https://cp-algorithms.com/code_of_conduct.html)
57-
- [Test-Your-Page form](https://cp-algorithms.com/preview.html)

‎1525/search/search_index.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp