USACO Bronze 2017 January - Don't Be Last

Authors: Benjamin Qi, Jesse Choe

Official Analysis

The test data is not particularly strong. Make sure that your solution outputs "Tie" in both of the following test cases.

4
Bessie 1
Elsie 1 
Daisy 2
Gertie 3
7
Bessie 1
Elsie 1
Daisy 2 
Gertie 2
Annabelle 3
Maggie 4
Henrietta 4

C++

C++ Implementation

1#include <bits/stdc++.h>
2using namespace std;
3
4using ll = long long;
5using ld = long double;
6using db = double;
7using str = string; // yay python!
8
9using pi = pair<int,int>;
10using pl = pair<ll,ll>;

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 Bronze 2017 January - Don't Be Last!