USACO Silver 2015 December - Switching on the Lights
Author: Óscar Garries
Appears In
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};
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!