USACO December 2017 Silver - Why Did the Cow Cross the Road III

Author: Óscar Garries

Official Editorial: http://www.usaco.org/current/data/sol_countcross_silver_feb17.html

C++

C++ Implementation

#include <bits/stdc++.h>
using namespace std;
const int MX = 1e2;
bool vis[MX][MX];
int cows[MX][MX], di[4] = {1, -1, 0, 0}, dj[4] = {0, 0, 1, -1}, nCows, n, k, r;
set<tuple<int, int, int, int>> roads;

Give Us Feedback on USACO December 2017 Silver - Why Did the Cow Cross the Road III!