Skip to content

Commit 164b598

Browse files
Merge pull request #3473 from cpinitiative/backandforth
hints for back and forth, bronze
2 parents f156c57 + 2fa17af commit 164b598

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

solutions/bronze/usaco-857.mdx

+23-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Back and Forth
55
author: Benjamin Qi, Ryan Chou, Jonathan Paulson
66
---
77

8-
[Official Analysis](http://www.usaco.org/current/data/sol_backforth_bronze_dec18.html)
8+
[Official Analysis (C++)](http://www.usaco.org/current/data/sol_backforth_bronze_dec18.html)
99

1010
## Video Solution
1111
By Jonathan Paulson
@@ -185,6 +185,27 @@ with open('backforth.out', 'w') as fout:
185185
</LanguageSection>
186186
</Spoiler>
187187

188+
189+
<Spoiler title="Hint 1">
190+
191+
What information do we need when Farmer John arrives at a barn?
192+
</Spoiler>
193+
194+
<Spoiler title="Hint 1 (answer)">
195+
196+
We have to know the day, buckets that are available at each barn, and the current tank amounts.
197+
198+
</Spoiler>
199+
200+
201+
<Spoiler title="Hint 2">
202+
203+
At every point, we could choose any bucket to move. Could we write general logic to handle all of these possible states?
204+
205+
</Spoiler>
206+
207+
<Spoiler title="Solution">
208+
188209
## Solution
189210

190211
Similar to the second solution from the analysis.
@@ -341,3 +362,4 @@ print(len(possible))
341362
```
342363
</PySection>
343364
</LanguageSection>
365+
</Spoiler>

0 commit comments

Comments
 (0)