USACO Silver 2015 December - Switching on the Lights

Author: Óscar Garries

Official Analysis

C++

C++ Implementation

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

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

Join the Discussion!

Feel free to voice your thoughts in the comments section.