USACO Bronze 2016 January - Angry Cows

Author: Óscar Garries

Official Analysis

The official solution doesn't seem to work on the following test case:

14
21
32
44
56

The answer should be 4.

C++

C++ Implementation

1#include <bits/stdc++.h>
2
3using namespace std;
4
5typedef long long ll;
6typedef long double ld;
7
8int main(){
9 ios_base::sync_with_stdio(0); cin.tie(0);
10 freopen("angry.in", "r", stdin);

Give Us Feedback on USACO Bronze 2016 January - Angry Cows!

Join the Discussion!

Feel free to voice your thoughts in the comments section.