Skip to content

Commit

Permalink
Merge pull request #5047 from Sosuke23/a
Browse files Browse the repository at this point in the history
update usaco-643
  • Loading branch information
SansPapyrus683 authored Jan 17, 2025
2 parents 0be11df + 74526d1 commit 5f69b6a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions solutions/silver/usaco-643.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ title: Diamond Collector
author: Nathan Wang, Albert Ye
---

[Official Analysis](http://www.usaco.org/current/data/sol_diamond_silver_open16.html)
[Official Analysis (Java)](http://www.usaco.org/current/data/sol_diamond_silver_open16.html)

## Implementation

**Time Complexity:** $\mathcal{O} (N \log{N})$

<LanguageSection>
<CPPSection>

## Implementation

```cpp
#include <bits/stdc++.h>

Expand Down Expand Up @@ -49,16 +51,12 @@ int main() {
ans = max(ans, canTakeLeft[l] + maxValAfterI[l + canTakeLeft[l]]);
}
cout << ans << endl;

return 0;
}
```

</CPPSection>
<JavaSection>

## Implementation

Source: Nick Wu, from the official USACO editorial

```java
Expand Down Expand Up @@ -129,8 +127,6 @@ public class diamondS {
</JavaSection>
<PySection>

## Implementation

```py
import sys

Expand Down

0 comments on commit 5f69b6a

Please sign in to comment.