From 74526d194d55c8a225ad645a1785f62cb338b5d5 Mon Sep 17 00:00:00 2001 From: freakin23 Date: Fri, 17 Jan 2025 21:16:29 +0530 Subject: [PATCH] update usaco-643 --- solutions/silver/usaco-643.mdx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/solutions/silver/usaco-643.mdx b/solutions/silver/usaco-643.mdx index 03976d1b27..ea6b18d672 100644 --- a/solutions/silver/usaco-643.mdx +++ b/solutions/silver/usaco-643.mdx @@ -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})$ -## Implementation - ```cpp #include @@ -49,16 +51,12 @@ int main() { ans = max(ans, canTakeLeft[l] + maxValAfterI[l + canTakeLeft[l]]); } cout << ans << endl; - - return 0; } ``` -## Implementation - Source: Nick Wu, from the official USACO editorial ```java @@ -129,8 +127,6 @@ public class diamondS { -## Implementation - ```py import sys