USACO Silver 2017 December - The Bovine Shuffle

Author: Jesse Choe

Official Analysis

Time Complexity: O(N)\mathcal{O}(N)

C++

Implementation

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vb = vector<bool>;
using pl = pair<ll, ll>;
using vpl = vector<pl>;
using vc = vector<char>;
using vs = vector<string>;

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!