USACO December 2015 Silver - Switching on the Lights

Author: Óscar Garries

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

C++

C++ Implementation

#include <bits/stdc++.h>
using namespace std;
const int MX = 1e2;
int n, m;
bool light[MX][MX], vis[MX][MX], turn[MX][MX];
vector<vector<vector<pair<int, int>>>> change(MX, vector<vector<pair<int, int>>>(MX, vector<pair<int, int>>()));
int sol = 1, di[4] = {0, 1, 0, -1}, dj[4] = {1, 0, -1, 0};

Give Us Feedback on USACO December 2015 Silver - Switching on the Lights!