Will Jimmy fall off his platform?Count the bytes of a programCenter The Text!Analyse your ChairReverse positive runsBuilding a BridgeWill the beam hit?How much will this cost?Will Mario fall into the Shrinking Satellite? (Diagram added)Prime or highest factorPoint out a string character

Why does the Batman "crack his knuckles" in "Batman: Arkham Origins"?

Bypass with wrong cvv of debit card and getting OTP

Platform Event Design when Subscribers are Apex Triggers

What units are kpts?

Will Jimmy fall off his platform?

What happens if the limit of 4 billion files was exceeded in an ext4 partition?

What can a novel do that film and TV cannot?

Is it bad to suddenly introduce another element to your fantasy world a good ways into the story?

Minimizing medical costs with HSA

What are the differences of checking a self-signed certificate vs ignore it?

How to deal with a Murder Hobo Paladin?

how can i make this execution plan more efficient?

Has there ever been a cold war other than between the U.S. and the U.S.S.R.?

Data normalization before or after train-test split?

Machine Learning Golf: Multiplication

Why do we need a bootloader separate than our application program in MCU's?

How to iterate equal values with the standard library?

Does Evolution Sage proliferate Blast Zone when played?

Is it acceptable that I plot a time-series figure with years increasing from right to left?

Recursive conversion from ExpandoObject to Dictionary<string, object>

What is the name of the technique when an element is repeated at different scales?

What does the ash content of broken wheat really mean?

What is this arch-and-tower near a road?

How frequently do Russian people still refer to others by their patronymic (отчество)?



Will Jimmy fall off his platform?


Count the bytes of a programCenter The Text!Analyse your ChairReverse positive runsBuilding a BridgeWill the beam hit?How much will this cost?Will Mario fall into the Shrinking Satellite? (Diagram added)Prime or highest factorPoint out a string character






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6












$begingroup$


Backstory



Meet my friend Jimmy:



/o


Jimmy is a little character who likes to stand on platforms. Here's Jimmy safely standing on a platform:



 /o
-------------


Now, Jimmy has a good sense of balance, so he can safely stand with one leg off of the platform, like so:



 /o
-------------------


Although if he stands with two or more body parts off of the platform, he will fall. Both of these are examples where Jimmy will fall:



/o /o
---------- ----------------------


The challenge



Your challenge is to write a program to determine, given a string with Jimmy's platform and position, if Jimmy can stand on the platform without falling off.




  • Input: Two lines showing Jimmy's position and the position of the platform under him. This can be from two separate inputs, a single input, or an array of some sort.



    1. You may take input through any reasonable form, includings functions and standard input. Only resort to hard-coding if your language does not support the other input methods.



  • Output: The boolean values true and false, or the integers 1 or 0 to represent true/false respectively.



    1. The boolean value is based off of whether Jimmy can stay on the platform or not - true if Jimmy can stay on the platform, or false if he will fall off.



  • The platform size is arbitrary and can be changed at will. Your program should account for that.



    1. The platform cannot be a length of zero, and the platform must be complete (no holes in the platform).


    2. Remember that Jimmy falls off when two of his body parts are hanging off the platform. A body part is one ASCII character of his body.


    3. Trailing whitespace at the end of the platform is not required, but your program should account for both situations, where there is whitespace after the platform and where there is not.



  • Be mindful of the standard loopholes that are forbidden.


Test cases



 /o ✔️ TRUE
-------------

/o ✔️ TRUE
----------

/o ❌ FALSE
------------------

/o ❌ FALSE
-------

/o ❌ FALSE
-


Scoring



This is code-golf, so lowest byte count wins.



Leaderboard



You can view the leaderboard for this post by expanding the widget/snippet below. In order for your post to be included in the rankings, you need a header (# header text) with the following info:



  • The name of the language (end it with a comma , or dash -), followed by...


  • The byte count, as the last number to appear in your header.


For example, JavaScript (ES6), 72 bytes is valid, but Fortran, 143 bytes (8-bit) is invalid because the byte count is not the last number in the header (your answer will be recognized as 8 bytes - don't take advantage of this).






<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github --> <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=187586" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,bodymargin:0;padding:0;height:100%;overflow:hidden</style>












share|improve this question











$endgroup$











  • $begingroup$
    Can we assume trailing whitespace after Jimmy? Also if you’re allowing arrays of characters, in some languages those will have to be padded with whitespace.
    $endgroup$
    – Nick Kennedy
    7 hours ago










  • $begingroup$
    @NickKennedy You need to account for trailing whitespace or no trailing whitespace. I didn't set strict rules on that.
    $endgroup$
    – connectyourcharger
    7 hours ago










  • $begingroup$
    What if the input is taken as a matrix which has to be rectangular? Is that just not an accepted input method?
    $endgroup$
    – dzaima
    7 hours ago






  • 1




    $begingroup$
    Title is "will jimmy fall of the platform" and you required to output "will jimmy stay on the platform". Is this expected behavior?
    $endgroup$
    – tsh
    3 hours ago






  • 1




    $begingroup$
    Can you reformat your test cases to make them easier to copy & paste, please?
    $endgroup$
    – Shaggy
    3 mins ago

















6












$begingroup$


Backstory



Meet my friend Jimmy:



/o


Jimmy is a little character who likes to stand on platforms. Here's Jimmy safely standing on a platform:



 /o
-------------


Now, Jimmy has a good sense of balance, so he can safely stand with one leg off of the platform, like so:



 /o
-------------------


Although if he stands with two or more body parts off of the platform, he will fall. Both of these are examples where Jimmy will fall:



/o /o
---------- ----------------------


The challenge



Your challenge is to write a program to determine, given a string with Jimmy's platform and position, if Jimmy can stand on the platform without falling off.




  • Input: Two lines showing Jimmy's position and the position of the platform under him. This can be from two separate inputs, a single input, or an array of some sort.



    1. You may take input through any reasonable form, includings functions and standard input. Only resort to hard-coding if your language does not support the other input methods.



  • Output: The boolean values true and false, or the integers 1 or 0 to represent true/false respectively.



    1. The boolean value is based off of whether Jimmy can stay on the platform or not - true if Jimmy can stay on the platform, or false if he will fall off.



  • The platform size is arbitrary and can be changed at will. Your program should account for that.



    1. The platform cannot be a length of zero, and the platform must be complete (no holes in the platform).


    2. Remember that Jimmy falls off when two of his body parts are hanging off the platform. A body part is one ASCII character of his body.


    3. Trailing whitespace at the end of the platform is not required, but your program should account for both situations, where there is whitespace after the platform and where there is not.



  • Be mindful of the standard loopholes that are forbidden.


Test cases



 /o ✔️ TRUE
-------------

/o ✔️ TRUE
----------

/o ❌ FALSE
------------------

/o ❌ FALSE
-------

/o ❌ FALSE
-


Scoring



This is code-golf, so lowest byte count wins.



Leaderboard



You can view the leaderboard for this post by expanding the widget/snippet below. In order for your post to be included in the rankings, you need a header (# header text) with the following info:



  • The name of the language (end it with a comma , or dash -), followed by...


  • The byte count, as the last number to appear in your header.


For example, JavaScript (ES6), 72 bytes is valid, but Fortran, 143 bytes (8-bit) is invalid because the byte count is not the last number in the header (your answer will be recognized as 8 bytes - don't take advantage of this).






<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github --> <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=187586" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,bodymargin:0;padding:0;height:100%;overflow:hidden</style>












share|improve this question











$endgroup$











  • $begingroup$
    Can we assume trailing whitespace after Jimmy? Also if you’re allowing arrays of characters, in some languages those will have to be padded with whitespace.
    $endgroup$
    – Nick Kennedy
    7 hours ago










  • $begingroup$
    @NickKennedy You need to account for trailing whitespace or no trailing whitespace. I didn't set strict rules on that.
    $endgroup$
    – connectyourcharger
    7 hours ago










  • $begingroup$
    What if the input is taken as a matrix which has to be rectangular? Is that just not an accepted input method?
    $endgroup$
    – dzaima
    7 hours ago






  • 1




    $begingroup$
    Title is "will jimmy fall of the platform" and you required to output "will jimmy stay on the platform". Is this expected behavior?
    $endgroup$
    – tsh
    3 hours ago






  • 1




    $begingroup$
    Can you reformat your test cases to make them easier to copy & paste, please?
    $endgroup$
    – Shaggy
    3 mins ago













6












6








6


1



$begingroup$


Backstory



Meet my friend Jimmy:



/o


Jimmy is a little character who likes to stand on platforms. Here's Jimmy safely standing on a platform:



 /o
-------------


Now, Jimmy has a good sense of balance, so he can safely stand with one leg off of the platform, like so:



 /o
-------------------


Although if he stands with two or more body parts off of the platform, he will fall. Both of these are examples where Jimmy will fall:



/o /o
---------- ----------------------


The challenge



Your challenge is to write a program to determine, given a string with Jimmy's platform and position, if Jimmy can stand on the platform without falling off.




  • Input: Two lines showing Jimmy's position and the position of the platform under him. This can be from two separate inputs, a single input, or an array of some sort.



    1. You may take input through any reasonable form, includings functions and standard input. Only resort to hard-coding if your language does not support the other input methods.



  • Output: The boolean values true and false, or the integers 1 or 0 to represent true/false respectively.



    1. The boolean value is based off of whether Jimmy can stay on the platform or not - true if Jimmy can stay on the platform, or false if he will fall off.



  • The platform size is arbitrary and can be changed at will. Your program should account for that.



    1. The platform cannot be a length of zero, and the platform must be complete (no holes in the platform).


    2. Remember that Jimmy falls off when two of his body parts are hanging off the platform. A body part is one ASCII character of his body.


    3. Trailing whitespace at the end of the platform is not required, but your program should account for both situations, where there is whitespace after the platform and where there is not.



  • Be mindful of the standard loopholes that are forbidden.


Test cases



 /o ✔️ TRUE
-------------

/o ✔️ TRUE
----------

/o ❌ FALSE
------------------

/o ❌ FALSE
-------

/o ❌ FALSE
-


Scoring



This is code-golf, so lowest byte count wins.



Leaderboard



You can view the leaderboard for this post by expanding the widget/snippet below. In order for your post to be included in the rankings, you need a header (# header text) with the following info:



  • The name of the language (end it with a comma , or dash -), followed by...


  • The byte count, as the last number to appear in your header.


For example, JavaScript (ES6), 72 bytes is valid, but Fortran, 143 bytes (8-bit) is invalid because the byte count is not the last number in the header (your answer will be recognized as 8 bytes - don't take advantage of this).






<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github --> <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=187586" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,bodymargin:0;padding:0;height:100%;overflow:hidden</style>












share|improve this question











$endgroup$




Backstory



Meet my friend Jimmy:



/o


Jimmy is a little character who likes to stand on platforms. Here's Jimmy safely standing on a platform:



 /o
-------------


Now, Jimmy has a good sense of balance, so he can safely stand with one leg off of the platform, like so:



 /o
-------------------


Although if he stands with two or more body parts off of the platform, he will fall. Both of these are examples where Jimmy will fall:



/o /o
---------- ----------------------


The challenge



Your challenge is to write a program to determine, given a string with Jimmy's platform and position, if Jimmy can stand on the platform without falling off.




  • Input: Two lines showing Jimmy's position and the position of the platform under him. This can be from two separate inputs, a single input, or an array of some sort.



    1. You may take input through any reasonable form, includings functions and standard input. Only resort to hard-coding if your language does not support the other input methods.



  • Output: The boolean values true and false, or the integers 1 or 0 to represent true/false respectively.



    1. The boolean value is based off of whether Jimmy can stay on the platform or not - true if Jimmy can stay on the platform, or false if he will fall off.



  • The platform size is arbitrary and can be changed at will. Your program should account for that.



    1. The platform cannot be a length of zero, and the platform must be complete (no holes in the platform).


    2. Remember that Jimmy falls off when two of his body parts are hanging off the platform. A body part is one ASCII character of his body.


    3. Trailing whitespace at the end of the platform is not required, but your program should account for both situations, where there is whitespace after the platform and where there is not.



  • Be mindful of the standard loopholes that are forbidden.


Test cases



 /o ✔️ TRUE
-------------

/o ✔️ TRUE
----------

/o ❌ FALSE
------------------

/o ❌ FALSE
-------

/o ❌ FALSE
-


Scoring



This is code-golf, so lowest byte count wins.



Leaderboard



You can view the leaderboard for this post by expanding the widget/snippet below. In order for your post to be included in the rankings, you need a header (# header text) with the following info:



  • The name of the language (end it with a comma , or dash -), followed by...


  • The byte count, as the last number to appear in your header.


For example, JavaScript (ES6), 72 bytes is valid, but Fortran, 143 bytes (8-bit) is invalid because the byte count is not the last number in the header (your answer will be recognized as 8 bytes - don't take advantage of this).






<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github --> <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=187586" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,bodymargin:0;padding:0;height:100%;overflow:hidden</style>








<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github --> <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=187586" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,bodymargin:0;padding:0;height:100%;overflow:hidden</style>





<!-- Run the snippet to see the leaderboard. Report any bugs to @xMikee1 on Github --> <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=187586" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe><style>html,bodymargin:0;padding:0;height:100%;overflow:hidden</style>






code-golf ascii-art






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago







connectyourcharger

















asked 8 hours ago









connectyourchargerconnectyourcharger

4381 gold badge2 silver badges13 bronze badges




4381 gold badge2 silver badges13 bronze badges











  • $begingroup$
    Can we assume trailing whitespace after Jimmy? Also if you’re allowing arrays of characters, in some languages those will have to be padded with whitespace.
    $endgroup$
    – Nick Kennedy
    7 hours ago










  • $begingroup$
    @NickKennedy You need to account for trailing whitespace or no trailing whitespace. I didn't set strict rules on that.
    $endgroup$
    – connectyourcharger
    7 hours ago










  • $begingroup$
    What if the input is taken as a matrix which has to be rectangular? Is that just not an accepted input method?
    $endgroup$
    – dzaima
    7 hours ago






  • 1




    $begingroup$
    Title is "will jimmy fall of the platform" and you required to output "will jimmy stay on the platform". Is this expected behavior?
    $endgroup$
    – tsh
    3 hours ago






  • 1




    $begingroup$
    Can you reformat your test cases to make them easier to copy & paste, please?
    $endgroup$
    – Shaggy
    3 mins ago
















  • $begingroup$
    Can we assume trailing whitespace after Jimmy? Also if you’re allowing arrays of characters, in some languages those will have to be padded with whitespace.
    $endgroup$
    – Nick Kennedy
    7 hours ago










  • $begingroup$
    @NickKennedy You need to account for trailing whitespace or no trailing whitespace. I didn't set strict rules on that.
    $endgroup$
    – connectyourcharger
    7 hours ago










  • $begingroup$
    What if the input is taken as a matrix which has to be rectangular? Is that just not an accepted input method?
    $endgroup$
    – dzaima
    7 hours ago






  • 1




    $begingroup$
    Title is "will jimmy fall of the platform" and you required to output "will jimmy stay on the platform". Is this expected behavior?
    $endgroup$
    – tsh
    3 hours ago






  • 1




    $begingroup$
    Can you reformat your test cases to make them easier to copy & paste, please?
    $endgroup$
    – Shaggy
    3 mins ago















$begingroup$
Can we assume trailing whitespace after Jimmy? Also if you’re allowing arrays of characters, in some languages those will have to be padded with whitespace.
$endgroup$
– Nick Kennedy
7 hours ago




$begingroup$
Can we assume trailing whitespace after Jimmy? Also if you’re allowing arrays of characters, in some languages those will have to be padded with whitespace.
$endgroup$
– Nick Kennedy
7 hours ago












$begingroup$
@NickKennedy You need to account for trailing whitespace or no trailing whitespace. I didn't set strict rules on that.
$endgroup$
– connectyourcharger
7 hours ago




$begingroup$
@NickKennedy You need to account for trailing whitespace or no trailing whitespace. I didn't set strict rules on that.
$endgroup$
– connectyourcharger
7 hours ago












$begingroup$
What if the input is taken as a matrix which has to be rectangular? Is that just not an accepted input method?
$endgroup$
– dzaima
7 hours ago




$begingroup$
What if the input is taken as a matrix which has to be rectangular? Is that just not an accepted input method?
$endgroup$
– dzaima
7 hours ago




1




1




$begingroup$
Title is "will jimmy fall of the platform" and you required to output "will jimmy stay on the platform". Is this expected behavior?
$endgroup$
– tsh
3 hours ago




$begingroup$
Title is "will jimmy fall of the platform" and you required to output "will jimmy stay on the platform". Is this expected behavior?
$endgroup$
– tsh
3 hours ago




1




1




$begingroup$
Can you reformat your test cases to make them easier to copy & paste, please?
$endgroup$
– Shaggy
3 mins ago




$begingroup$
Can you reformat your test cases to make them easier to copy & paste, please?
$endgroup$
– Shaggy
3 mins ago










15 Answers
15






active

oldest

votes


















5












$begingroup$


Jelly, 6 bytes



n⁶Sċ2Ẓ


Try it online!






share|improve this answer









$endgroup$








  • 1




    $begingroup$
    Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
    $endgroup$
    – IMustBeSomeone
    5 hours ago



















3












$begingroup$


Haskell, 34 bytes





a#b=[1|(p,'-')<-zip a b,p>' ']>[1]


Try it online!



I got this one by combining my below technique with the other haskell answer.




Haskell, 45 bytes





x#'-'|x/=' '=1
x#y=0
(((>1).sum).).zipWith(#)


Try it online!



This counts the number of body parts (non-space characters) that are on top of the platform and then checks it is greater than 1. The reason we count body parts on the platform rather than body parts off is that zipWith will chop the top line to be the length of the bottom and thus can chop off Jimmy's body parts. This prevents us from having to do something like cycle" " to pad the list.






share|improve this answer











$endgroup$








  • 1




    $begingroup$
    Can't you reduce by 2 bytes by converting to infix?
    $endgroup$
    – cole
    4 hours ago






  • 1




    $begingroup$
    @cole Yep I was just doing the edit when you commented :)
    $endgroup$
    – Sriotchilism O'Zaic
    4 hours ago


















3












$begingroup$


Python 2, 42 37 bytes





lambda j,p:'--'in p[j.find('/'):][:3]


Try it online!



5 bytes thx to negative seven






share|improve this answer











$endgroup$












  • $begingroup$
    "--"in [...] for -5 bytes
    $endgroup$
    – negative seven
    59 mins ago










  • $begingroup$
    @negative seven: nice; thanks!
    $endgroup$
    – Chas Brown
    56 mins ago


















3












$begingroup$

Python 3, 88 43 bytes



Input is given in the form of a list containing two strings: the first string is the first line; the second string is the second line.



lambda a:sum(1-(" "in i)for i in zip(*a))>1


Try it online!



Another version, tying for 43 bytes (I haven't been able to get it shorter than 43):



lambda a,b:b[a.find("/"):][:3].count("-")>1


Try it online!



Down by 42 bytes thanks to a tip from Jo King.



Old Version:



lambda s:sum((s.split("n")[1]+" "*len(s))[i]=="-"and s[i]!=" "for i in range(len(s)))>1


-2 bytes thanks to Sriotchilism O'Zaic.



This works by taking two separate inputs, then pairing up corresponding letters. It counts the number of pairs where neither character is a space, then returns True if that number is greater than 1.






share|improve this answer










New contributor



Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





$endgroup$




















    2












    $begingroup$

    JavaScript (ES6), 38 bytes



    Takes input as (a)(b). Returns $0$ or $1$.



    a=>b=>b[a.search`o`]=='-'&/--/.test(b)


    Try it online!



    How?



    We look for the position of the middle part "o" of Jimmy's body in the first string and test wether there's a dash in the second string at the same position.



    b[a.search`o`] == '-'


    The only case where Jimmy would be unsafe in this situation is with a single-dash platform:



    /o
    -


    So we additionally make sure that the platform has a width of at least $2$:



    /--/.test(b)



    JavaScript (ES6), 36 bytes



    Alternate version if we assume that there's always either dashes or spaces below Jimmy (i.e. the input is rectangular).





    a=>b=>b[a.search`o`]!=0&/--/.test(b)


    Try it online!



    Takes advantage of the fact that the coercion to a numeric value is $0$ for a space and NaN for a dash.






    share|improve this answer











    $endgroup$












    • $begingroup$
      Wow. Could you explain how that works?
      $endgroup$
      – connectyourcharger
      7 hours ago










    • $begingroup$
      @connectyourcharger I've added an explanation.
      $endgroup$
      – Arnauld
      7 hours ago










    • $begingroup$
      Genius! JS answers usually aren't that short.
      $endgroup$
      – connectyourcharger
      7 hours ago










    • $begingroup$
      Would this work for 35 bytes?
      $endgroup$
      – Oliver
      4 hours ago










    • $begingroup$
      @Oliver will fail for "/o\n__"
      $endgroup$
      – tsh
      3 hours ago



















    2












    $begingroup$

    Haskell, 59 bytes



    f a b=sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2


    Try it online!



    The function is called like so: f "/o\ " " -- "



    How it works (for f "/o\" " -"):



    b++cycle" " - Adds an infinite number of spaces after b to ensure that Jimmy is always above a - or (" -" &rightarrow; " - ..."



    zip a$b++cycle" " - Zips the two strings together ([('/',' '), ('o','-'), ('\',' ')])



    (p,q)<-zip a$b++cycle - For each pair in the zipped list



    [1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Generates a list of 1s, whose length is the number of pairs satisfying the conditions:



    elem p"/o\" - The character in the top string is one of Jimmy's body parts. (Satisfied by all three pairs in this example)



    q==' ' - The character in the bottom string is a space. (Satisfied by ('/', ' ') and ('\', ' '))



    So, the pair has to be one where one of Jimmy's body parts is above a space.



    Because in this example, two pairs satisfy both conditions, the list is [1,1]



    sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Take the sum of those 1s (i.e. the length of the list), which in this example is 2.



    sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2 - Check if the number of body parts above a space is less than 2. In this example, it's not, so Jimmy will fall off. :(






    share|improve this answer









    $endgroup$












    • $begingroup$
      I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
      $endgroup$
      – Sriotchilism O'Zaic
      4 hours ago


















    1












    $begingroup$

    Dyalog APL Extended, 11 10 bytes





    2≤+/∧⌿<⍵


    Try it online! Takes the input as a matrix.



    Explanation:



    2≤+/∧⌿<⍵ a monadic function with argument ⍵
    <⍵ Compare with the implicit prototype element - a space.
    Returns a matrix of characters that are greater than 0x20
    ∧⌿ and-reduce, i.e. places where both Jimmy and a platform is
    +/ sum that array, i.e. amount of body parts over a platform
    2≤ is that greater-or-equal to 2?





    share|improve this answer











    $endgroup$








    • 1




      $begingroup$
      -2: 2≤1⊥∧⌿⍤<
      $endgroup$
      – Adám
      6 hours ago


















    1












    $begingroup$


    Perl 6, 18 bytes





    ?/''Bo&[~^]


    Try it online!



    Takes a two parameters and returns a boolean of whether Jimmy will stay on the platform. This works by XORing the two lines together and checking if either part of Jimmy is still on the platform.



    Explanation:



     &[~^] # String XOR operator
    o # Combined with the anonymous function
    ?/ / # That checks for the regex match
    ''B # Unprintable, B, which is "/o" ~^ "--"
    |Bq # Or B, q, which is "o" ~^ "--"





    share|improve this answer











    $endgroup$




















      1












      $begingroup$

      VBA (Excel), 87 bytes EXCEL, 94 bytes



      A1 = Jimmy , A2 = platform



      =(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)*(LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))>1)



      ?[(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)]*(len(replace([A2]," ",""))>1)





      share|improve this answer











      $endgroup$




















        0












        $begingroup$


        R, 35 bytes





        function(x)sum(colSums(x!=" ")>1)>1


        Try it online!



        Based on @EriktheOutgolfer’s excellent Jelly answer so please upvote that one too!



        Input is a 2-d matrix of characters.






        share|improve this answer









        $endgroup$




















          0












          $begingroup$

          C (gcc), 103 bytes





          i,j,l;f(char*s)for(i=0;*s-10;j=*s++-47?j:i)++i;l=strlen(s)>j+1;s+=j;return l&&*s+s[1]+(s[2]?:32)>109;


          Try it online!



          Would be much shorter (75 bytes), if it could be assumed that there is trailing whitespace after the platform.






          share|improve this answer









          $endgroup$












          • $begingroup$
            95 bytes
            $endgroup$
            – ceilingcat
            5 hours ago


















          0












          $begingroup$


          Retina, 31 bytes



          ^(.)*/.*¶(?<-1>.)*(?(1)!) ?---?


          Try it online!



          A simple regex that determines whether at least two pieces of the platform are directly beneath Jimmy. Assumes that the input will contain no ! characters.






          share|improve this answer









          $endgroup$




















            0












            $begingroup$

            Japt , 9 bytes



            -1 byte if the input can be reversed.



            VtUao)è-²


            Try it online






            share|improve this answer











            $endgroup$








            • 1




              $begingroup$
              @SriotchilismO'Zaic Updated
              $endgroup$
              – Oliver
              3 hours ago


















            0












            $begingroup$


            V, 18 bytes



            0vt/"_dj.d3lVkp0#x


            Try it online!



            Output whitespace only if jimmy fall of the platform. Output something non-whitespace if jimmy stay on the platform.






            share|improve this answer









            $endgroup$












            • $begingroup$
              Not using Ctrl or Esc in Vim is funny.
              $endgroup$
              – tsh
              49 mins ago



















            0












            $begingroup$


            Japt, 8 bytes



            Õ·kèS Êz


            Try it






            share|improve this answer









            $endgroup$















              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "200"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f187586%2fwill-jimmy-fall-off-his-platform%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              15 Answers
              15






              active

              oldest

              votes








              15 Answers
              15






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              5












              $begingroup$


              Jelly, 6 bytes



              n⁶Sċ2Ẓ


              Try it online!






              share|improve this answer









              $endgroup$








              • 1




                $begingroup$
                Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
                $endgroup$
                – IMustBeSomeone
                5 hours ago
















              5












              $begingroup$


              Jelly, 6 bytes



              n⁶Sċ2Ẓ


              Try it online!






              share|improve this answer









              $endgroup$








              • 1




                $begingroup$
                Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
                $endgroup$
                – IMustBeSomeone
                5 hours ago














              5












              5








              5





              $begingroup$


              Jelly, 6 bytes



              n⁶Sċ2Ẓ


              Try it online!






              share|improve this answer









              $endgroup$




              Jelly, 6 bytes



              n⁶Sċ2Ẓ


              Try it online!







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 7 hours ago









              Erik the OutgolferErik the Outgolfer

              34.2k4 gold badges30 silver badges107 bronze badges




              34.2k4 gold badges30 silver badges107 bronze badges







              • 1




                $begingroup$
                Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
                $endgroup$
                – IMustBeSomeone
                5 hours ago













              • 1




                $begingroup$
                Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
                $endgroup$
                – IMustBeSomeone
                5 hours ago








              1




              1




              $begingroup$
              Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
              $endgroup$
              – IMustBeSomeone
              5 hours ago





              $begingroup$
              Sometimes I wonder how far humankind has advanced to see that in 6 bytes you can check if someone is going to fall off of a platform to their doom.
              $endgroup$
              – IMustBeSomeone
              5 hours ago














              3












              $begingroup$


              Haskell, 34 bytes





              a#b=[1|(p,'-')<-zip a b,p>' ']>[1]


              Try it online!



              I got this one by combining my below technique with the other haskell answer.




              Haskell, 45 bytes





              x#'-'|x/=' '=1
              x#y=0
              (((>1).sum).).zipWith(#)


              Try it online!



              This counts the number of body parts (non-space characters) that are on top of the platform and then checks it is greater than 1. The reason we count body parts on the platform rather than body parts off is that zipWith will chop the top line to be the length of the bottom and thus can chop off Jimmy's body parts. This prevents us from having to do something like cycle" " to pad the list.






              share|improve this answer











              $endgroup$








              • 1




                $begingroup$
                Can't you reduce by 2 bytes by converting to infix?
                $endgroup$
                – cole
                4 hours ago






              • 1




                $begingroup$
                @cole Yep I was just doing the edit when you commented :)
                $endgroup$
                – Sriotchilism O'Zaic
                4 hours ago















              3












              $begingroup$


              Haskell, 34 bytes





              a#b=[1|(p,'-')<-zip a b,p>' ']>[1]


              Try it online!



              I got this one by combining my below technique with the other haskell answer.




              Haskell, 45 bytes





              x#'-'|x/=' '=1
              x#y=0
              (((>1).sum).).zipWith(#)


              Try it online!



              This counts the number of body parts (non-space characters) that are on top of the platform and then checks it is greater than 1. The reason we count body parts on the platform rather than body parts off is that zipWith will chop the top line to be the length of the bottom and thus can chop off Jimmy's body parts. This prevents us from having to do something like cycle" " to pad the list.






              share|improve this answer











              $endgroup$








              • 1




                $begingroup$
                Can't you reduce by 2 bytes by converting to infix?
                $endgroup$
                – cole
                4 hours ago






              • 1




                $begingroup$
                @cole Yep I was just doing the edit when you commented :)
                $endgroup$
                – Sriotchilism O'Zaic
                4 hours ago













              3












              3








              3





              $begingroup$


              Haskell, 34 bytes





              a#b=[1|(p,'-')<-zip a b,p>' ']>[1]


              Try it online!



              I got this one by combining my below technique with the other haskell answer.




              Haskell, 45 bytes





              x#'-'|x/=' '=1
              x#y=0
              (((>1).sum).).zipWith(#)


              Try it online!



              This counts the number of body parts (non-space characters) that are on top of the platform and then checks it is greater than 1. The reason we count body parts on the platform rather than body parts off is that zipWith will chop the top line to be the length of the bottom and thus can chop off Jimmy's body parts. This prevents us from having to do something like cycle" " to pad the list.






              share|improve this answer











              $endgroup$




              Haskell, 34 bytes





              a#b=[1|(p,'-')<-zip a b,p>' ']>[1]


              Try it online!



              I got this one by combining my below technique with the other haskell answer.




              Haskell, 45 bytes





              x#'-'|x/=' '=1
              x#y=0
              (((>1).sum).).zipWith(#)


              Try it online!



              This counts the number of body parts (non-space characters) that are on top of the platform and then checks it is greater than 1. The reason we count body parts on the platform rather than body parts off is that zipWith will chop the top line to be the length of the bottom and thus can chop off Jimmy's body parts. This prevents us from having to do something like cycle" " to pad the list.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 4 hours ago

























              answered 4 hours ago









              Sriotchilism O'ZaicSriotchilism O'Zaic

              36.1k10 gold badges162 silver badges371 bronze badges




              36.1k10 gold badges162 silver badges371 bronze badges







              • 1




                $begingroup$
                Can't you reduce by 2 bytes by converting to infix?
                $endgroup$
                – cole
                4 hours ago






              • 1




                $begingroup$
                @cole Yep I was just doing the edit when you commented :)
                $endgroup$
                – Sriotchilism O'Zaic
                4 hours ago












              • 1




                $begingroup$
                Can't you reduce by 2 bytes by converting to infix?
                $endgroup$
                – cole
                4 hours ago






              • 1




                $begingroup$
                @cole Yep I was just doing the edit when you commented :)
                $endgroup$
                – Sriotchilism O'Zaic
                4 hours ago







              1




              1




              $begingroup$
              Can't you reduce by 2 bytes by converting to infix?
              $endgroup$
              – cole
              4 hours ago




              $begingroup$
              Can't you reduce by 2 bytes by converting to infix?
              $endgroup$
              – cole
              4 hours ago




              1




              1




              $begingroup$
              @cole Yep I was just doing the edit when you commented :)
              $endgroup$
              – Sriotchilism O'Zaic
              4 hours ago




              $begingroup$
              @cole Yep I was just doing the edit when you commented :)
              $endgroup$
              – Sriotchilism O'Zaic
              4 hours ago











              3












              $begingroup$


              Python 2, 42 37 bytes





              lambda j,p:'--'in p[j.find('/'):][:3]


              Try it online!



              5 bytes thx to negative seven






              share|improve this answer











              $endgroup$












              • $begingroup$
                "--"in [...] for -5 bytes
                $endgroup$
                – negative seven
                59 mins ago










              • $begingroup$
                @negative seven: nice; thanks!
                $endgroup$
                – Chas Brown
                56 mins ago















              3












              $begingroup$


              Python 2, 42 37 bytes





              lambda j,p:'--'in p[j.find('/'):][:3]


              Try it online!



              5 bytes thx to negative seven






              share|improve this answer











              $endgroup$












              • $begingroup$
                "--"in [...] for -5 bytes
                $endgroup$
                – negative seven
                59 mins ago










              • $begingroup$
                @negative seven: nice; thanks!
                $endgroup$
                – Chas Brown
                56 mins ago













              3












              3








              3





              $begingroup$


              Python 2, 42 37 bytes





              lambda j,p:'--'in p[j.find('/'):][:3]


              Try it online!



              5 bytes thx to negative seven






              share|improve this answer











              $endgroup$




              Python 2, 42 37 bytes





              lambda j,p:'--'in p[j.find('/'):][:3]


              Try it online!



              5 bytes thx to negative seven







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 56 mins ago

























              answered 6 hours ago









              Chas BrownChas Brown

              5,6891 gold badge6 silver badges23 bronze badges




              5,6891 gold badge6 silver badges23 bronze badges











              • $begingroup$
                "--"in [...] for -5 bytes
                $endgroup$
                – negative seven
                59 mins ago










              • $begingroup$
                @negative seven: nice; thanks!
                $endgroup$
                – Chas Brown
                56 mins ago
















              • $begingroup$
                "--"in [...] for -5 bytes
                $endgroup$
                – negative seven
                59 mins ago










              • $begingroup$
                @negative seven: nice; thanks!
                $endgroup$
                – Chas Brown
                56 mins ago















              $begingroup$
              "--"in [...] for -5 bytes
              $endgroup$
              – negative seven
              59 mins ago




              $begingroup$
              "--"in [...] for -5 bytes
              $endgroup$
              – negative seven
              59 mins ago












              $begingroup$
              @negative seven: nice; thanks!
              $endgroup$
              – Chas Brown
              56 mins ago




              $begingroup$
              @negative seven: nice; thanks!
              $endgroup$
              – Chas Brown
              56 mins ago











              3












              $begingroup$

              Python 3, 88 43 bytes



              Input is given in the form of a list containing two strings: the first string is the first line; the second string is the second line.



              lambda a:sum(1-(" "in i)for i in zip(*a))>1


              Try it online!



              Another version, tying for 43 bytes (I haven't been able to get it shorter than 43):



              lambda a,b:b[a.find("/"):][:3].count("-")>1


              Try it online!



              Down by 42 bytes thanks to a tip from Jo King.



              Old Version:



              lambda s:sum((s.split("n")[1]+" "*len(s))[i]=="-"and s[i]!=" "for i in range(len(s)))>1


              -2 bytes thanks to Sriotchilism O'Zaic.



              This works by taking two separate inputs, then pairing up corresponding letters. It counts the number of pairs where neither character is a space, then returns True if that number is greater than 1.






              share|improve this answer










              New contributor



              Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





              $endgroup$

















                3












                $begingroup$

                Python 3, 88 43 bytes



                Input is given in the form of a list containing two strings: the first string is the first line; the second string is the second line.



                lambda a:sum(1-(" "in i)for i in zip(*a))>1


                Try it online!



                Another version, tying for 43 bytes (I haven't been able to get it shorter than 43):



                lambda a,b:b[a.find("/"):][:3].count("-")>1


                Try it online!



                Down by 42 bytes thanks to a tip from Jo King.



                Old Version:



                lambda s:sum((s.split("n")[1]+" "*len(s))[i]=="-"and s[i]!=" "for i in range(len(s)))>1


                -2 bytes thanks to Sriotchilism O'Zaic.



                This works by taking two separate inputs, then pairing up corresponding letters. It counts the number of pairs where neither character is a space, then returns True if that number is greater than 1.






                share|improve this answer










                New contributor



                Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                $endgroup$















                  3












                  3








                  3





                  $begingroup$

                  Python 3, 88 43 bytes



                  Input is given in the form of a list containing two strings: the first string is the first line; the second string is the second line.



                  lambda a:sum(1-(" "in i)for i in zip(*a))>1


                  Try it online!



                  Another version, tying for 43 bytes (I haven't been able to get it shorter than 43):



                  lambda a,b:b[a.find("/"):][:3].count("-")>1


                  Try it online!



                  Down by 42 bytes thanks to a tip from Jo King.



                  Old Version:



                  lambda s:sum((s.split("n")[1]+" "*len(s))[i]=="-"and s[i]!=" "for i in range(len(s)))>1


                  -2 bytes thanks to Sriotchilism O'Zaic.



                  This works by taking two separate inputs, then pairing up corresponding letters. It counts the number of pairs where neither character is a space, then returns True if that number is greater than 1.






                  share|improve this answer










                  New contributor



                  Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  $endgroup$



                  Python 3, 88 43 bytes



                  Input is given in the form of a list containing two strings: the first string is the first line; the second string is the second line.



                  lambda a:sum(1-(" "in i)for i in zip(*a))>1


                  Try it online!



                  Another version, tying for 43 bytes (I haven't been able to get it shorter than 43):



                  lambda a,b:b[a.find("/"):][:3].count("-")>1


                  Try it online!



                  Down by 42 bytes thanks to a tip from Jo King.



                  Old Version:



                  lambda s:sum((s.split("n")[1]+" "*len(s))[i]=="-"and s[i]!=" "for i in range(len(s)))>1


                  -2 bytes thanks to Sriotchilism O'Zaic.



                  This works by taking two separate inputs, then pairing up corresponding letters. It counts the number of pairs where neither character is a space, then returns True if that number is greater than 1.







                  share|improve this answer










                  New contributor



                  Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share|improve this answer



                  share|improve this answer








                  edited 44 mins ago





















                  New contributor



                  Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  answered 4 hours ago









                  MaxwellMaxwell

                  1314 bronze badges




                  1314 bronze badges




                  New contributor



                  Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




                  New contributor




                  Maxwell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.























                      2












                      $begingroup$

                      JavaScript (ES6), 38 bytes



                      Takes input as (a)(b). Returns $0$ or $1$.



                      a=>b=>b[a.search`o`]=='-'&/--/.test(b)


                      Try it online!



                      How?



                      We look for the position of the middle part "o" of Jimmy's body in the first string and test wether there's a dash in the second string at the same position.



                      b[a.search`o`] == '-'


                      The only case where Jimmy would be unsafe in this situation is with a single-dash platform:



                      /o
                      -


                      So we additionally make sure that the platform has a width of at least $2$:



                      /--/.test(b)



                      JavaScript (ES6), 36 bytes



                      Alternate version if we assume that there's always either dashes or spaces below Jimmy (i.e. the input is rectangular).





                      a=>b=>b[a.search`o`]!=0&/--/.test(b)


                      Try it online!



                      Takes advantage of the fact that the coercion to a numeric value is $0$ for a space and NaN for a dash.






                      share|improve this answer











                      $endgroup$












                      • $begingroup$
                        Wow. Could you explain how that works?
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        @connectyourcharger I've added an explanation.
                        $endgroup$
                        – Arnauld
                        7 hours ago










                      • $begingroup$
                        Genius! JS answers usually aren't that short.
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        Would this work for 35 bytes?
                        $endgroup$
                        – Oliver
                        4 hours ago










                      • $begingroup$
                        @Oliver will fail for "/o\n__"
                        $endgroup$
                        – tsh
                        3 hours ago
















                      2












                      $begingroup$

                      JavaScript (ES6), 38 bytes



                      Takes input as (a)(b). Returns $0$ or $1$.



                      a=>b=>b[a.search`o`]=='-'&/--/.test(b)


                      Try it online!



                      How?



                      We look for the position of the middle part "o" of Jimmy's body in the first string and test wether there's a dash in the second string at the same position.



                      b[a.search`o`] == '-'


                      The only case where Jimmy would be unsafe in this situation is with a single-dash platform:



                      /o
                      -


                      So we additionally make sure that the platform has a width of at least $2$:



                      /--/.test(b)



                      JavaScript (ES6), 36 bytes



                      Alternate version if we assume that there's always either dashes or spaces below Jimmy (i.e. the input is rectangular).





                      a=>b=>b[a.search`o`]!=0&/--/.test(b)


                      Try it online!



                      Takes advantage of the fact that the coercion to a numeric value is $0$ for a space and NaN for a dash.






                      share|improve this answer











                      $endgroup$












                      • $begingroup$
                        Wow. Could you explain how that works?
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        @connectyourcharger I've added an explanation.
                        $endgroup$
                        – Arnauld
                        7 hours ago










                      • $begingroup$
                        Genius! JS answers usually aren't that short.
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        Would this work for 35 bytes?
                        $endgroup$
                        – Oliver
                        4 hours ago










                      • $begingroup$
                        @Oliver will fail for "/o\n__"
                        $endgroup$
                        – tsh
                        3 hours ago














                      2












                      2








                      2





                      $begingroup$

                      JavaScript (ES6), 38 bytes



                      Takes input as (a)(b). Returns $0$ or $1$.



                      a=>b=>b[a.search`o`]=='-'&/--/.test(b)


                      Try it online!



                      How?



                      We look for the position of the middle part "o" of Jimmy's body in the first string and test wether there's a dash in the second string at the same position.



                      b[a.search`o`] == '-'


                      The only case where Jimmy would be unsafe in this situation is with a single-dash platform:



                      /o
                      -


                      So we additionally make sure that the platform has a width of at least $2$:



                      /--/.test(b)



                      JavaScript (ES6), 36 bytes



                      Alternate version if we assume that there's always either dashes or spaces below Jimmy (i.e. the input is rectangular).





                      a=>b=>b[a.search`o`]!=0&/--/.test(b)


                      Try it online!



                      Takes advantage of the fact that the coercion to a numeric value is $0$ for a space and NaN for a dash.






                      share|improve this answer











                      $endgroup$



                      JavaScript (ES6), 38 bytes



                      Takes input as (a)(b). Returns $0$ or $1$.



                      a=>b=>b[a.search`o`]=='-'&/--/.test(b)


                      Try it online!



                      How?



                      We look for the position of the middle part "o" of Jimmy's body in the first string and test wether there's a dash in the second string at the same position.



                      b[a.search`o`] == '-'


                      The only case where Jimmy would be unsafe in this situation is with a single-dash platform:



                      /o
                      -


                      So we additionally make sure that the platform has a width of at least $2$:



                      /--/.test(b)



                      JavaScript (ES6), 36 bytes



                      Alternate version if we assume that there's always either dashes or spaces below Jimmy (i.e. the input is rectangular).





                      a=>b=>b[a.search`o`]!=0&/--/.test(b)


                      Try it online!



                      Takes advantage of the fact that the coercion to a numeric value is $0$ for a space and NaN for a dash.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 7 hours ago

























                      answered 7 hours ago









                      ArnauldArnauld

                      87.4k7 gold badges102 silver badges357 bronze badges




                      87.4k7 gold badges102 silver badges357 bronze badges











                      • $begingroup$
                        Wow. Could you explain how that works?
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        @connectyourcharger I've added an explanation.
                        $endgroup$
                        – Arnauld
                        7 hours ago










                      • $begingroup$
                        Genius! JS answers usually aren't that short.
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        Would this work for 35 bytes?
                        $endgroup$
                        – Oliver
                        4 hours ago










                      • $begingroup$
                        @Oliver will fail for "/o\n__"
                        $endgroup$
                        – tsh
                        3 hours ago

















                      • $begingroup$
                        Wow. Could you explain how that works?
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        @connectyourcharger I've added an explanation.
                        $endgroup$
                        – Arnauld
                        7 hours ago










                      • $begingroup$
                        Genius! JS answers usually aren't that short.
                        $endgroup$
                        – connectyourcharger
                        7 hours ago










                      • $begingroup$
                        Would this work for 35 bytes?
                        $endgroup$
                        – Oliver
                        4 hours ago










                      • $begingroup$
                        @Oliver will fail for "/o\n__"
                        $endgroup$
                        – tsh
                        3 hours ago
















                      $begingroup$
                      Wow. Could you explain how that works?
                      $endgroup$
                      – connectyourcharger
                      7 hours ago




                      $begingroup$
                      Wow. Could you explain how that works?
                      $endgroup$
                      – connectyourcharger
                      7 hours ago












                      $begingroup$
                      @connectyourcharger I've added an explanation.
                      $endgroup$
                      – Arnauld
                      7 hours ago




                      $begingroup$
                      @connectyourcharger I've added an explanation.
                      $endgroup$
                      – Arnauld
                      7 hours ago












                      $begingroup$
                      Genius! JS answers usually aren't that short.
                      $endgroup$
                      – connectyourcharger
                      7 hours ago




                      $begingroup$
                      Genius! JS answers usually aren't that short.
                      $endgroup$
                      – connectyourcharger
                      7 hours ago












                      $begingroup$
                      Would this work for 35 bytes?
                      $endgroup$
                      – Oliver
                      4 hours ago




                      $begingroup$
                      Would this work for 35 bytes?
                      $endgroup$
                      – Oliver
                      4 hours ago












                      $begingroup$
                      @Oliver will fail for "/o\n__"
                      $endgroup$
                      – tsh
                      3 hours ago





                      $begingroup$
                      @Oliver will fail for "/o\n__"
                      $endgroup$
                      – tsh
                      3 hours ago












                      2












                      $begingroup$

                      Haskell, 59 bytes



                      f a b=sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2


                      Try it online!



                      The function is called like so: f "/o\ " " -- "



                      How it works (for f "/o\" " -"):



                      b++cycle" " - Adds an infinite number of spaces after b to ensure that Jimmy is always above a - or (" -" &rightarrow; " - ..."



                      zip a$b++cycle" " - Zips the two strings together ([('/',' '), ('o','-'), ('\',' ')])



                      (p,q)<-zip a$b++cycle - For each pair in the zipped list



                      [1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Generates a list of 1s, whose length is the number of pairs satisfying the conditions:



                      elem p"/o\" - The character in the top string is one of Jimmy's body parts. (Satisfied by all three pairs in this example)



                      q==' ' - The character in the bottom string is a space. (Satisfied by ('/', ' ') and ('\', ' '))



                      So, the pair has to be one where one of Jimmy's body parts is above a space.



                      Because in this example, two pairs satisfy both conditions, the list is [1,1]



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Take the sum of those 1s (i.e. the length of the list), which in this example is 2.



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2 - Check if the number of body parts above a space is less than 2. In this example, it's not, so Jimmy will fall off. :(






                      share|improve this answer









                      $endgroup$












                      • $begingroup$
                        I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
                        $endgroup$
                        – Sriotchilism O'Zaic
                        4 hours ago















                      2












                      $begingroup$

                      Haskell, 59 bytes



                      f a b=sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2


                      Try it online!



                      The function is called like so: f "/o\ " " -- "



                      How it works (for f "/o\" " -"):



                      b++cycle" " - Adds an infinite number of spaces after b to ensure that Jimmy is always above a - or (" -" &rightarrow; " - ..."



                      zip a$b++cycle" " - Zips the two strings together ([('/',' '), ('o','-'), ('\',' ')])



                      (p,q)<-zip a$b++cycle - For each pair in the zipped list



                      [1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Generates a list of 1s, whose length is the number of pairs satisfying the conditions:



                      elem p"/o\" - The character in the top string is one of Jimmy's body parts. (Satisfied by all three pairs in this example)



                      q==' ' - The character in the bottom string is a space. (Satisfied by ('/', ' ') and ('\', ' '))



                      So, the pair has to be one where one of Jimmy's body parts is above a space.



                      Because in this example, two pairs satisfy both conditions, the list is [1,1]



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Take the sum of those 1s (i.e. the length of the list), which in this example is 2.



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2 - Check if the number of body parts above a space is less than 2. In this example, it's not, so Jimmy will fall off. :(






                      share|improve this answer









                      $endgroup$












                      • $begingroup$
                        I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
                        $endgroup$
                        – Sriotchilism O'Zaic
                        4 hours ago













                      2












                      2








                      2





                      $begingroup$

                      Haskell, 59 bytes



                      f a b=sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2


                      Try it online!



                      The function is called like so: f "/o\ " " -- "



                      How it works (for f "/o\" " -"):



                      b++cycle" " - Adds an infinite number of spaces after b to ensure that Jimmy is always above a - or (" -" &rightarrow; " - ..."



                      zip a$b++cycle" " - Zips the two strings together ([('/',' '), ('o','-'), ('\',' ')])



                      (p,q)<-zip a$b++cycle - For each pair in the zipped list



                      [1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Generates a list of 1s, whose length is the number of pairs satisfying the conditions:



                      elem p"/o\" - The character in the top string is one of Jimmy's body parts. (Satisfied by all three pairs in this example)



                      q==' ' - The character in the bottom string is a space. (Satisfied by ('/', ' ') and ('\', ' '))



                      So, the pair has to be one where one of Jimmy's body parts is above a space.



                      Because in this example, two pairs satisfy both conditions, the list is [1,1]



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Take the sum of those 1s (i.e. the length of the list), which in this example is 2.



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2 - Check if the number of body parts above a space is less than 2. In this example, it's not, so Jimmy will fall off. :(






                      share|improve this answer









                      $endgroup$



                      Haskell, 59 bytes



                      f a b=sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2


                      Try it online!



                      The function is called like so: f "/o\ " " -- "



                      How it works (for f "/o\" " -"):



                      b++cycle" " - Adds an infinite number of spaces after b to ensure that Jimmy is always above a - or (" -" &rightarrow; " - ..."



                      zip a$b++cycle" " - Zips the two strings together ([('/',' '), ('o','-'), ('\',' ')])



                      (p,q)<-zip a$b++cycle - For each pair in the zipped list



                      [1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Generates a list of 1s, whose length is the number of pairs satisfying the conditions:



                      elem p"/o\" - The character in the top string is one of Jimmy's body parts. (Satisfied by all three pairs in this example)



                      q==' ' - The character in the bottom string is a space. (Satisfied by ('/', ' ') and ('\', ' '))



                      So, the pair has to be one where one of Jimmy's body parts is above a space.



                      Because in this example, two pairs satisfy both conditions, the list is [1,1]



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' '] - Take the sum of those 1s (i.e. the length of the list), which in this example is 2.



                      sum[1|(p,q)<-zip a$b++cycle" ",elem p"/o\",q==' ']<2 - Check if the number of body parts above a space is less than 2. In this example, it's not, so Jimmy will fall off. :(







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered 5 hours ago









                      Leo TenenbaumLeo Tenenbaum

                      9752 gold badges4 silver badges10 bronze badges




                      9752 gold badges4 silver badges10 bronze badges











                      • $begingroup$
                        I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
                        $endgroup$
                        – Sriotchilism O'Zaic
                        4 hours ago
















                      • $begingroup$
                        I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
                        $endgroup$
                        – Sriotchilism O'Zaic
                        4 hours ago















                      $begingroup$
                      I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
                      $endgroup$
                      – Sriotchilism O'Zaic
                      4 hours ago




                      $begingroup$
                      I just thought I would let you know that your answer helped me to shorten my own answer. So thanks!
                      $endgroup$
                      – Sriotchilism O'Zaic
                      4 hours ago











                      1












                      $begingroup$

                      Dyalog APL Extended, 11 10 bytes





                      2≤+/∧⌿<⍵


                      Try it online! Takes the input as a matrix.



                      Explanation:



                      2≤+/∧⌿<⍵ a monadic function with argument ⍵
                      <⍵ Compare with the implicit prototype element - a space.
                      Returns a matrix of characters that are greater than 0x20
                      ∧⌿ and-reduce, i.e. places where both Jimmy and a platform is
                      +/ sum that array, i.e. amount of body parts over a platform
                      2≤ is that greater-or-equal to 2?





                      share|improve this answer











                      $endgroup$








                      • 1




                        $begingroup$
                        -2: 2≤1⊥∧⌿⍤<
                        $endgroup$
                        – Adám
                        6 hours ago















                      1












                      $begingroup$

                      Dyalog APL Extended, 11 10 bytes





                      2≤+/∧⌿<⍵


                      Try it online! Takes the input as a matrix.



                      Explanation:



                      2≤+/∧⌿<⍵ a monadic function with argument ⍵
                      <⍵ Compare with the implicit prototype element - a space.
                      Returns a matrix of characters that are greater than 0x20
                      ∧⌿ and-reduce, i.e. places where both Jimmy and a platform is
                      +/ sum that array, i.e. amount of body parts over a platform
                      2≤ is that greater-or-equal to 2?





                      share|improve this answer











                      $endgroup$








                      • 1




                        $begingroup$
                        -2: 2≤1⊥∧⌿⍤<
                        $endgroup$
                        – Adám
                        6 hours ago













                      1












                      1








                      1





                      $begingroup$

                      Dyalog APL Extended, 11 10 bytes





                      2≤+/∧⌿<⍵


                      Try it online! Takes the input as a matrix.



                      Explanation:



                      2≤+/∧⌿<⍵ a monadic function with argument ⍵
                      <⍵ Compare with the implicit prototype element - a space.
                      Returns a matrix of characters that are greater than 0x20
                      ∧⌿ and-reduce, i.e. places where both Jimmy and a platform is
                      +/ sum that array, i.e. amount of body parts over a platform
                      2≤ is that greater-or-equal to 2?





                      share|improve this answer











                      $endgroup$



                      Dyalog APL Extended, 11 10 bytes





                      2≤+/∧⌿<⍵


                      Try it online! Takes the input as a matrix.



                      Explanation:



                      2≤+/∧⌿<⍵ a monadic function with argument ⍵
                      <⍵ Compare with the implicit prototype element - a space.
                      Returns a matrix of characters that are greater than 0x20
                      ∧⌿ and-reduce, i.e. places where both Jimmy and a platform is
                      +/ sum that array, i.e. amount of body parts over a platform
                      2≤ is that greater-or-equal to 2?






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 7 hours ago

























                      answered 7 hours ago









                      dzaimadzaima

                      16.9k2 gold badges26 silver badges64 bronze badges




                      16.9k2 gold badges26 silver badges64 bronze badges







                      • 1




                        $begingroup$
                        -2: 2≤1⊥∧⌿⍤<
                        $endgroup$
                        – Adám
                        6 hours ago












                      • 1




                        $begingroup$
                        -2: 2≤1⊥∧⌿⍤<
                        $endgroup$
                        – Adám
                        6 hours ago







                      1




                      1




                      $begingroup$
                      -2: 2≤1⊥∧⌿⍤<
                      $endgroup$
                      – Adám
                      6 hours ago




                      $begingroup$
                      -2: 2≤1⊥∧⌿⍤<
                      $endgroup$
                      – Adám
                      6 hours ago











                      1












                      $begingroup$


                      Perl 6, 18 bytes





                      ?/''Bo&[~^]


                      Try it online!



                      Takes a two parameters and returns a boolean of whether Jimmy will stay on the platform. This works by XORing the two lines together and checking if either part of Jimmy is still on the platform.



                      Explanation:



                       &[~^] # String XOR operator
                      o # Combined with the anonymous function
                      ?/ / # That checks for the regex match
                      ''B # Unprintable, B, which is "/o" ~^ "--"
                      |Bq # Or B, q, which is "o" ~^ "--"





                      share|improve this answer











                      $endgroup$

















                        1












                        $begingroup$


                        Perl 6, 18 bytes





                        ?/''Bo&[~^]


                        Try it online!



                        Takes a two parameters and returns a boolean of whether Jimmy will stay on the platform. This works by XORing the two lines together and checking if either part of Jimmy is still on the platform.



                        Explanation:



                         &[~^] # String XOR operator
                        o # Combined with the anonymous function
                        ?/ / # That checks for the regex match
                        ''B # Unprintable, B, which is "/o" ~^ "--"
                        |Bq # Or B, q, which is "o" ~^ "--"





                        share|improve this answer











                        $endgroup$















                          1












                          1








                          1





                          $begingroup$


                          Perl 6, 18 bytes





                          ?/''Bo&[~^]


                          Try it online!



                          Takes a two parameters and returns a boolean of whether Jimmy will stay on the platform. This works by XORing the two lines together and checking if either part of Jimmy is still on the platform.



                          Explanation:



                           &[~^] # String XOR operator
                          o # Combined with the anonymous function
                          ?/ / # That checks for the regex match
                          ''B # Unprintable, B, which is "/o" ~^ "--"
                          |Bq # Or B, q, which is "o" ~^ "--"





                          share|improve this answer











                          $endgroup$




                          Perl 6, 18 bytes





                          ?/''Bo&[~^]


                          Try it online!



                          Takes a two parameters and returns a boolean of whether Jimmy will stay on the platform. This works by XORing the two lines together and checking if either part of Jimmy is still on the platform.



                          Explanation:



                           &[~^] # String XOR operator
                          o # Combined with the anonymous function
                          ?/ / # That checks for the regex match
                          ''B # Unprintable, B, which is "/o" ~^ "--"
                          |Bq # Or B, q, which is "o" ~^ "--"






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 2 hours ago

























                          answered 5 hours ago









                          Jo KingJo King

                          29.3k3 gold badges69 silver badges135 bronze badges




                          29.3k3 gold badges69 silver badges135 bronze badges





















                              1












                              $begingroup$

                              VBA (Excel), 87 bytes EXCEL, 94 bytes



                              A1 = Jimmy , A2 = platform



                              =(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)*(LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))>1)



                              ?[(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)]*(len(replace([A2]," ",""))>1)





                              share|improve this answer











                              $endgroup$

















                                1












                                $begingroup$

                                VBA (Excel), 87 bytes EXCEL, 94 bytes



                                A1 = Jimmy , A2 = platform



                                =(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)*(LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))>1)



                                ?[(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)]*(len(replace([A2]," ",""))>1)





                                share|improve this answer











                                $endgroup$















                                  1












                                  1








                                  1





                                  $begingroup$

                                  VBA (Excel), 87 bytes EXCEL, 94 bytes



                                  A1 = Jimmy , A2 = platform



                                  =(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)*(LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))>1)



                                  ?[(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)]*(len(replace([A2]," ",""))>1)





                                  share|improve this answer











                                  $endgroup$



                                  VBA (Excel), 87 bytes EXCEL, 94 bytes



                                  A1 = Jimmy , A2 = platform



                                  =(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)*(LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))>1)



                                  ?[(FIND("-",A2)-FIND("/",A1)<2)*(FIND("",A1)-LEN(A2)<2)]*(len(replace([A2]," ",""))>1)






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 1 hour ago

























                                  answered 1 hour ago









                                  remoelremoel

                                  4612 silver badges6 bronze badges




                                  4612 silver badges6 bronze badges





















                                      0












                                      $begingroup$


                                      R, 35 bytes





                                      function(x)sum(colSums(x!=" ")>1)>1


                                      Try it online!



                                      Based on @EriktheOutgolfer’s excellent Jelly answer so please upvote that one too!



                                      Input is a 2-d matrix of characters.






                                      share|improve this answer









                                      $endgroup$

















                                        0












                                        $begingroup$


                                        R, 35 bytes





                                        function(x)sum(colSums(x!=" ")>1)>1


                                        Try it online!



                                        Based on @EriktheOutgolfer’s excellent Jelly answer so please upvote that one too!



                                        Input is a 2-d matrix of characters.






                                        share|improve this answer









                                        $endgroup$















                                          0












                                          0








                                          0





                                          $begingroup$


                                          R, 35 bytes





                                          function(x)sum(colSums(x!=" ")>1)>1


                                          Try it online!



                                          Based on @EriktheOutgolfer’s excellent Jelly answer so please upvote that one too!



                                          Input is a 2-d matrix of characters.






                                          share|improve this answer









                                          $endgroup$




                                          R, 35 bytes





                                          function(x)sum(colSums(x!=" ")>1)>1


                                          Try it online!



                                          Based on @EriktheOutgolfer’s excellent Jelly answer so please upvote that one too!



                                          Input is a 2-d matrix of characters.







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered 7 hours ago









                                          Nick KennedyNick Kennedy

                                          4,0497 silver badges12 bronze badges




                                          4,0497 silver badges12 bronze badges





















                                              0












                                              $begingroup$

                                              C (gcc), 103 bytes





                                              i,j,l;f(char*s)for(i=0;*s-10;j=*s++-47?j:i)++i;l=strlen(s)>j+1;s+=j;return l&&*s+s[1]+(s[2]?:32)>109;


                                              Try it online!



                                              Would be much shorter (75 bytes), if it could be assumed that there is trailing whitespace after the platform.






                                              share|improve this answer









                                              $endgroup$












                                              • $begingroup$
                                                95 bytes
                                                $endgroup$
                                                – ceilingcat
                                                5 hours ago















                                              0












                                              $begingroup$

                                              C (gcc), 103 bytes





                                              i,j,l;f(char*s)for(i=0;*s-10;j=*s++-47?j:i)++i;l=strlen(s)>j+1;s+=j;return l&&*s+s[1]+(s[2]?:32)>109;


                                              Try it online!



                                              Would be much shorter (75 bytes), if it could be assumed that there is trailing whitespace after the platform.






                                              share|improve this answer









                                              $endgroup$












                                              • $begingroup$
                                                95 bytes
                                                $endgroup$
                                                – ceilingcat
                                                5 hours ago













                                              0












                                              0








                                              0





                                              $begingroup$

                                              C (gcc), 103 bytes





                                              i,j,l;f(char*s)for(i=0;*s-10;j=*s++-47?j:i)++i;l=strlen(s)>j+1;s+=j;return l&&*s+s[1]+(s[2]?:32)>109;


                                              Try it online!



                                              Would be much shorter (75 bytes), if it could be assumed that there is trailing whitespace after the platform.






                                              share|improve this answer









                                              $endgroup$



                                              C (gcc), 103 bytes





                                              i,j,l;f(char*s)for(i=0;*s-10;j=*s++-47?j:i)++i;l=strlen(s)>j+1;s+=j;return l&&*s+s[1]+(s[2]?:32)>109;


                                              Try it online!



                                              Would be much shorter (75 bytes), if it could be assumed that there is trailing whitespace after the platform.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered 5 hours ago









                                              SteadyboxSteadybox

                                              15k4 gold badges29 silver badges81 bronze badges




                                              15k4 gold badges29 silver badges81 bronze badges











                                              • $begingroup$
                                                95 bytes
                                                $endgroup$
                                                – ceilingcat
                                                5 hours ago
















                                              • $begingroup$
                                                95 bytes
                                                $endgroup$
                                                – ceilingcat
                                                5 hours ago















                                              $begingroup$
                                              95 bytes
                                              $endgroup$
                                              – ceilingcat
                                              5 hours ago




                                              $begingroup$
                                              95 bytes
                                              $endgroup$
                                              – ceilingcat
                                              5 hours ago











                                              0












                                              $begingroup$


                                              Retina, 31 bytes



                                              ^(.)*/.*¶(?<-1>.)*(?(1)!) ?---?


                                              Try it online!



                                              A simple regex that determines whether at least two pieces of the platform are directly beneath Jimmy. Assumes that the input will contain no ! characters.






                                              share|improve this answer









                                              $endgroup$

















                                                0












                                                $begingroup$


                                                Retina, 31 bytes



                                                ^(.)*/.*¶(?<-1>.)*(?(1)!) ?---?


                                                Try it online!



                                                A simple regex that determines whether at least two pieces of the platform are directly beneath Jimmy. Assumes that the input will contain no ! characters.






                                                share|improve this answer









                                                $endgroup$















                                                  0












                                                  0








                                                  0





                                                  $begingroup$


                                                  Retina, 31 bytes



                                                  ^(.)*/.*¶(?<-1>.)*(?(1)!) ?---?


                                                  Try it online!



                                                  A simple regex that determines whether at least two pieces of the platform are directly beneath Jimmy. Assumes that the input will contain no ! characters.






                                                  share|improve this answer









                                                  $endgroup$




                                                  Retina, 31 bytes



                                                  ^(.)*/.*¶(?<-1>.)*(?(1)!) ?---?


                                                  Try it online!



                                                  A simple regex that determines whether at least two pieces of the platform are directly beneath Jimmy. Assumes that the input will contain no ! characters.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered 5 hours ago









                                                  FryAmTheEggmanFryAmTheEggman

                                                  15.1k3 gold badges25 silver badges85 bronze badges




                                                  15.1k3 gold badges25 silver badges85 bronze badges





















                                                      0












                                                      $begingroup$

                                                      Japt , 9 bytes



                                                      -1 byte if the input can be reversed.



                                                      VtUao)è-²


                                                      Try it online






                                                      share|improve this answer











                                                      $endgroup$








                                                      • 1




                                                        $begingroup$
                                                        @SriotchilismO'Zaic Updated
                                                        $endgroup$
                                                        – Oliver
                                                        3 hours ago















                                                      0












                                                      $begingroup$

                                                      Japt , 9 bytes



                                                      -1 byte if the input can be reversed.



                                                      VtUao)è-²


                                                      Try it online






                                                      share|improve this answer











                                                      $endgroup$








                                                      • 1




                                                        $begingroup$
                                                        @SriotchilismO'Zaic Updated
                                                        $endgroup$
                                                        – Oliver
                                                        3 hours ago













                                                      0












                                                      0








                                                      0





                                                      $begingroup$

                                                      Japt , 9 bytes



                                                      -1 byte if the input can be reversed.



                                                      VtUao)è-²


                                                      Try it online






                                                      share|improve this answer











                                                      $endgroup$



                                                      Japt , 9 bytes



                                                      -1 byte if the input can be reversed.



                                                      VtUao)è-²


                                                      Try it online







                                                      share|improve this answer














                                                      share|improve this answer



                                                      share|improve this answer








                                                      edited 3 hours ago

























                                                      answered 3 hours ago









                                                      OliverOliver

                                                      5,5451 gold badge8 silver badges33 bronze badges




                                                      5,5451 gold badge8 silver badges33 bronze badges







                                                      • 1




                                                        $begingroup$
                                                        @SriotchilismO'Zaic Updated
                                                        $endgroup$
                                                        – Oliver
                                                        3 hours ago












                                                      • 1




                                                        $begingroup$
                                                        @SriotchilismO'Zaic Updated
                                                        $endgroup$
                                                        – Oliver
                                                        3 hours ago







                                                      1




                                                      1




                                                      $begingroup$
                                                      @SriotchilismO'Zaic Updated
                                                      $endgroup$
                                                      – Oliver
                                                      3 hours ago




                                                      $begingroup$
                                                      @SriotchilismO'Zaic Updated
                                                      $endgroup$
                                                      – Oliver
                                                      3 hours ago











                                                      0












                                                      $begingroup$


                                                      V, 18 bytes



                                                      0vt/"_dj.d3lVkp0#x


                                                      Try it online!



                                                      Output whitespace only if jimmy fall of the platform. Output something non-whitespace if jimmy stay on the platform.






                                                      share|improve this answer









                                                      $endgroup$












                                                      • $begingroup$
                                                        Not using Ctrl or Esc in Vim is funny.
                                                        $endgroup$
                                                        – tsh
                                                        49 mins ago
















                                                      0












                                                      $begingroup$


                                                      V, 18 bytes



                                                      0vt/"_dj.d3lVkp0#x


                                                      Try it online!



                                                      Output whitespace only if jimmy fall of the platform. Output something non-whitespace if jimmy stay on the platform.






                                                      share|improve this answer









                                                      $endgroup$












                                                      • $begingroup$
                                                        Not using Ctrl or Esc in Vim is funny.
                                                        $endgroup$
                                                        – tsh
                                                        49 mins ago














                                                      0












                                                      0








                                                      0





                                                      $begingroup$


                                                      V, 18 bytes



                                                      0vt/"_dj.d3lVkp0#x


                                                      Try it online!



                                                      Output whitespace only if jimmy fall of the platform. Output something non-whitespace if jimmy stay on the platform.






                                                      share|improve this answer









                                                      $endgroup$




                                                      V, 18 bytes



                                                      0vt/"_dj.d3lVkp0#x


                                                      Try it online!



                                                      Output whitespace only if jimmy fall of the platform. Output something non-whitespace if jimmy stay on the platform.







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered 51 mins ago









                                                      tshtsh

                                                      10.3k1 gold badge16 silver badges57 bronze badges




                                                      10.3k1 gold badge16 silver badges57 bronze badges











                                                      • $begingroup$
                                                        Not using Ctrl or Esc in Vim is funny.
                                                        $endgroup$
                                                        – tsh
                                                        49 mins ago

















                                                      • $begingroup$
                                                        Not using Ctrl or Esc in Vim is funny.
                                                        $endgroup$
                                                        – tsh
                                                        49 mins ago
















                                                      $begingroup$
                                                      Not using Ctrl or Esc in Vim is funny.
                                                      $endgroup$
                                                      – tsh
                                                      49 mins ago





                                                      $begingroup$
                                                      Not using Ctrl or Esc in Vim is funny.
                                                      $endgroup$
                                                      – tsh
                                                      49 mins ago












                                                      0












                                                      $begingroup$


                                                      Japt, 8 bytes



                                                      Õ·kèS Êz


                                                      Try it






                                                      share|improve this answer









                                                      $endgroup$

















                                                        0












                                                        $begingroup$


                                                        Japt, 8 bytes



                                                        Õ·kèS Êz


                                                        Try it






                                                        share|improve this answer









                                                        $endgroup$















                                                          0












                                                          0








                                                          0





                                                          $begingroup$


                                                          Japt, 8 bytes



                                                          Õ·kèS Êz


                                                          Try it






                                                          share|improve this answer









                                                          $endgroup$




                                                          Japt, 8 bytes



                                                          Õ·kèS Êz


                                                          Try it







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered 46 mins ago









                                                          Embodiment of IgnoranceEmbodiment of Ignorance

                                                          4,3461 silver badge28 bronze badges




                                                          4,3461 silver badge28 bronze badges



























                                                              draft saved

                                                              draft discarded
















































                                                              If this is an answer to a challenge…



                                                              • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                              • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                Explanations of your answer make it more interesting to read and are very much encouraged.


                                                              • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                                              More generally…



                                                              • …Please make sure to answer the question and provide sufficient detail.


                                                              • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function ()
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f187586%2fwill-jimmy-fall-off-his-platform%23new-answer', 'question_page');

                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу

                                                              Israel Cuprins Etimologie | Istorie | Geografie | Politică | Demografie | Educație | Economie | Cultură | Note explicative | Note bibliografice | Bibliografie | Legături externe | Meniu de navigaresite web oficialfacebooktweeterGoogle+Instagramcanal YouTubeInstagramtextmodificaremodificarewww.technion.ac.ilnew.huji.ac.ilwww.weizmann.ac.ilwww1.biu.ac.ilenglish.tau.ac.ilwww.haifa.ac.ilin.bgu.ac.ilwww.openu.ac.ilwww.ariel.ac.ilCIA FactbookHarta Israelului"Negotiating Jerusalem," Palestine–Israel JournalThe Schizoid Nature of Modern Hebrew: A Slavic Language in Search of a Semitic Past„Arabic in Israel: an official language and a cultural bridge”„Latest Population Statistics for Israel”„Israel Population”„Tables”„Report for Selected Countries and Subjects”Human Development Report 2016: Human Development for Everyone„Distribution of family income - Gini index”The World FactbookJerusalem Law„Israel”„Israel”„Zionist Leaders: David Ben-Gurion 1886–1973”„The status of Jerusalem”„Analysis: Kadima's big plans”„Israel's Hard-Learned Lessons”„The Legacy of Undefined Borders, Tel Aviv Notes No. 40, 5 iunie 2002”„Israel Journal: A Land Without Borders”„Population”„Israel closes decade with population of 7.5 million”Time Series-DataBank„Selected Statistics on Jerusalem Day 2007 (Hebrew)”Golan belongs to Syria, Druze protestGlobal Survey 2006: Middle East Progress Amid Global Gains in FreedomWHO: Life expectancy in Israel among highest in the worldInternational Monetary Fund, World Economic Outlook Database, April 2011: Nominal GDP list of countries. Data for the year 2010.„Israel's accession to the OECD”Popular Opinion„On the Move”Hosea 12:5„Walking the Bible Timeline”„Palestine: History”„Return to Zion”An invention called 'the Jewish people' – Haaretz – Israel NewsoriginalJewish and Non-Jewish Population of Palestine-Israel (1517–2004)ImmigrationJewishvirtuallibrary.orgChapter One: The Heralders of Zionism„The birth of modern Israel: A scrap of paper that changed history”„League of Nations: The Mandate for Palestine, 24 iulie 1922”The Population of Palestine Prior to 1948originalBackground Paper No. 47 (ST/DPI/SER.A/47)History: Foreign DominationTwo Hundred and Seventh Plenary Meeting„Israel (Labor Zionism)”Population, by Religion and Population GroupThe Suez CrisisAdolf EichmannJustice Ministry Reply to Amnesty International Report„The Interregnum”Israel Ministry of Foreign Affairs – The Palestinian National Covenant- July 1968Research on terrorism: trends, achievements & failuresThe Routledge Atlas of the Arab–Israeli conflict: The Complete History of the Struggle and the Efforts to Resolve It"George Habash, Palestinian Terrorism Tactician, Dies at 82."„1973: Arab states attack Israeli forces”Agranat Commission„Has Israel Annexed East Jerusalem?”original„After 4 Years, Intifada Still Smolders”From the End of the Cold War to 2001originalThe Oslo Accords, 1993Israel-PLO Recognition – Exchange of Letters between PM Rabin and Chairman Arafat – Sept 9- 1993Foundation for Middle East PeaceSources of Population Growth: Total Israeli Population and Settler Population, 1991–2003original„Israel marks Rabin assassination”The Wye River Memorandumoriginal„West Bank barrier route disputed, Israeli missile kills 2”"Permanent Ceasefire to Be Based on Creation Of Buffer Zone Free of Armed Personnel Other than UN, Lebanese Forces"„Hezbollah kills 8 soldiers, kidnaps two in offensive on northern border”„Olmert confirms peace talks with Syria”„Battleground Gaza: Israeli ground forces invade the strip”„IDF begins Gaza troop withdrawal, hours after ending 3-week offensive”„THE LAND: Geography and Climate”„Area of districts, sub-districts, natural regions and lakes”„Israel - Geography”„Makhteshim Country”Israel and the Palestinian Territories„Makhtesh Ramon”„The Living Dead Sea”„Temperatures reach record high in Pakistan”„Climate Extremes In Israel”Israel in figures„Deuteronom”„JNF: 240 million trees planted since 1901”„Vegetation of Israel and Neighboring Countries”Environmental Law in Israel„Executive branch”„Israel's election process explained”„The Electoral System in Israel”„Constitution for Israel”„All 120 incoming Knesset members”„Statul ISRAEL”„The Judiciary: The Court System”„Israel's high court unique in region”„Israel and the International Criminal Court: A Legal Battlefield”„Localities and population, by population group, district, sub-district and natural region”„Israel: Districts, Major Cities, Urban Localities & Metropolitan Areas”„Israel-Egypt Relations: Background & Overview of Peace Treaty”„Solana to Haaretz: New Rules of War Needed for Age of Terror”„Israel's Announcement Regarding Settlements”„United Nations Security Council Resolution 497”„Security Council resolution 478 (1980) on the status of Jerusalem”„Arabs will ask U.N. to seek razing of Israeli wall”„Olmert: Willing to trade land for peace”„Mapping Peace between Syria and Israel”„Egypt: Israel must accept the land-for-peace formula”„Israel: Age structure from 2005 to 2015”„Global, regional, and national disability-adjusted life years (DALYs) for 306 diseases and injuries and healthy life expectancy (HALE) for 188 countries, 1990–2013: quantifying the epidemiological transition”10.1016/S0140-6736(15)61340-X„World Health Statistics 2014”„Life expectancy for Israeli men world's 4th highest”„Family Structure and Well-Being Across Israel's Diverse Population”„Fertility among Jewish and Muslim Women in Israel, by Level of Religiosity, 1979-2009”„Israel leaders in birth rate, but poverty major challenge”„Ethnic Groups”„Israel's population: Over 8.5 million”„Israel - Ethnic groups”„Jews, by country of origin and age”„Minority Communities in Israel: Background & Overview”„Israel”„Language in Israel”„Selected Data from the 2011 Social Survey on Mastery of the Hebrew Language and Usage of Languages”„Religions”„5 facts about Israeli Druze, a unique religious and ethnic group”„Israël”Israel Country Study Guide„Haredi city in Negev – blessing or curse?”„New town Harish harbors hopes of being more than another Pleasantville”„List of localities, in alphabetical order”„Muncitorii români, doriți în Israel”„Prietenia româno-israeliană la nevoie se cunoaște”„The Higher Education System in Israel”„Middle East”„Academic Ranking of World Universities 2016”„Israel”„Israel”„Jewish Nobel Prize Winners”„All Nobel Prizes in Literature”„All Nobel Peace Prizes”„All Prizes in Economic Sciences”„All Nobel Prizes in Chemistry”„List of Fields Medallists”„Sakharov Prize”„Țara care și-a sfidat "destinul" și se bate umăr la umăr cu Silicon Valley”„Apple's R&D center in Israel grew to about 800 employees”„Tim Cook: Apple's Herzliya R&D center second-largest in world”„Lecții de economie de la Israel”„Land use”Israel Investment and Business GuideA Country Study: IsraelCentral Bureau of StatisticsFlorin Diaconu, „Kadima: Flexibilitate și pragmatism, dar nici un compromis în chestiuni vitale", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 71-72Florin Diaconu, „Likud: Dreapta israeliană constant opusă retrocedării teritoriilor cureite prin luptă în 1967", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 73-74MassadaIsraelul a crescut in 50 de ani cât alte state intr-un mileniuIsrael Government PortalIsraelIsraelIsraelmmmmmXX451232cb118646298(data)4027808-634110000 0004 0372 0767n7900328503691455-bb46-37e3-91d2-cb064a35ffcc1003570400564274ge1294033523775214929302638955X146498911146498911

                                                              Кастелфранко ди Сопра Становништво Референце Спољашње везе Мени за навигацију43°37′18″ СГШ; 11°33′32″ ИГД / 43.62156° СГШ; 11.55885° ИГД / 43.62156; 11.5588543°37′18″ СГШ; 11°33′32″ ИГД / 43.62156° СГШ; 11.55885° ИГД / 43.62156; 11.558853179688„The GeoNames geographical database”„Istituto Nazionale di Statistica”проширитиууWorldCat156923403n850174324558639-1cb14643287r(подаци)