USACO Bronze 2015 December - Speeding
Authors: Jesse Choe, Kevin Sheng, Maggie Liu, Rameez Parwez
Video Solution
By Maggie Liu
Video Solution Code
Explanation
Since the road is only 100 miles long, we can store the speed limit as well as Bessie's speed for each mile separately.
Once we have the speeds, our final answer is the maximum difference between the Bessie's speed and speeding limit across all 100 miles.
Implementation
#include <bits/stdc++.h>using namespace std;const int LEN = 100;int main() {freopen("speeding.in", "r", stdin);freopen("speeding.out", "w", stdout);int N, M;
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!