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

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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
stdout
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.