Skip to content

Instantly share code, notes, and snippets.

@gallen
gallen / 3.cpp
Created February 21, 2021 19:04
USACO 2021 January Contest, Silver Problem 3. Spaced Out
// USACO 2021 January Contest, Silver
// Problem 3. Spaced Out
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
@gallen
gallen / cowntagion.cpp
Created January 16, 2021 16:58
USACO 2020 December Contest, Silver Problem 1. Cowntagion
//USACO 2020 December Contest, Silver
//Problem 1. Cowntagion
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
@gallen
gallen / stuck.cpp
Created January 16, 2021 16:39
For Avinci Club
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
@gallen
gallen / pasture.cpp
Created January 9, 2021 17:40
USACO 2020 December Contest, Silver Problem 2. Rectangular Pasture
// USACO 2020 December Contest, Silver
// Problem 2. Rectangular Pasture
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
@gallen
gallen / ccski.cpp
Created December 12, 2020 17:31
For Avinci Club
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
@gallen
gallen / gates2.cpp
Created December 5, 2020 17:22
USACO 2016 January Contest, Silver Problem 3. Build Gates - using ad hoc solution
// USACO 2016 January Contest, Silver
// Problem 3. Build Gates - using ad hoc solution
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
@gallen
gallen / gates.cpp
Created December 5, 2020 16:56
USACO 2016 January Contest, Silver Problem 3. Build Gates
// USACO 2016 January Contest, Silver
// Problem 3. Build Gates
#include "bits/stdc++.h"
#include <fstream>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
@gallen
gallen / where.cpp
Created November 28, 2020 16:58
USACO 2017 US Open Contest, Silver Problem 3. Where's Bessie?
// USACO 2017 US Open Contest, Silver
// Problem 3. Where's Bessie?
#include "bits/stdc++.h"
#include <fstream>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
@gallen
gallen / where.cpp
Created November 21, 2020 17:26
Where - unfinished
// Where - unfinished
#include "bits/stdc++.h"
#include <fstream>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
@gallen
gallen / perimeter.cpp
Created November 14, 2020 17:06
Perimeter - calculate result during floodfill
//Perimeter - calculate result during floodfill
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;