USACO Silver 2017 February - Why Did the Cow Cross the Road II

Authors: Mrinall Umasudhan, Shourya Bansal

Original Problem

Official Analysis

C++

Implementation

#include <bits/stdc++.h>
using namespace std;
int main() {
freopen("maxcross.in", "r", stdin);
freopen("maxcross.out", "w", stdout);
int N, K, B;
cin >> N >> K >> B;

Java

Implementation

import java.io.*;
import java.util.*;
public class maxcross {
static class InputReader {
BufferedReader reader;
StringTokenizer tokenizer;
public InputReader(File stream) throws FileNotFoundException {

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!