Skip to main content
added 62 characters in body
Source Link
Nick Kennedy
  • 21.2k
  • 3
  • 17
  • 43

Jelly, 23 22 bytes

ḟ0ṢṚ0_1x$}1ĿɗL<¥ß`ɗL<¥?Ḣ$1L?

Try it online!Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.

Thanks to @JonathanAllan for noting an issue with the second version.

Jelly, 23 22 bytes

ḟ0ṢṚ0_1x$}1ĿɗL<¥?Ḣ$1L?

Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.

Jelly, 22 bytes

ḟ0ṢṚ0_1x$}ß`ɗL<¥?Ḣ$1L?

Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.

Thanks to @JonathanAllan for noting an issue with the second version.

added 2 characters in body
Source Link
Nick Kennedy
  • 21.2k
  • 3
  • 17
  • 43

Jelly, 2323 22 bytes

0_1x$ḟ0ṢṚ0_1x$}ÑɗL<¥1ĿɗL<¥?
ḟ0ṢṚçḢ$1LḢ$1L?

Try it online!Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.

Jelly, 23 bytes

0_1x$}ÑɗL<¥?
ḟ0ṢṚçḢ$1L?

Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.

Jelly, 23 22 bytes

ḟ0ṢṚ0_1x$}1ĿɗL<¥?Ḣ$1L?

Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.

Source Link
Nick Kennedy
  • 21.2k
  • 3
  • 17
  • 43

Jelly, 23 bytes

0_1x$}ÑɗL<¥?
ḟ0ṢṚçḢ$1L?

Try it online!

A full program that takes the input list of answers as its argument and returns 1 for valid and 0 for impossible.