USACO Silver 2016 February - Milk Pails

Author: Óscar Garries

Official Analysis

C++

C++ Implementation

1#include <bits/stdc++.h>
2
3using namespace std;
4
5bool vis[101][101][101];
6int x, y, k, m, sol;
7
8void ff (int curX, int curY, int curK) {
9 if (vis[curX][curY][curK] || curK > k) return;
10 vis[curX][curY][curK] = true;

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!

Give Us Feedback on USACO Silver 2016 February - Milk Pails!