USACO Silver 2017 January - Cow Dance Show

Author: Óscar Garries

Official Analysis

C++

Time Complexity: O(Nlog2N)\mathcal{O}(N\log^2N)

#include <bits/stdc++.h>
using namespace std;
int main () {
freopen("cowdance.in", "r", stdin);
freopen("cowdance.out", "w", stdout);
int n, t;
cin >> n >> t;

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!