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++

Implementation

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using db = double;
using str = string; // yay python!
using pi = pair<int,int>;
using 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!