File tree 1 file changed +23
-1
lines changed
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ title: Back and Forth
5
5
author : Benjamin Qi, Ryan Chou, Jonathan Paulson
6
6
---
7
7
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 )
9
9
10
10
## Video Solution
11
11
By Jonathan Paulson
@@ -185,6 +185,27 @@ with open('backforth.out', 'w') as fout:
185
185
</LanguageSection >
186
186
</Spoiler >
187
187
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
+
188
209
## Solution
189
210
190
211
Similar to the second solution from the analysis.
@@ -341,3 +362,4 @@ print(len(possible))
341
362
```
342
363
</PySection>
343
364
</LanguageSection>
365
+ </Spoiler>
You can’t perform that action at this time.
0 commit comments