#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <queue> #include <stack> using namespace std; int r, d, s, vils = 0; const int inf = 0x3f3f3f3f; bool ableCheck = false; vector<vector<pair<int, int>>> par(10, vector<pair<int, int>> (1 << 10)); vector<vector<int>> adj(10), swt(10), mov(10, vector<int> (1 << 10)); vector<vector<bool>> memo(10, vector<bool> (1 << 10)); priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<int, int>>>> sts; void backtrackUpdate(const int uc, const int valc, int u, int val, int indx, int cge){ if(indx == swt[u].size()){ if((val & (1 << u)) && cge < mov[u][val]){ mov[u][val] = cge; par[u][val] = {uc, valc}; sts.push({mov[u][val], {u, val}}); } } else { int k = swt[u][indx]; backtrackUpdate(uc, valc, u, val ^ (1 << k), indx + 1, cge + 1); backtrackUpdate(uc, valc, u, val, indx + 1, cge); } return; } void dijkstra(){ sts.push({0, {0, 1}}); mov[0][1] = 0; while(!sts.empty()){ int u = sts.top().second.first, val = sts.top().second.second; //cout << u << " " << val << " " << par[u][val].first << " " << par[u][val].second << " " << mov[u][val] << endl; sts.pop(); if(memo[u][val]) continue; memo[u][val] = true; if(u == r - 1 && val == (1 << (r - 1))){ ableCheck = true; return; } else { if(par[u][val].first != u){ backtrackUpdate(u, val, u, val, 0, mov[u][val]); } for(int v : adj[u]){ if(val & (1 << v) && mov[u][val] + 1 < mov[v][val]){ mov[v][val] = mov[u][val] + 1; par[v][val] = {u, val}; sts.push({mov[u][val] + 1, {v, val}}); } } } } return; } void returnRes(){ cout << "Villa #" << ++vils << endl; if(!ableCheck){ cout << "The problem cannot be solved.\n\n"; return; } stack<pair<int, int>> res; int cnt = 0; res.push({r - 1, (1 << (r - 1))}); while(res.top().first != 0 || res.top().second != 1){ int u = res.top().first, val = res.top().second; res.push(par[u][val]); int u_ = res.top().first, val_ = res.top().second; val_ ^= val; cnt += (int)(u != u_); while(val_ != 0){ cnt += (val_ & 1); val_ >>= 1; } } int u = res.top().first, val = res.top().second; res.pop(); cout << "The problem can be solved in " << cnt << " steps:\n"; while(!res.empty()){ int v = res.top().first, val2 = res.top().second; res.pop(); if(u != v) cout << "- Move to room " << v + 1 << ".\n"; val ^= val2; for(int i = 0; i < r; i++){ if(val & (1 << i)) cout << "- Switch " << (val2 & (1 << i) ? "on" : "off") << " light in room " << i + 1 << ".\n"; } u = v; val = val2; } cout << "\n"; return; } int main(){ //ios_base::sync_with_stdio(false); //cin.tie(nullptr), cout.tie(nullptr); while(cin >> r >> d >> s){ ableCheck = false; while(!sts.empty()) sts.pop(); for(int i = 0; i < 10; i++){ adj[i].clear(), swt[i].clear(); for(int j = 0; j < (1 << 10); j++){ par[i][j] = {-1, -1}; memo[i][j] = false; mov[i][j] = inf; } } if(r == 0 && d == 0 && s == 0) break; else { for(int i = 0; i < d; i++){ int a, b; cin >> a >> b; adj[a - 1].push_back(b - 1), adj[b - 1].push_back(a - 1); } for(int i = 0; i < s; i++){ int a, b; cin >> a >> b; swt[a - 1].push_back(b - 1); } dijkstra(); //cout << ableCheck; returnRes(); } } return 0; }
1 0 0 2 1 2 1 2 2 1 1 2 3 2 4 1 3 2 3 3 1 3 2 1 3 2 3 4 3 8 1 2 2 3 2 4 2 1 3 1 4 1 3 2 1 3 2 3 4 3 1 4 5 6 11 1 2 1 3 1 4 2 3 3 4 4 5 2 1 5 1 1 2 1 3 2 3 4 3 5 3 2 4 3 4 1 5 4 5 6 6 18 1 2 1 3 1 6 3 4 4 5 5 6 4 1 5 1 6 1 3 2 5 2 1 3 4 3 5 3 6 3 1 4 2 4 3 4 6 4 2 5 3 5 6 5 3 6 4 6 7 10 20 1 4 1 5 2 5 2 6 2 7 3 4 3 5 3 6 4 7 6 7 2 1 6 1 1 2 6 2 7 2 1 3 6 3 1 4 2 4 5 4 7 4 2 5 4 5 6 5 1 6 3 6 3 7 4 7 5 7 6 7 8 12 32 1 4 1 5 1 7 2 4 2 5 2 8 3 5 3 6 3 7 4 6 6 8 7 8 5 1 7 1 1 2 5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 4 9 5 8 5 10 7 9 7 10 8 9 2 1 4 1 6 1 8 1 7 2 4 3 7 3 2 4 10 4 2 5 3 5 4 5 6 5 7 5 9 5 10 5 1 6 4 6 5 6 8 6 9 6 10 6 2 7 4 7 5 7 10 7 1 8 4 8 6 8 9 8 1 9 3 9 4 9 7 9 10 9 2 10 3 10 6 10 7 10 8 10 10 13 41 1 3 1 5 1 6 2 3 2 7 3 7 4 6 4 10 5 6 5 8 7 10 8 9 9 10 3 1 5 1 7 1 9 1 1 2 3 2 5 2 6 2 10 2 4 3 6 3 7 3 9 3 10 3 1 4 6 4 9 4 1 5 2 5 4 5 6 5 7 5 8 5 10 5 1 6 3 6 8 6 3 7 4 7 6 7 2 8 5 8 7 8 9 8 10 8 1 9 5 9 7 9 1 10 6 10 7 10 10 14 47 1 2 1 6 1 8 2 7 2 10 3 5 3 6 3 9 4 5 4 6 4 8 5 7 7 8 9 10 2 1 3 1 4 1 5 1 6 1 10 2 1 3 2 3 4 3 6 3 9 3 10 3 1 4 5 4 7 4 9 4 1 5 3 5 4 5 6 5 7 5 8 5 10 5 1 6 3 6 5 6 7 6 10 6 1 7 3 7 5 7 6 7 3 8 5 8 7 8 10 8 1 9 3 9 6 9 7 9 8 9 10 9 2 10 3 10 4 10 5 10 6 10 10 10 50 1 6 1 8 1 9 2 6 2 10 3 5 3 7 4 6 5 10 7 8 2 1 3 1 5 1 3 2 4 2 5 2 7 2 8 2 10 2 2 3 5 3 6 3 7 3 10 3 1 4 3 4 5 4 6 4 3 5 6 5 7 5 10 5 1 6 2 6 7 6 1 7 3 7 5 7 6 7 9 7 1 8 2 8 4 8 5 8 7 8 9 8 2 9 3 9 4 9 6 9 7 9 8 9 10 9 1 10 2 10 4 10 5 10 6 10 8 10 9 10 0 0 0
Villa #1 The problem can be solved in 0 steps: Villa #2 The problem can be solved in 3 steps: - Switch on light in room 2. - Move to room 2. - Switch off light in room 1. Villa #3 The problem can be solved in 3 steps: - Switch on light in room 3. - Move to room 3. - Switch off light in room 1. Villa #4 The problem cannot be solved. Villa #5 The problem cannot be solved. Villa #6 The problem can be solved in 7 steps: - Switch on light in room 3. - Move to room 3. - Switch on light in room 6. - Move to room 1. - Move to room 6. - Switch off light in room 1. - Switch off light in room 3. Villa #7 The problem can be solved in 10 steps: - Switch on light in room 2. - Switch on light in room 4. - Move to room 4. - Switch on light in room 7. - Move to room 7. - Move to room 2. - Switch off light in room 1. - Move to room 7. - Switch off light in room 2. - Switch off light in room 4. Villa #8 The problem can be solved in 10 steps: - Switch on light in room 5. - Move to room 5. - Switch on light in room 7. - Move to room 1. - Switch off light in room 5. - Switch on light in room 8. - Move to room 7. - Switch off light in room 1. - Move to room 8. - Switch off light in room 7. Villa #9 The problem cannot be solved. Villa #10 The problem can be solved in 24 steps: - Switch on light in room 7. - Move to room 7. - Switch on light in room 8. - Move to room 1. - Move to room 8. - Switch on light in room 2. - Switch on light in room 5. - Move to room 1. - Move to room 7. - Switch off light in room 8. - Switch on light in room 9. - Move to room 5. - Switch on light in room 3. - Move to room 9. - Move to room 3. - Switch off light in room 5. - Switch off light in room 9. - Move to room 2. - Switch off light in room 1. - Switch off light in room 3. - Switch on light in room 10. - Move to room 10. - Switch off light in room 2. - Switch off light in room 7. Villa #11 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #12 The problem can be solved in 12 steps: - Switch on light in room 3. - Switch on light in room 7. - Move to room 3. - Move to room 7. - Switch on light in room 5. - Switch on light in room 10. - Move to room 5. - Switch off light in room 1. - Move to room 10. - Switch off light in room 3. - Switch off light in room 5. - Switch off light in room 7. Villa #13 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #14 The problem cannot be solved. Villa #15 The problem cannot be solved. Villa #16 The problem cannot be solved. Villa #17 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #18 The problem can be solved in 11 steps: - Switch on light in room 10. - Move to room 10. - Switch on light in room 2. - Switch on light in room 3. - Move to room 3. - Move to room 2. - Switch off light in room 1. - Move to room 3. - Move to room 10. - Switch off light in room 2. - Switch off light in room 3. Villa #19 The problem can be solved in 6 steps: - Switch on light in room 5. - Switch on light in room 10. - Move to room 5. - Switch off light in room 1. - Move to room 10. - Switch off light in room 5. Villa #20 The problem cannot be solved. Villa #21 The problem can be solved in 6 steps: - Switch on light in room 3. - Switch on light in room 10. - Move to room 3. - Move to room 10. - Switch off light in room 1. - Switch off light in room 3. Villa #22 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #23 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #24 The problem can be solved in 9 steps: - Switch on light in room 2. - Move to room 2. - Switch off light in room 1. - Switch on light in room 3. - Switch on light in room 10. - Move to room 3. - Move to room 10. - Switch off light in room 2. - Switch off light in room 3. Villa #25 The problem can be solved in 9 steps: - Switch on light in room 2. - Switch on light in room 4. - Switch on light in room 10. - Move to room 2. - Move to room 4. - Switch off light in room 2. - Move to room 10. - Switch off light in room 1. - Switch off light in room 4. Villa #26 The problem can be solved in 12 steps: - Switch on light in room 4. - Switch on light in room 9. - Move to room 9. - Move to room 4. - Switch on light in room 6. - Switch on light in room 10. - Move to room 6. - Switch off light in room 1. - Switch off light in room 4. - Move to room 10. - Switch off light in room 6. - Switch off light in room 9. Villa #27 The problem can be solved in 9 steps: - Switch on light in room 8. - Move to room 8. - Switch on light in room 3. - Move to room 3. - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. - Switch off light in room 3. - Switch off light in room 8. Villa #28 The problem can be solved in 16 steps: - Switch on light in room 3. - Move to room 3. - Switch on light in room 4. - Move to room 1. - Move to room 4. - Switch off light in room 1. - Switch on light in room 6. - Switch on light in room 10. - Move to room 10. - Move to room 6. - Move to room 3. - Switch off light in room 4. - Move to room 6. - Switch off light in room 3. - Move to room 10. - Switch off light in room 6. Villa #29 The problem can be solved in 6 steps: - Switch on light in room 5. - Move to room 5. - Switch off light in room 1. - Switch on light in room 10. - Move to room 10. - Switch off light in room 5. Villa #30 The problem can be solved in 17 steps: - Switch on light in room 4. - Move to room 4. - Switch on light in room 2. - Switch on light in room 8. - Switch on light in room 10. - Move to room 1. - Switch on light in room 3. - Move to room 8. - Switch off light in room 1. - Move to room 3. - Move to room 10. - Move to room 2. - Switch off light in room 3. - Move to room 10. - Switch off light in room 2. - Switch off light in room 4. - Switch off light in room 8. Villa #31 The problem can be solved in 21 steps: - Switch on light in room 4. - Move to room 4. - Switch on light in room 7. - Move to room 1. - Move to room 7. - Switch on light in room 8. - Move to room 1. - Switch on light in room 6. - Move to room 4. - Move to room 6. - Switch off light in room 1. - Switch on light in room 9. - Move to room 8. - Move to room 9. - Switch off light in room 6. - Switch on light in room 10. - Move to room 10. - Switch off light in room 4. - Switch off light in room 7. - Switch off light in room 8. - Switch off light in room 9. Villa #32 The problem cannot be solved. Villa #33 The problem cannot be solved. Villa #34 The problem cannot be solved. Villa #35 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #36 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #37 The problem cannot be solved. Villa #38 The problem can be solved in 16 steps: - Switch on light in room 3. - Switch on light in room 8. - Move to room 8. - Move to room 3. - Switch on light in room 7. - Move to room 7. - Switch off light in room 8. - Move to room 3. - Switch off light in room 1. - Switch on light in room 5. - Move to room 5. - Switch off light in room 7. - Switch on light in room 10. - Move to room 10. - Switch off light in room 3. - Switch off light in room 5. Villa #39 The problem can be solved in 20 steps: - Switch on light in room 6. - Switch on light in room 8. - Move to room 8. - Switch on light in room 3. - Move to room 6. - Switch on light in room 5. - Move to room 5. - Move to room 3. - Switch off light in room 1. - Switch on light in room 2. - Switch on light in room 10. - Move to room 5. - Move to room 10. - Move to room 2. - Switch off light in room 3. - Switch off light in room 8. - Move to room 10. - Switch off light in room 2. - Switch off light in room 5. - Switch off light in room 6. Villa #40 The problem cannot be solved. Villa #41 The problem can be solved in 12 steps: - Switch on light in room 5. - Move to room 5. - Switch on light in room 3. - Move to room 3. - Switch on light in room 7. - Switch on light in room 10. - Move to room 7. - Move to room 10. - Switch off light in room 1. - Switch off light in room 3. - Switch off light in room 5. - Switch off light in room 7. Villa #42 The problem cannot be solved. Villa #43 The problem can be solved in 19 steps: - Switch on light in room 5. - Switch on light in room 7. - Move to room 5. - Move to room 7. - Switch on light in room 3. - Move to room 5. - Switch on light in room 4. - Move to room 1. - Move to room 4. - Switch off light in room 1. - Switch off light in room 5. - Move to room 3. - Switch on light in room 10. - Move to room 10. - Move to room 7. - Switch off light in room 3. - Switch off light in room 4. - Move to room 10. - Switch off light in room 7. Villa #44 The problem cannot be solved. Villa #45 The problem cannot be solved. Villa #46 The problem can be solved in 9 steps: - Switch on light in room 7. - Switch on light in room 8. - Move to room 7. - Switch off light in room 1. - Move to room 8. - Switch off light in room 7. - Switch on light in room 10. - Move to room 10. - Switch off light in room 8. Villa #47 The problem can be solved in 14 steps: - Switch on light in room 7. - Move to room 7. - Switch on light in room 5. - Move to room 5. - Switch on light in room 2. - Move to room 7. - Move to room 1. - Move to room 2. - Switch off light in room 5. - Switch off light in room 7. - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. - Switch off light in room 2. Villa #48 The problem can be solved in 14 steps: - Switch on light in room 8. - Move to room 8. - Switch on light in room 3. - Switch on light in room 7. - Move to room 1. - Move to room 7. - Move to room 3. - Switch off light in room 1. - Move to room 7. - Switch off light in room 8. - Switch on light in room 10. - Move to room 10. - Switch off light in room 3. - Switch off light in room 7. Villa #49 The problem cannot be solved. Villa #50 The problem can be solved in 17 steps: - Switch on light in room 7. - Switch on light in room 8. - Move to room 8. - Switch on light in room 10. - Move to room 10. - Switch on light in room 5. - Move to room 7. - Switch off light in room 1. - Move to room 5. - Switch on light in room 9. - Move to room 9. - Switch off light in room 7. - Move to room 5. - Move to room 10. - Switch off light in room 5. - Switch off light in room 8. - Switch off light in room 9. Villa #51 The problem cannot be solved. Villa #52 The problem can be solved in 10 steps: - Switch on light in room 4. - Switch on light in room 10. - Move to room 4. - Move to room 10. - Switch on light in room 2. - Move to room 2. - Switch off light in room 1. - Switch off light in room 4. - Move to room 10. - Switch off light in room 2. Villa #53 The problem can be solved in 15 steps: - Switch on light in room 4. - Switch on light in room 5. - Switch on light in room 9. - Move to room 5. - Move to room 9. - Move to room 4. - Switch off light in room 1. - Switch on light in room 6. - Move to room 6. - Switch off light in room 4. - Switch on light in room 10. - Move to room 10. - Switch off light in room 5. - Switch off light in room 6. - Switch off light in room 9. Villa #54 The problem can be solved in 10 steps: - Switch on light in room 8. - Move to room 8. - Switch on light in room 2. - Move to room 1. - Switch on light in room 10. - Move to room 2. - Move to room 10. - Switch off light in room 1. - Switch off light in room 2. - Switch off light in room 8. Villa #55 The problem cannot be solved. Villa #56 The problem cannot be solved. Villa #57 The problem can be solved in 20 steps: - Switch on light in room 5. - Move to room 5. - Switch on light in room 4. - Switch on light in room 8. - Move to room 1. - Move to room 8. - Move to room 4. - Switch on light in room 6. - Move to room 8. - Move to room 6. - Switch off light in room 5. - Switch off light in room 8. - Switch on light in room 9. - Switch on light in room 10. - Move to room 9. - Switch off light in room 4. - Switch off light in room 6. - Move to room 10. - Switch off light in room 1. - Switch off light in room 9. Villa #58 The problem can be solved in 7 steps: - Switch on light in room 6. - Switch on light in room 10. - Move to room 10. - Move to room 6. - Switch off light in room 1. - Move to room 10. - Switch off light in room 6. Villa #59 The problem can be solved in 7 steps: - Switch on light in room 6. - Move to room 6. - Switch on light in room 10. - Move to room 1. - Switch off light in room 6. - Move to room 10. - Switch off light in room 1. Villa #60 The problem can be solved in 10 steps: - Switch on light in room 8. - Move to room 8. - Switch on light in room 2. - Move to room 1. - Move to room 2. - Switch off light in room 8. - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. - Switch off light in room 2. Villa #61 The problem can be solved in 6 steps: - Switch on light in room 7. - Switch on light in room 10. - Move to room 7. - Move to room 10. - Switch off light in room 1. - Switch off light in room 7. Villa #62 The problem cannot be solved. Villa #63 The problem cannot be solved. Villa #64 The problem cannot be solved. Villa #65 The problem cannot be solved. Villa #66 The problem can be solved in 10 steps: - Switch on light in room 7. - Move to room 7. - Switch on light in room 10. - Move to room 10. - Switch on light in room 3. - Move to room 3. - Switch off light in room 7. - Move to room 10. - Switch off light in room 1. - Switch off light in room 3. Villa #67 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #68 The problem cannot be solved. Villa #69 The problem cannot be solved. Villa #70 The problem can be solved in 7 steps: - Switch on light in room 6. - Move to room 6. - Switch on light in room 10. - Move to room 1. - Switch off light in room 6. - Move to room 10. - Switch off light in room 1. Villa #71 The problem cannot be solved. Villa #72 The problem can be solved in 14 steps: - Switch on light in room 3. - Move to room 3. - Switch on light in room 4. - Switch on light in room 5. - Move to room 1. - Move to room 5. - Move to room 4. - Switch off light in room 1. - Move to room 5. - Switch off light in room 3. - Switch on light in room 10. - Move to room 10. - Switch off light in room 4. - Switch off light in room 5. Villa #73 The problem can be solved in 15 steps: - Switch on light in room 8. - Move to room 8. - Switch on light in room 4. - Move to room 4. - Switch on light in room 6. - Move to room 6. - Switch on light in room 10. - Move to room 4. - Switch off light in room 6. - Move to room 8. - Move to room 1. - Switch off light in room 8. - Move to room 10. - Switch off light in room 1. - Switch off light in room 4. Villa #74 The problem cannot be solved. Villa #75 The problem can be solved in 3 steps: - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. Villa #76 The problem cannot be solved. Villa #77 The problem can be solved in 17 steps: - Switch on light in room 4. - Switch on light in room 9. - Move to room 9. - Move to room 4. - Switch on light in room 5. - Switch on light in room 8. - Move to room 9. - Move to room 1. - Switch off light in room 9. - Move to room 5. - Move to room 8. - Switch off light in room 5. - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. - Switch off light in room 4. - Switch off light in room 8. Villa #78 The problem cannot be solved. Villa #79 The problem can be solved in 18 steps: - Switch on light in room 7. - Move to room 7. - Switch on light in room 4. - Move to room 1. - Switch on light in room 3. - Move to room 4. - Move to room 3. - Switch on light in room 5. - Move to room 4. - Move to room 1. - Switch off light in room 3. - Switch on light in room 10. - Move to room 5. - Move to room 10. - Switch off light in room 1. - Switch off light in room 4. - Switch off light in room 5. - Switch off light in room 7. Villa #80 The problem cannot be solved. Villa #81 The problem can be solved in 15 steps: - Switch on light in room 3. - Switch on light in room 9. - Move to room 9. - Move to room 3. - Switch on light in room 6. - Move to room 6. - Switch off light in room 3. - Switch on light in room 7. - Switch off light in room 9. - Move to room 7. - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. - Switch off light in room 6. - Switch off light in room 7. Villa #82 The problem cannot be solved. Villa #83 The problem cannot be solved. Villa #84 The problem cannot be solved. Villa #85 The problem cannot be solved. Villa #86 The problem can be solved in 7 steps: - Switch on light in room 10. - Move to room 10. - Switch on light in room 5. - Move to room 5. - Switch off light in room 1. - Move to room 10. - Switch off light in room 5. Villa #87 The problem can be solved in 16 steps: - Switch on light in room 2. - Switch on light in room 6. - Move to room 6. - Move to room 2. - Switch on light in room 5. - Switch on light in room 10. - Move to room 5. - Move to room 10. - Switch on light in room 9. - Move to room 9. - Switch off light in room 5. - Move to room 10. - Switch off light in room 1. - Switch off light in room 2. - Switch off light in room 6. - Switch off light in room 9. Villa #88 The problem can be solved in 9 steps: - Switch on light in room 5. - Switch on light in room 7. - Move to room 7. - Move to room 5. - Switch on light in room 10. - Move to room 10. - Switch off light in room 1. - Switch off light in room 5. - Switch off light in room 7. Villa #89 The problem can be solved in 12 steps: - Switch on light in room 3. - Switch on light in room 10. - Move to room 3. - Move to room 10. - Switch on light in room 4. - Move to room 3. - Move to room 4. - Switch off light in room 1. - Move to room 3. - Move to room 10. - Switch off light in room 3. - Switch off light in room 4. Villa #90 The problem cannot be solved. Villa #91 The problem can be solved in 11 steps: - Switch on light in room 5. - Move to room 5. - Switch on light in room 9. - Move to room 1. - Move to room 9. - Switch on light in room 10. - Move to room 1. - Move to room 10. - Switch off light in room 1. - Switch off light in room 5. - Switch off light in room 9. Villa #92 The problem cannot be solved. Villa #93 The problem can be solved in 10 steps: - Switch on light in room 5. - Switch on light in room 6. - Switch on light in room 10. - Move to room 5. - Move to room 10. - Move to room 6. - Switch off light in room 1. - Move to room 10. - Switch off light in room 5. - Switch off light in room 6. Villa #94 The problem can be solved in 12 steps: - Switch on light in room 9. - Move to room 9. - Switch on light in room 3. - Switch on light in room 4. - Switch on light in room 10. - Move to room 3. - Switch off light in room 1. - Switch off light in room 9. - Move to room 4. - Move to room 10. - Switch off light in room 3. - Switch off light in room 4. Villa #95 The problem cannot be solved. Villa #96 The problem can be solved in 9 steps: - Switch on light in room 4. - Switch on light in room 7. - Move to room 7. - Switch off light in room 1. - Switch on light in room 10. - Move to room 4. - Move to room 10. - Switch off light in room 4. - Switch off light in room 7. Villa #97 The problem can be solved in 19 steps: - Switch on light in room 6. - Move to room 6. - Switch on light in room 5. - Move to room 1. - Switch on light in room 8. - Switch on light in room 9. - Move to room 5. - Switch on light in room 7. - Move to room 8. - Switch off light in room 1. - Move to room 9. - Switch off light in room 8. - Move to room 7. - Switch on light in room 10. - Move to room 10. - Switch off light in room 5. - Switch off light in room 6. - Switch off light in room 7. - Switch off light in room 9. Villa #98 The problem cannot be solved. Villa #99 The problem can be solved in 12 steps: - Switch on light in room 3. - Switch on light in room 6. - Move to room 6. - Move to room 3. - Switch off light in room 1. - Switch on light in room 9. - Switch on light in room 10. - Move to room 9. - Move to room 10. - Switch off light in room 3. - Switch off light in room 6. - Switch off light in room 9. Villa #100 The problem can be solved in 13 steps: - Switch on light in room 8. - Move to room 8. - Switch on light in room 2. - Move to room 1. - Switch on light in room 6. - Move to room 6. - Move to room 2. - Switch off light in room 1. - Switch off light in room 6. - Switch off light in room 8. - Switch on light in room 10. - Move to room 10. - Switch off light in room 2.