[Question]
  [
Given a \$2\times N\$ maze, determine if you can get from the start top left corner to end bottom right corner using only up, down, left, and right moves.
## Input
A \$2\times N\$ block (\$1 \le N \le 100\$) of your choice of two distinct characters, one representing walls and the other representing empty tiles that can be moved through. You may use any reasonable input format, ex. one string with newline, two strings, or two lists of characters, or a binary matrix.
It is guaranteed the start and end positions are empty tiles.
## Output
Truthy or Falsey value indicating if the maze is solvable.
## Examples
In these test cases, `x` represents wall and `.` represents empty tile.
### True cases
```
.
.
```
```
..
x.
```
```
.x
..
```
```
...
...
```
```
..x
x..
```
```
....
..x.
```
```
.x...x...
...x...x.
```
```
...xx.....x
xx.....xx..
```
### False cases
```
.x
x.
```
```
.x.
.x.
```
```
.xx
xx.
```
```
.xxx.
..x..
```
```
..x.
xxx.
```
```
.xx.x..
..xx...
```
```
.....x.x.
xxx.x....
```
```
....xx.xxx
.....xxx..
```
  
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 8 [bytes](https://github.com/abrudz/SBCS)
```
∧/⍲⌿2∨/⎕
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qKM9DUgs13/Uu@lRz36jRx0r9B/1TQWJ/@dUDykqTVVITixOLVbn4kzjetS7ykDBAMxqm6gBZGpqGAIJhIChJlgUSQVIDYRCFjQEa0RXCVOLZiZECkZDjUMWRjPFEC4HtwpFQAFqNRenultiTjGKB2G@wHCCpgamu2BGowrCVBsoYHrREBJk2HTBlGugeAE9gKDKkM1BeA5DMUzeEBoxSMJQt1U/6p1X@6h3cbUBkFzDpVfBVaEHJGEYyIXQIBIoBCG5KqCiMBEgBaL1QJJQaZAQRAzEARoEkQYpBQA "APL (Dyalog Unicode) – Try It Online")
Takes input from stdin as a 2-row boolean matrix, where 1 is a wall and 0 is a space. Prints 1 for true, 0 for false (which are the only truthy/falsy values in APL).
### How it works
Given a maze (1=wall, 0=space)
```
0 0 1 0 0 0 1
1 0 0 1 1 0 0
```
Think of putting a bar between every two horizontally adjacent cells, where at least one side must be a wall (1):
```
0   0 | 1 | 0   0   0 | 1
1 | 0   0 | 1 | 1 | 0   0
          ^
```
Then the maze has a solution if and only if no two bars align vertically, as pointed above.
```
∧/⍲⌿2∨/⎕
       ⎕  ⍝ Take input from stdin
    2∨/   ⍝ Compute the "bars" in the above diagram,
          ⍝ by ORing every two horizontally adjacent bits
  ⍲⌿      ⍝ Compute NAND of the two bars vertically;
          ⍝ each column is passable unless both rows are 1
∧/        ⍝ Reduce by AND; check if all columns are passable
```
[Answer]
# [Python 2](https://docs.python.org/2/), 26 bytes
```
lambda m,n:m&(n/2|n|2*n)<1
```
[Try it online!](https://tio.run/##VU7bbsMgDH3nK/y0wBQxNY/V@JNKFUkTNVNxIkJUT8q/Z4bAqgoZn4t9YP4N9wmbfTCX/WFde7Pgajy7D4lfzYZb84nq@7Tf@gHCdMXVyUWdBfg@rB5hxCCrSv9MI8oleBl5Z0xFlVIwTB46HoFF1Y0S4nkfHz2ceNsab5/XEec1SCWgfacOTHnLMsUXbZnOnh@BQfIv1a4FHy2Ib4pA/xexmHAi0dc6lcidDhRhms4gbdGRWCq5sdMRliMpq0Up6dHMNumiRUKU7Tj6Bw "Python 2 – Try It Online")
Takes inputs as numbers representing bit sequences, which the challenge author okayed. Though I realized this representation is kind-of suspect because leading zeroes are ambiguous.
The idea is to check whether any 1 in the top number (x symbol in the top line) corresponds to a 1 in any of the three adjacent positions in the below number. We do this by "smearing" each bit the bottom number `n` in three positions as `n/2|n|2*n`, or-ing the number with its left and right shift.
It would also work to do `(m|m*2)&(n|n*2)<1`, but precedence means more parens are needed.
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~29~~ 28 bytes
```
->t,b{"#{t+2*b}"!~/45|54|6/}
```
[Try it online!](https://tio.run/##RU/RDoIwDHzfV@B8mCKWSMA3/RFCDBiNJBIJzqRmm78@t7Hqw9Lr9e7aTa/uba8Huz3KrFN8qeSmSDvDF5@8rHRV6n1ubJ0wDgx45gownAEyiIwbEUQ3JdbTpAUIj8WKpEHfBVsEZMffGmciGGQR4hxPe91Z/5nnWQynYwBJFDYR7Xv0XwnY57EGLu35pvSgx@RapwM8x3svYWhHpXvdg5xWAlBkYleINcjHqTeNsV8 "Ruby – Try It Online")
Takes input as two integers, `t` and `b`, each representing a row of the maze, with digits `1` representing empty tiles and `2` representing walls. Returns `false` if `t+2*b` contains the digits `45` or `54` (two walls touch diagonally) or `6` (two walls touch vertically). Returns `true` otherwise.
It's possible to get down to 22 bytes by porting [@xnor's very elegant Python 2 answer](https://codegolf.stackexchange.com/a/206962/92901):
[Try it online!](https://tio.run/##RU/RDoIwDHzvVxAeHBCswjP6I4QYZiQukUhwJjWMb5/bWPVh6fV6d@3mt/zY4WT3Z13KRe8yeaiNNHUh86ZabZtAioBp6QoCbYAAI@NGDMlNmfU0axHDg1iJNeS7YIuA7fRb40wMgyxC2uJ5rzvrP/M8xHA@BolFYRPTvif/lYB9HnR466/3xYxmSoa2GPE1PZTGsZ8Wo4xCPWcCSZTiWIkc9fOisjpfu9V@AQ "Ruby – Try It Online")
[Answer]
# Regex ([POSIX ERE](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions) / [RE2](https://en.wikipedia.org/wiki/RE2_(software)) or better), ~~13~~ 10 bytes
```
x(|
|.
.)x
```
[Try it online!](https://tio.run/##jVTdbtowFL7PU5yCVGygEaHSLqB06g/bLrpOaqnUiSGUJQasBSdyEuF25XYPsEfci7BjO9CEbt0iJbbP@c453/lsJ0iSoyDyxXxT5yKI8pDBSZqFPHYXp86zicdpJpm/LNskmzNVhSGIi/mfbKdOsPAlTJPxBAZwUztfrb59Pc4/PzzcjxZvVguyUeTJeXIdl6oN3ffW2tBMBtOk5fUdLjJY@lwQ6nx3AB/DY5rZ8SJeJjxiYd@4kjFWj5ggCT3yJoOOtfIZEAQHCCWHlag2JG24Gb6fDu9Hw@vL4SU8meX1p9u7c0pNtC2qn1mSZympXcR5FIKIMwhsGs0kj7BbphLJ0pTHwsUOUFYmJe3v4iXLcinAs5a1HRDV61nNgAus4LXt2LX@WSyBaA0esR2LnrMs4oIRswi4KAI82keQR0uMdeePFNCpd4M0vohGic9sJXnGiA12gymyIHSbzE35I9NLz3QS51kpUue1sHFnAoeHsFscDBr1RpnCFn7wGvUuxZBC3qGUsezBLQtiEYJGw5KjqGJe0vRZy3W1EgqF@49HrtJF/wUdW7Zww8FAR73gcIXFUwhj0dBHEDXErBo4zxb/waWqekXt7p7a3VfV1o@5TU0Zr1LsjehVky79KIoDgoSax9ACby9kd3K4Pjn8BHE4tFr7u2OOJiYec5OmM9mq1x3zSf81qLeDev@CdjVUK1FFVRUzeNOORXf20HZ3zA1mwYurrKPb0GnD9d3VFU7owcDe5Y9no4sP8BZq8OvHT3jnRymrQa9YjmTOan8RfSYZIzptyW4Zr53ShcbfzHpTN5kg8FOWOg7@1/DjOkoPSs/wdc2LH4V2a9Emi3Fd8zrFqKxf6bkJKCYmsG6b2BVTRR3XKZIZvJkoW8GWRT5bu7EV@S0TV20BppQ16pVShX9b/CwMeYY/OT8q8bA9mCq/AQ "C++ (clang) – Try It Online") - POSIX ERE  
[Try it on regex101](https://regex101.com/r/2wI6jW/8) - RE2  
[Try it online!](https://tio.run/##VVDNThsxEL77KaaKhD0QhiAhDkSm4gAP0PaW7sHZmGC6613ZDjg0vfYB@oh9kWB7d1F7mL9vZr5v7Gf1onztTB/OfW822rWd/aH3RyetfoUvensfeyHe5O3F6TGKAzsQI4zH04s3pNB9Dc7YrUDyjam1uJ6fXyGyx86BMHKxBKFAgtNq0xirBSJ8kmB3TbMEIy/xJ5iTkz4xBIFL6HfBBycUMgDzmFap0XYbnqRcwOEAiuon5e6CWKCUfMYR6s4GY3c6za//k/ng4t8tP1tnwjYNiORuoV0tKmpVelSc77EgpXTday5SWO0rJKdftPOJjJ47YwXniChWKyJS1TyHdVVNvaSSNSZR@Pv7D3A4A@EoaB9Ei/AZ@INqvOZwA/yb2@nEx34dZ5BzqJXXnrH0tckRiznEnCWjYsnFhA9IhoYZomJsjHHox5yXhTEpizMoF3yIxVGH2EhW5ksSB4VBNt0z4QUb@YdLKE4DRWoAcxXj2J/E7zYbE0xnVfPPHcMbiso7 "JavaScript (SpiderMonkey) – Try It Online") - ECMAScript  
[Try it online!](https://tio.run/##bVBBboMwELz7FStjCRDFotcgpFSVeuuttyhSUeIES8akhihWEq59QJ/Yj9C1TdIeerC9Ozs7M3DoTsL0jVBqYqZaGbEXdr1YaHFKlvFkkyu5csJTO8XLB/rctQepxJamJTtXRbnrjKg3TcIUSA1M6sNxSC8EQO4Sdk4vJyMHkTddP4zIfyzhF4Bcd2iipBbAlF8B1MnFB1AKeWcQXRVr30c0Bac6glC9CMQid4v6qFSYAbC2orQEzIRzjelwnKsBdQquhN4PjUOyDPmshaxyBkyvM5z7l75rOpaODlVQ9rL/R6bw/fkFLPFhDH@th00j@oS1KcrHLzXmjENcbN/MEbuU3j8BEwQXNY5TBG4Om7oXPSH4s/HixLrHugoP9wcvi3hAHBQ4nPtD5teGuXW1X5gLvxiBj3Y3s7MPJ7OY5/vCBodgi3luuMdm/ZCE2xvBWwXQddbO85v503YrB9npWv3JEb7Bu/wA "PowerShell – Try It Online") - .NET
The problem statement didn't say anywhere that there specifically had to be \$2\$ rows and \$N\$ columns rather than \$2\$ columns and \$N\$ rows, or that the input can't be taken in transposed form.
So here is a solution that works on virtually any regex engine. Like [A username's answer](https://codegolf.stackexchange.com/a/223020/17216), this matches iff the maze is ***not* solvable**. The wall character is `x`, and empty tiles can be represented by any other character.
# Regex ([POSIX ERE](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions) / [RE2](https://en.wikipedia.org/wiki/RE2_(software)) or better), ~~33~~ ~~30~~ 27 bytes
```
^((''
|^)(('.
)*|(.'
)*))*$
```
[Try it online!](https://tio.run/##jVTdbtowFL7PUxxgamygEaHSLqBp1R@2XXSd1FKpE6UoSwxYC0nkJCLtyu0eYI@4F2HHdqAJ7boFhWMff9853zm248Xxvhe44Wzd4KEXZD6DwyT1eWTNj4xnF4@SVDB3UfYJNmN5FYYgHs5e8x0Z3twVMIlHY3Dgqn66XH7/dpB9fXi4Hc7fL@dkfU@Iadae7ilaq0abT8Qy0VDafLemu/B6G5qxM4lbdt/gYQoLl4eEGj8MwEcJm6TankWLmAfM76uleIRyAhaSmO7bY6ejvXwKBMEeQslehdWGuA1Xg4@Twe1wcHk@OIcnNb38cn1zSqli66TymcZZmpD6WZQFPoRRCp4OI5VkAZbP8liwJOFRaGEF2GcmBO1v@YKlmQjB1p6VNojq9XQTgYeYwW5r29Xr00gAkT14xHI0esbSgIeMqInHw4Jg0z6CbFpSLCt/pICLcnuIeReaJT3TpeApI5pseRNUQegmmJXwRyantqokytISU8bVsFFnDHt7sJ3UHLNhliVs4LW3pHcpUor2DoSIRA@umReFPkg0LDg2NZyVevrcy1U1EzYK9x/PYKWK/gs5Om2xDDVHsl5ouMDkCfhRaMojiD3EqBI4S@f/oaXa9Uq3uzvd7r7Zbfmo69UU0TLB2oicNenCDYLIIyioeQAtsHco25PD5cnhh4hD02rt7o46mhh4xFWYznjTve6Ijx3HtMxj8840e1tf/y26vaXbr9Dtf9G7km7WzCqo2lgFV1Ur8F1nB603UV105r248ZLdhk4bLm8uLnBAa46@8p9Phmef4Bjq8PvnLxiKjNWhV8w@uEHC6n/Zm6lgjMiwJb9WvDJK9x6/Rqt1QwUGz01YYhgW/gzLMnJpcjnC11Iv/uXo1x7p0hjLUq9R2Fyv53KsCMVAERta9jZZXuSxjCKYwqtBrjPotKhn41e@Ir5WYuUbgEqlnXKW58X6JvmJ7/MUv4VuUNKha1BZ/gA "C++ (clang) – Try It Online") - POSIX ERE  
[Try it on regex101](https://regex101.com/r/2wI6jW/23) - RE2  
[Try it online!](https://tio.run/##VZDBbhMxEIbvfoohQbUnTd0gIQ5ELuoBHgC4hVRyNt7UZde7sp3WKeHKA/CIvEgYezcVaDU7M79n5hv7QT/qUHnbx6vQ263xbee@m8PJK2ee4LPZfUy9EM/q5np2uhOCc3a8Q/KS4ewoJCeHOHt9ml0/o4zdl@it2wmUobGVEe/mV28Rl1CDggDqBlZSyrCWre5FlfNKqYmcwAeY8Am8hwpZ3XkQVi2WIDR1eaO3jXVGIMIrBW7fNEuw6g3@AHtx0RMtCgL0@xiiFxoZgK2pVTbG7eK9Ugs4HkHL6l772ygWqBSfcoSqc9G6vaH6zX@Yl1n8m@OXmzywpQLR5nXb1WJYXqT5AYtSUt895YTc6rBG6c2j8YGGyYfOOno0RBSrmtab12KD67NOBIRLyJ4wZy78@fUbOOnCy2hCFC3SA/Gvfm84vRH/pJtgaCT7eZpCVqHSwQTGJH1MSpaySzkik8Xol0gflCwNNVIWY6NPw3nKcWkYg9I4hQJ@gaWRI9k4rNSXIA2EAUv7nPWijfOHTWQ6FxTUIOYspfH8DL/dbm20ndPNP3sMdyiUvw "JavaScript (SpiderMonkey) – Try It Online") - ECMAScript  
[Try it online!](https://tio.run/##bU9BTsMwELz7FSvXkm1KrHIligRC4saNGxQRtQuJ5DrFSVULyJUH8EQ@UtZ2ChxQ5Ox6dnZmvO326PsGrT0IX915fMawPD93uFcX8vCglJTs/UFTNUyfvCsjqWh9Ig7y4pRfdZtta3HNdSleq0X51HmsV40SFloHonXb3aDfGED7pMSrftv7dsCi6fphJP5ZCb8AFK4jV9s6BGHTCpBOgS/AORSdJ/RusUz3GdcQVUdA22MmLoq46HbW5hmA2FScl0CZaO4oHY0LO5DOwlh0z0MTkfmc@GID8yoaCLec0zxV/uj4WEY6VFk5yf4fmcPXxycIlcJ4c1MPqwZ7pcSm8Li19Qr5veGnXHKtyVDe@h3KnJ9u1zVVOWr@8yjKlH3tOB5mEOmwqnvsGTP0MWNYiCXEjo5Jh36B8IxEKHOMSYdNNeR5iH1amJq0OIMU5scsTD6GTWKJn5qQHbIt5TniCZv0cxITjoRklcF4C2GaH80v1@t2aDtX2z858huSyzc "PowerShell – Try It Online") - .NET
This is version that matches **solvable** mazes and doesn't match unsolvable mazes. It was interesting to implement in a regex flavor that has no negative lookahead. The way it works is pretty much like actually walking through the maze and solving it.
The empty tile character is `'`, and walls can be represented by any other character. The input given to this regex must not begin with a newline, and must end with a single newline.
The version of POSIX ERE on TIO treats newlines incorrectly in this version, even though with `REG_NEWLINE` not set, newline is supposed to be treated like any normal character. So in the ERE test harness, I made it use `!` as a line separator instead of newline. But when tested locally on my machine, it works with actual newlines.
# Regex ([GNU ERE](https://www.regular-expressions.info/gnu.html#ere) or better), ~~29~~ 24 bytes
```
^((''
|^)(.?'.?
)?\3*)*$
```
[Try it online!](https://tio.run/##jVTdbtowFL7PUxxgahygEaHSLqAp6g/bLrpOaqnUCSjKggFrwYmcRKRdud0D7BH3IuzYDjShXbegYJ/j7zvnO8d2/Cg69AOPzzc1xv0gnVI4jpMpC@3FifHsYmGcCOotiz5B5zQrwxDE@Pw134nhLzwBk2g4Bheuq2er1fdvR@nXh4e7weL9akE294SYZuXp3iJ2z7R7Fas3Oqpb9Xcbax9bbUI9cidRw@kajCew9BgnlvHDAHyUqkmix/NwGbGATrtqKRqiloByElmHzthtaS@bAUGwj1ByUGI1IWrCdf/jpH836F9d9C/gSZlXX25uzyxLsXVS@cyiNIlJ9TxMgynwMAFfh5FK0gBrp1kkaByzkNtYATaZCmF1d3xBk1RwcLRnrQdEdTq6g8A4ZnCaemzr9VkogMgePGI5Gj2nScA4JcrwGc8JjtVFkGMVFMvKHy3ARbk3xBxxs6BnthIsoUSTbX@CKoi1DWbH7JFK01GVhGlSYMq4GjZsjeHgAHZGxTVrZlHCFl55S3rbQkre3r4QoejADfVDPgWJhiXDpvJ5oafPvVyXM2GjcP/xAJaq6L6Qo9Pmy1BxJeuFhktMHsM05KY8gthDjCqB82TxH1rKXS91u73X7fab3ZaPult1Ea5irI1Iq24tvSAIfYKC6kfQAGePsjs5TJ4cdow4HBqN/d1RRxMDD5kK0xpvu9cesrHrmrbZM0em2dn5um/RnR3deYXu/IvelnSzYpZB5cYquKpagUetPbTeRHXRqf/ixkt2E1pNuLq9vMSJVXH1lf98Ojj/BD2owu@fv2AgUlqFTm598IKYVv@yNzNBKZFhC36teG0U7j1@jdabmgoMvhfT2DBs/Bm2bWRyyOQMX1u9@JehX3ukS2NsW71GPmZ6PZNzRcgniljTsnfJsjyPbeTBFF5NMp1Bp0U9W7/y5fG1EjvbAlQq7ZRWluXr2@Sn0ylL8FvoBQUdugaV5Q8 "C++ (clang) – Try It Online") - GNU implementation of POSIX ERE, old version  
[Try it on regex101](https://regex101.com/r/2wI6jW/24) - ECMAScript  
[Try it online!](https://tio.run/##VZDBbtswDIbvegouGSoxTdkMG3ZYoAY9bA@w7ZamgOIoqTpbNiSlVbr2ugfYI@5FMkl2ig0GTfIXyY/SvXpQvnKmCxe@Mxvtmtb@0Iejk1Y/wle9@xw7IZ7k1eXkeCsE5@z5FgUtOC0YLm7eT3Dy9ji5fEIK7bfgjN0JJF@bSouP04sPiHPYggQP8gqWRORX1KhOVDmvpBzRCBYw4iP4BBWybetAGDmbg1Cpy2m1qY3VAhHeSLD7up6Dke/wJ5izsy7RgkiAbh98cEIhAzDb1Eq1trtwJ@UMnp9BUXWn3HUQM5SSjzlC1dpg7F6n@vV/mNdZ/Mby83Ue2KQC0eR1m@WsX17E6QGLUlLXPuYkueVhheT0g3Y@DaP71tj0Yogoltu03nQr1rg66YmAcA7ZJ8yJC39@/QaedOEoaB9Eg@mB@He31zy9Ef@iaq/TSPZyHENWoVJee8YofYyIxexijpJRsfSLSe@VLPU1RMXY4GN/HnNcGoagNI6hgF9hceAQG4aV@hLEntBj0z4nvWjD/H4TiqeCgurFnMU4nJ/g15uNCaa1qv5nj/4OhfIX "JavaScript (SpiderMonkey) – Try It Online") - ECMAScript  
[Try it online!](https://tio.run/##bU/BTuMwEL37K0auJduUWF1xI4oKQuLGbW9QtFE7kEiuU5xUtWBz5QP4xP2R7thOgQOKnBm/efPe8647oO8btPYofHXv8RnD6vLS4UFdyeOjUlKyv49amaU0S6aXDxdn@kwc5dU5v@m2u9bihutSvFaL8qnzWK8bJSy0DkTrdvtBvzGA9kmJV/128O2ARdP1w0j8XyV8AVC4jixt6xCETStAOgW@AOdQdJ7Q@8Uq3WdcQ1QdAW2Pmbgo4qLbW5tnAGJbcV4CZaK5o3Q0LuxAOgtj0T0PTUTmc@KLLcyraCDcak7zVPkfx8cy0qHKykn258gc/r1/gFApjDd39bBusFdKbAuPO1uvkT8Yfs4l15oM5W@/R5nz0@22pipHzT8fRZmyrx3H4wwiHdZ1jz1jhj5mDAuxhNjRMenQLxCekQhljjHpsKmGPA@xTwtTkxZnkMJ8moXJx7BJLPFTE7JDtqU8Jzxhk35OYsKJkKwyGG8hTPOT@fVm0w5t52r7LUd@Q3L5Dw "PowerShell – Try It Online") - .NET
The addition of backreferences allows for a more compact regex. But there doesn't seem to be a clear-cut standard that includes backreferences without lookaheads. The closest appears to be GNU ERE, used by egrep and sed `-E`, but there doesn't seem to be any library interface for it, and neither of those utilities support matching raw newlines.
The version of GNU libc on TIO enables backreferences in ERE, but with an up-to-date version of the libraries, they're only enabled in BRE, not ERE. The version on TIO has the newline bug, though, so same workaround for newlines is used in the TIO test harness.
The empty tile character is `'`, and walls can be represented by any other character. Matches iff the maze is **solvable**. The input given to this regex must not begin with a newline, and must end with a single newline.
# Regex ([ECMAScript](https://262.ecma-international.org/5.1/#sec-15.10) or better + `/s` flag), 17 bytes
```
^(?!.*x(|
|.
.)x)
```
[Try it on regex101](https://regex101.com/r/2wI6jW/10) - ECMAScript 2018  
[Try it online!](https://tio.run/##bVFLbtswEN3rFGMYCMlWGdjbCEqQRQt023bnqggjMQ4DmlJJKmbgeNsD9Ii9iDuk5CKLLIYzfPN5b8gn@Sx96/QQLm3fqZOuV5Ws7WhM5eqvavspDvxbcNpu0cn93eknv1ngh8hfi1csUERxukNvdKv4urxcixKYZ6Jy6teoneLMKdkZbRUT2FIc1BcblHuQVH/QdhjD1eD6VnmPPnTaHgX2lrPcUZr6@lAAaLi4gDdV/Rhw73Sg6T8scYGu19X7BUZUacADcLnIO4kD3NeGMIAd1MDpuIbdZtXgTg6cx/JFZCRfXb9PF3Kbl0agU8/KecUFPvWaRDIhBN9sEFE2ZXL3TXPOJWGZ5X3d8Pf3H2DwEbjDoHzgOwE3wL67UTG4AvZZGk9PRrtNX0GjjoqgvIpBo@w2PC7qVXoZg@2jdLeBr8SiZksmqMcUR3FaQpoHrfTKFwV9Fh1YxORiisgwGx2R8AlJ0FSDmK2YfZzyMcW5YQ5y4xKy5P9kcebBYh6W63MQJ4aJlvSc8YzN8yclGM8FmWoC0y3GOX8mv@06HXRvpXmjY9ohs/wD "JavaScript (Node.js) – Try It Online") - ECMAScript 2018  
[Try it online!](https://tio.run/##bVBBTsMwELznFYtrKQltrHBtFFGExAlOcENFRO22seQ6JUlVq22uPIAn8pGwttPCgYO969nZmUm21R7rpkSlel7nrzWu0cynU437aBb2b9Htlbg20Sk4iUDEJu7D2YQ9S71W@Cg1Tu6rzVYqXLI444c8zVZVjcWijLgCqYFLvd218TEAkKuIH@LjvpYtJmXVtB3xbzL4BSDRFdkqkgWu3AqQToIfwBgkVU3oazp37xGLwap2gKpBT0wTu6h3SvkZAN/kjGVAmWiuKR2NE9WSTioU6nVbWmQ8Jj7fwDi3BlzPxzR3lb1r1mWWDrlXdrL/R2bw/fkFPHJhavFUtIsSm4hvYpIPX@odhj4tvR4KqmEXs8snUALvorquH4Glw6JosAkC@vF0icDYYmxHR7hDlyHcIxbyHCHcCYZq/NzY3i0MjVscgQtzMTODjwgGMcd3jfEO3pbynHGHDfo@iTBngrPyoH0ZM8zP5nfLpWxlpQv1J4f/BufyAw "PowerShell – Try It Online") - .NET
With negative lookahead it is trivial to modify the 10 byte regex into one that matches iff the maze is **solvable**.
As in the regex it's based on, the wall character is `x`, and empty tiles can be represented by any other character.
Note that the `/s` flag was introduced in ECMAScript 2018 (JavaScript ES9).
# Regex (Perl / Java / PCRE2 / .NET), 29 bytes
```
^(.(?=.*
(\2.|)))+x.*
\2.?.?x
```
[Try it online!](https://tio.run/##lVJBbsIwELz7FatgQdzShSD1ggkREu2xJ46IiEKQLLmBJiC5StNjH9An9iPp2g5pr1XkeHd2Zmci5ZQV@r55eQNeSKj0cbfVwEeS2ni2XKwW85odjkXIVTyWs7mkOxIVqAMhojoVKj9DsM4DWQPXEEN5eS7PRE@Hd9EwEtmrHULyBx/TRMAUeCoZgN/Ata3VAUJa0u93bE3sSOTZoDcQFTGAVDGlIMHkv2bQhSVxIH1crtFqkCDp9ntSaHPEHzDixUiJJIDvzy943OoyC6a@WRWXLBBWU7M6TR@elmnabEIMkxhvWLie4LsQ4tZQQ3WCiWmanlPBbltmJWNID0Nkxl7GVnTQHXoZwj1iIc9BdIe1t/FzY2snaAsn7Pm4nZlpfZC1yxzfFcY7eFvKc8Ud1u73SdBcCc7Kg7Yzpp1fzRf7vTqrY04/028O/w3O5Qc "Perl 5 – Try It Online") - Perl  
[Try it on regex101](https://regex101.com/r/HCrbRP/4) - PCRE2  
[Try it online!](https://tio.run/##bY/BTsMwDIbveQori9SG0ajsuKnaEBI3btzGENWW0UghHWmnRRu98gA8Ii9SnKQbHFCVxP7925@7qw/SNpXUume2WFr5Kt1qOjXykC6S/jkV6bwQVyR9mogPzvnYYYLxXMxdnyyu6V39tlNabiifsWORz7a1leW6SpkGZYAps9u3/EQA1DZlR346WNXKrKqbtkP/DRZ@FchMjWCtjASmQw/goEy@A6WQ1RbVZb4K@Yhy8GM7kLqR0ZhnvtHstY41QD8UeOVj@mLomOmZT7zkTcHxP53C9@cXsDTMteKhbNeVbBDBcXJyXyIyiWRMH@0eM04v21zgAeU5Hen6EXgjrMtGNoQI/IgQxPnH@QiPCAcvh3pUvBQ9QoRDhtfFuvNxaBiC0DiCsOMF5gaOIMOw4A@Bi4SIxX3OetCG@XET4c6GgIqiz5wb6mf47WajWlWbUv/ZI/5DoPwA "PowerShell – Try It Online") - .NET
This takes the input in the form of \$2\$ rows of \$N\$ columns. The challenge just wouldn't be complete with that submitted only [in .NET flavor](https://codegolf.stackexchange.com/a/223020/17216) and not PCRE as well. Matches iff the maze is ***not* solvable**. The wall character is `x`, and empty tiles can be represented by any other character.
The .NET balanced group method is still shorter (at 27 bytes), as expected.
This solution takes advantage of the fact that the upper-left corner will never be blocked. It would need to be modified otherwise, because it looks for a wall in the top row that has a wall diagonally or orthogonally below it. It starts this search at the second column from the left.
[Answer]
# [Snails](https://github.com/feresum/PMA), 7 bytes
Based on [@xnor](https://codegolf.stackexchange.com/users/20260/xnor)'s observation, this checks if there are `x`s above (`u`), below (`d`) or diagonally from (`y`) another `x`. Returns `0` for solvable mazes a positive integer otherwise. I've wanted to use this language for so long!
```
\xudy\x
```
[Try it online!](https://tio.run/##K85LzMwp/v8/pqI0pTKm4v9/PRCoAEKuigoQBQQA "Snails – Try It Online")
## Explanation
[Snails is a 2D pattern matching language that was created by](https://codegolf.meta.stackexchange.com/a/7199/9365) [@feresum](https://codegolf.stackexchange.com/users/30688/feersum) which is not entirely unlike regex.
In this program, the `\x` matches a literal `x`, then looks above, below or diagonally to it (`udy`) for another literal `x` (`\x`).
[Answer]
# [J](http://jsoftware.com/), 19 17 bytes
```
0=1#.[:,*&#./;._3
```
[Try it online!](https://tio.run/##bZFdq8IwDIbv8yuCk5WJxm1eHKgMRMEr8UK8ExGRjcPhgOAH5N/PNOtQ1zWElqdvk7z0rx6QqbCwaHCMKVrJCeFqt1nXaZFFdLDjURzRdE6nWZ3AdkmoPB9NFzYih48fNH5jgEd5f2BBeLBYXn6viwoNm7iQyxzAETT727M0XindUyCJ5AswUBcRcIBIswNZhKHSSYMCItQEv/d0YMe1qD/44o2V9fn/3vHC0NMGenpryQByM2joSvz36VXrxwxNE7cPdfpQ4G6Yvbb1psv9r5qsMMcfHMqbTCLVbCJrz/UL "J – Try It Online")
-2 thanks to Bubbler for suggesting Max Cubes instead of subarrays.
A port of Bubbler's APL solution saves 1 byte:
```
2 e.[:+/2+./\"1]
```
but it seemed a shame not use J "Max Cubes" here, as the problem seems almost tailor-made for it.
## How
Let's take the example:
```
0 1 1 1 0 0
0 0 0 0 1 0
```
`v;._3` will apply the verb `v` to every 2x2 block. Eg, `<;._3` will produce:
```
┌───┬───┬───┬───┬───┐
│0 1│1 1│1 1│1 0│0 0│
│0 0│0 0│0 0│0 1│1 0│
└───┴───┴───┴───┴───┘
```
In our case, we want a verb that detects "walls" (diagonal or vertical). `*/@:#.` does the job. It converts each row from a binary number into an integer `#.`, and then multiplies the resulting 2 integers together `*/@:`. This result will always be `0` if there is no wall.
So now we can just sum all of the results `1#.` and check if the result is 0 `0=`. If it is, there are no walls and we can get through. Otherwise, we're blocked.
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~10~~ ~~9~~ 7 bytes
```
4&1ZI2<
```
Input is a binary matrix, with `1` for `.` and `0` for `x`.
Output is an array of ones (which is truthy) if the maze is solvable, or an array containing at least a zero (which is falsey) if not solvable.
[Try it online!](https://tio.run/##y00syfn/30TNMMrTyOb//2hDBRA0AEJDODSwRheA8GIB) Or [verify all test cases including check for truthyness or falsiness](https://tio.run/##bZA9D8IgEIZ3fsUt2hWMGyYuLiaOTjZNJLZaIrakUJMO/nakAgUSWe7uvee@eDEtzBX8W8Gp7yX072YAJgTwTo5ame2aXI6bndlHjt9Bz6Q1bQNKs9sTuAI9jLqdUOFsYUE5qtYyNqf0wLsH@sQmjVANKu5MKIv@Y6uE7ep5KKBD1GqupGATOueYsDeYklAgFSoJWAd7F1stqLNOkhD/sJgN@aXWicHSPFww5wd1aZwJySBM0wE0mxcKQxgIki2K3YE56RGarxNP80BaG1dMsJDB/usS2e/wBQ).
# Explanation
### Solvability is equivalent to full connectedness of all non-wall tiles
The maze is solvable if and only if all non-wall tiles are connected to each other using 4-neighbourhood.
**Proof**
*All connected ⇒ solvable*: this is clear.
*Solvable ⇒ all connected*. Let the maze be
```
A ··· SUWY
B ··· TVXZ
```
This maze is solvable by assumption. Consider its rightmost square of size 2:
```
WY
XZ
```
There are two ways that `Z` can be connected to the input:
* Through tiles `W` and `Y`: this means that `W` and `Y` are non-wall. They are connected to `Z`. If `X` is non-wall it is connected to `W`, `Y` and `Z` too.
* Through tile `X`: this means that `X` is non-wall. It is connected to `Z`. If `W` or `Y` are non-wall they are connected to `X` and `Z` too.
We now proceed from either `W` or `X` to the left, considering the square
```
UW
VX
```
By the same reasoning as above, all non-wall tiles in this square will be connected to each other, and to the tiles from the previous square.
This way we proceed until `A` is reached (which is possible by hypothesis), and all non-wall tiles are connected.
### How the code works
The program checks that the image formed by considering wall tiles as background and non-wall tiles as foreground has a single connected component.
```
4      % Push 4
&1ZI   % Implicit input: binary matrix. Label connected components using
       % 4-neighbourhood. This assigns a different label to each connected
       % component of ones in the input. Labels are positive integers. The
       % result is a matrix of the same size as the input 
2<     % Less than 2? Element-wise. All comparisons will be true if and
       % only if there is a single connected component
       % Implicit diplay
```
[Answer]
# [R](https://www.r-project.org/), 38 bytes
```
function(t,b)all(c(b[-1],T,b,T,b)[!t])
```
[Try it online!](https://tio.run/##K/pfnJ9Tlmr7P600L7kkMz9Po0QnSTMxJ0cjWSMpWtcwVidEJwmENaMVS2I1/ysrhASFulpxleQX2BpyJeWXAEmwCRpAER0gXxMslaxhqGOoCZZP1jAAMXEoAsqBIZSGaUER1MFnAEQephLMQ9iLIgzhYRjEpazg5ugTDPUT2E1EOhzhWEIOhHnGADlQDGBCMK/jNQCm2gDhPFS/4fDdfwA "R – Try It Online")
Checks that the bottom row is 'open' at position x-1, x and x+1 for every 'closed' position in the top row.
How?
* consider matrix of 3 rows:
1. remove first item from bottom row of maze + add `1` at the end
2. bottom row of maze
3. add `1` at the start of the bottom row of maze without last item
* check that all elements are `1` in columns where top row of maze is `0`
Golfing:
* R 'recycles' logical indices, so we don't actually need to make a matrix, we can just list the elements
* no need to remove the last item of the bottom row of maze since it's guaranteed to be true
# [R](https://www.r-project.org/), a different approach, still 38 bytes
```
function(t,b)all(t&t[-1]|b&c(b[-1],1))
```
[Try it online!](https://tio.run/##K/pfnJ9Tlmr7P600L7kkMz9Po0QnSTMxJ0ejRK0kWtcwtiZJLVkjCcTSCdHU/K@sEBIU6mrFVZJfYGvIlZRfAiTBJmgARXSAfE2wVLKGoY6hJlg@WcMAxMShCCgHhlAapgVFUAefARB5mEowD2EvijCEh2EQl7KCm6NPMNRPYDcR6XCEYwk5EOYZA@RAMYAJwbyO1wCYagOE81D9hsN3/wE "R – Try It Online")
Completely different approach, but annoyingly the same number of characters.
Checks that it's always possible to move rightwards, either on the top or on the bottom.
How?
`top & top[-1]` = logical AND of each element of `top` with it's neighbour to the right
`|` = logical OR
`bot & bot[-1]` = logical AND of each element of `bot` with it's neighbour to the right
The last element (that has no rightward neighbour) is a problem, because R 'wraps around' the longer vector, so if the last top element is `0` and the first bottom element is `0` then it will fail.
We can fix this by forcing it to evaluate to `TRUE`, which we can do by adding a `1` at the end of the 'chopped-off' bottom row (since we know the last element of the full-length row must be 1).
[Answer]
## Excel, 38 bytes
```
=AND(ISERROR(FIND({12,3,21},A1+2*A2)))
```
Input is 2 strings (1 for each row of the maze), in cells `A1` and `A2`, with `1` for a Wall, and `0` for a space.
First, it adds the first row, and twice the second row together. This will convert each column to base-4 representation of whether it contains no walls (`0`), wall in the top row only (`1`), wall in the bottom row only (`2`), or wall in both rows (`3`)
We then try to `FIND` any examples where there are walls in both rows (`3`), **or** walls in different rows of adjacent columns (`12` or `21`)
If both of these return errors, then there is a clear path
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
+ƝẠƇ
```
[Try it online!](https://tio.run/##NU45DsJADOz9FST/gI/Q06A8YOiAgn0AdSQkWkoUKSBRJCL/2P2I8RVpZz07Ho/3sO@6o8hm6ev7vhSpn9du20495lLHqx763er4aOfvNEzDXNrlKcLERMwEKzCmYIdeUD0Uk8LD7KCsiD6M@0CSGEQGM@W0G5wgImOPfmDVXcvAWM1YDZ4dor2A7Jv5Dw "Jelly – Try It Online")
Takes a list of pairs, where `0` represents a path and `1` represents a wall. Returns a falsy value if the maze is solvable and a truthy value if not.
# [Jelly](https://github.com/DennisMitchell/jelly), 6 bytes
```
ḋ×ṛɗ/Ẹ
```
[Try it online!](https://tio.run/##NU6rEsJADPT5mOUL@BE8hukHBAeYCiSiolOFRTKdFmYQvUHwGbkfOS6Pilw2m93NHfZNcyxFpmvqZO5/3UZeU5H3c7fNpwGppe9N5ns@f5ZxGVObL49SQCACiLWxolqwqg9X3hmlXANYUXT2PSs2QwA3cgSDwm0CA@yRfqd@YOWNi0A/DV4Flu2kTsyxV/Ef "Jelly – Try It Online")
Takes a list of pairs, where `0` represents a wall and `1` represents a path. Returns `1` if the maze is solvable and `0` if not.
[Answer]
# Regex (.NET), ~~35~~ ~~31~~ 27 bytes
```
^(.)* ?#.*
(?>(?<-1>.)*) ?#
```
This had to be done. Checks if the string contains one of the following (uses #s and spaces) :
```
 #
# 
```
```
# 
# 
```
```
# 
 #
```
Matches impassible grids, doesn't match passible ones.
See [Martin Ender's excellent capture group documentation](https://stackoverflow.com/questions/17003799/what-are-regular-expression-balancing-groups/17004406#17004406).
[Try it online!](http://regexstorm.net/tester?p=%5e%28.%29*+%3f%23.*%0d%0a%28%3f%3e%28%3f%3c-1%3e.%29*%29+%3f%23&i=++++%23%23+%23%23%23%0d%0a+++++%23%23%23++&o=m)
Thanks to Deadcode for -9 bytes.
[Answer]
# [Perl 5](https://www.perl.org/) `-p0`, 67 bytes
```
$x=$_;$_=!grep{$b=$_-1;$x=~/^.{$b,$_}x.*?\n.{$b,$_}x/gm}1...5*y///c
```
[Try it online!](https://tio.run/##K0gtyjH9/1@lwlYl3lol3lYxvSi1oFolCcjVNbQGCtfpx@kB@Toq8bUVelr2MXlwnn56bq2hnp6eqValvr5@8v//enoVelwVFXp6//ILSjLz84r/6/qa6hkYGvzXLTAAAA "Perl 5 – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~26~~ 23 bytes
```
⭆⪫Ｅ²Ｓ¶⎇⁼ι.ψι←¤-Ｊ⁰¦⁰Ｔ¹¦¹
```
[Try it online!](https://tio.run/##NYnBCoMwEETvfkXIaQMxaI/13IJSoVCPvQSx7UJM0jRK/Pp0pXQu783M@NJhdNrkfA1oI9wi4dlrD51DC7scJGutX@LvAiEk43fLCcMUrA4bnN6LNh9AOtS@b5KhEKIperdOcLxMj0jljMYALzlpt8x@cFBJVlEbAs5QS1aLJmelVEpqTyr@Qsjlar4 "Charcoal – Try It Online") Link is to verbose version of code. Takes two strings of `.`s and `x`s as input (actually any character other than space or `.` would work) and outputs `-` if the maze can be solved or a blank space if it cannot. Edit: Saved 3 bytes because I had misread the question. Explanation:
```
⭆⪫Ｅ²Ｓ¶⎇⁼ι.ψι
```
Print the input, but change all the `.`s to null bytes, since Charcoal knows how to fill those.
```
←
```
Move to the end position.
```
¤-
```
Flood fill the null bytes with `-`s (chosen because this is Charcoal's default output character for a Boolean true value, but any character other than space would work).
```
Ｊ⁰¦⁰
```
Jump back to the start position.
```
Ｔ¹¦¹
```
Delete everything other than the start position, which is now `-` if the maze could be solved, or blank if it could not be solved.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 54 bytes
```
Max@MorphologicalComponents[#,CornerNeighbors->1<0]<2&
```
[Try it online!](https://tio.run/##dVFBC4MgGL3vV0iDnRzYzm0Mgt0aO@wWHdywDEpDHWxEv91FqRXZReW9773v@541VpTUWJVvrHNwBjrB32vCRUN5xYserWJeN5wRpmS6hzEXjIg7KQv64kIeL2GEsuh00LuHKJlKg6f4KPoDMZZEBplB87Rtww6C/uiyBQgHGME1gYZ6D2E042NNImPoV05ab8@xxN6uzZwYRDu77g1X0rutm8PXZDT2k0a3QU5qM5QvARvqtosVOye7sTcyU770dZlsiWwVcl85I6bZ9R8 "Wolfram Language (Mathematica) – Try It Online")
Credit for this idea goes to [this answer by alephalpha](https://codegolf.stackexchange.com/a/154374/15469) from a couple years ago, where it used in a different context.
The core insight here is that -- if the maze can be solved -- then the "spaces" form a single contiguous morphological chunk. And Wolfram has a built-in for detecting that.
[Answer]
# [Io](http://iolanguage.org/), 90 bytes
```
method(x,y,x map(i,v,v>0and(list(i-1,i,i+1)map(c,y at(c abs))detect(>0)))reduce(or)!=true)
```
[Try it online!](https://tio.run/##tVOxbsIwEN3zFQeTT1yleK1kpC6IgamlAxJLmhjVEiQoGARfH4gA67Bjb2wXv@f3Xu7Opuk28KlgDd1O2/@mEme60Bl2xV4YOtFpmhd1JbbmYIX5kGTITCT2aEkXKKwoofg7IFba6tKKaY6Ira6OpRZNiyNl26PGbqyUWn7/LuerWzGGfWtqu62zbHMXzpHgUaADnxiBg2VfDzGkE4gxuMzzM8KT3C6lF0jG87kLvPbyhLSEs3xlh8kHUHf4poxZP@bZ1@InMmWvtdEUzDPF8/82ygtU83QnvBhMIu7AJH0f1szEJjGJYXNvpGktfkd67yOghb0I1wIpg/iqd1c "Io – Try It Online")
# [Io](http://iolanguage.org/), 98 bytes
Port of Bubbler's APL solution.
```
method(x,(o :=x map(o,o slice(0,-1)map(i,v,v+o at(i+1))))at(0)map(i,v,v*o at(1)at(i))push(0)sum<1)
```
[Try it online!](https://tio.run/##tVOxbsIwEN3zFScmXzFSbkXN0AUxdCowIHVBbSIsJTgiAfH3wQFqLnYSs9RD9HL37t3z6ax0k8E8gW9oirTe619xkUKbyAWKXSm01FDl6icVsZwRtiElz/I81bCrhZoSmmNQ/Ey93VLURhViear2JludinfCZpIkyfprs15uDZhAeVSHOj9EUSZyVdX3T4wSHgDRUjoMCZZELR7mkRUb53HJv99RNnEDYW1PPuTblnHsOPRpQRfUrfHv0pO1wf/1G7XLsfj4XI3thjP4gCPWP8x2pxBgex3iV@bkGGNCoW5M3u3JBh7cQibUb8RZgVcUeSU5b86j9cxoYJlQRjDyZJor "Io – Try It Online")
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/tree/fb4a2ce2bce6660e1a680a74dd61b72c945e6c3b), 7 bytes
Port of @Bubbler's answer.
```
€ü~øP_P
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UdOaw3vqDu8IiA/4/z862kDHQMdQxwAMDWN1oiFsQ4hYbCwA "05AB1E (legacy) – Try It Online")
## Explanation
```
€       Map:
 ü          Apply to pairs:
  ~             OR
   ø    Transpose
    P   Product
     _  NOT
      P Product
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~53~~ 51 bytes
```
or.map(or.foldr1(zipWith(&&))).mapM(\x->[x,tail x])
```
[Try it online!](https://tio.run/##fVBdT4MwFH3nV9wxs9EMTPsDuoQY3Auaxbn4AMQQhUCEQWhVovG3Y1tgo5jYpB/n3HPu7b1ZzN6Soui@nSX47v3u6O48uNnvYen8GCkNu6q5LuPaEldaFa8Nsb7y@innmbVaIYRk7M4KW2cbtDaP8wLaCHWsKj4SKIFCClcgJGCpg9I1WSMEpVHG@YlK7zPU7/zAG/80KsMSnC2wrPoUrsUCI9hswLTBlPeZJj0tpZPAUFiU4AnjLzFLGBiXJ4XAALEcB25d/@ApEJjYtMWO7BFKTKYEkQJNoSw6RZRLV/UyPRfGavcJeqR5iOSGdMNTT/tfBtHZ48PRm358Vl26dGqopFFk/LneoprMXKtUSk3wvH9MLibVjB6WLOmnq9CfRs/zi7pf "Haskell – Try It Online")
The anonymous function takes a list of two lists where True is a wall and False is empty. Returns False if the maze is solvable.
[Answer]
# Prolog, 99 bytes
```
f([[1,_],[_,1]|_]):- !,0=1.
f([[_,1],[1,_]|_]):- !,0=1.
f([[1,1]|_]):- !,0=1.
f([_|T]):-T==[];f(T).
```
[Try it in SWISH](https://swish.swi-prolog.org/p/XsBgCCdu.swinb)
xnor's [comment](https://codegolf.stackexchange.com/questions/206957/solve-a-2xn-maze#comment490697_206957) that the problem statement was equivalent to checking if no 2 x's touched vertically or diagonally helped me a lot here.
---
## Imperfect version (never terminates if false), 66 bytes
```
f([X|T],C):-nth0(C,X,0),(T==[];f(T,C);D is mod(C+1,2),f([X|T],D)).
```
[Try it in SWISH](https://swish.swi-prolog.org/p/LAvitXCu.swinb)
Requires the first input to be a list of length N containing lists of length 2. Empty tiles are denoted by 0, and walls are denoted by anything else (I could also have used characters, I suppose, but this seemed easier). The second input (`C`) is 0 if we're currently at the tile on top, and 1 if we're at the tile on the bottom.
An example query would be:
```
?- f([[0,1],[0,1],[0,0],[1,0],[1,0],[0,0],[0,0],[0,1],[0,1],[0,0],[1,0]],0).
true.
```
However, if the maze is unsolvable, there wouldn't be any output, it'd just keep running.
[Answer]
# JavaScript, 63 bytes
```
n=>k=>!n.filter((e,i)=>e>0&[k[i-1],k[i],k[i+1]].includes(1))[0]
```
Takes input in currying format, each argument being an array of 1s and 0s. Outputs `true` if the maze is solvable and `false` if unsolvable.
]