Skip to main content
Commonmark migration
Source Link

#Pyth, 64 48 50 bytes

Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever (O(9n/3)) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an O(9n) solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever (O(9n/3)) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an O(9n) solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever (O(9n/3)) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an O(9n) solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB
removed LaTeX before deactivation of MathJax http://meta.codegolf.stackexchange.com/a/5057/8478
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever ($O(9^{n/3}$O(9n/3)) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an $O(9^n)$O(9n) solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever ($O(9^{n/3}$) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an $O(9^n)$ solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever (O(9n/3)) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an O(9n) solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB
added 276 characters in body
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever ($O(9^{n/3}$) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an $O(9^n)$ solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully here:

Test case.at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an $O(9^n)$ solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully here:

Test case.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

#Pyth, 64 48 50 bytes

#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.


Version that doesn't take forever ($O(9^{n/3}$) here, in 52 bytes.


This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.

This is an $O(9^n)$ solution.

Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.

xxd output:

0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB
added 33 characters in body
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213
Loading
added 72 characters in body
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213
Loading
edited body
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213
Loading
edited body
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213
Loading
added 319 characters in body
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213
Loading
Source Link
isaacg
  • 42.1k
  • 5
  • 73
  • 213
Loading