USACO Bronze 2012 January - Haybale Stacking

Author: Óscar Garries

Official Analysis

C++

C++ Implementation

1#include <bits/stdc++.h>
2
3using namespace std;
4
5int main () {
6 int n, k;
7 cin >> n >> k;
8 vector<int> diff(n + 1);
9 for (int i = 0; i < k; i++) {
10 int l, r;

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 2012 January - Haybale Stacking!