Skip to main content
disclaimered
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63

I heard somewhere that one thing that technology cannot do yet is fold towels1. So it is now your job to prove that statement false!

1: This has been disproved by Geobits and Laikoni. However, I did hear it somewhere.

I heard somewhere that one thing that technology cannot do yet is fold towels. So it is now your job to prove that statement false!

I heard somewhere that one thing that technology cannot do yet is fold towels1. So it is now your job to prove that statement false!

1: This has been disproved by Geobits and Laikoni. However, I did hear it somewhere.

added test case
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63
Input:
+------+
|      |
|      |
|      |
|      |
|      |
|      |
+------+
Output:
    +--+
    |  |
    |  |
    +--+




Input:
+--+ +--+ +--+
|  | |  | |  |
|  | |  | |  |
+--+ +--+ +--+

Output:
  ++   ++   ++
  ++   ++   ++
              
              
Input:
+----+
|    |
|    |
|    |
|    | ++
+----+ ++

Output:

   +-+
   | |
   +-+
      
        + 

Input:
+--+
+--+     ++
         ||
         ||
         ++
Output:
  ++
          +
          +
       
       
Input:
+------+
|      |
|      |
|      |
|      |
|      |
|      |
+------+
Output:
    +--+
    |  |
    |  |
    +--+




Input:
+--+ +--+ +--+
|  | |  | |  |
|  | |  | |  |
+--+ +--+ +--+

Output:
  ++   ++   ++
  ++   ++   ++
              
              
Input:
+----+
|    |
|    |
|    |
|    | ++
+----+ ++

Output:

   +-+
   | |
   +-+
      
        +
         
Input:
+------+
|      |
|      |
|      |
|      |
|      |
|      |
+------+
Output:
    +--+
    |  |
    |  |
    +--+




Input:
+--+ +--+ +--+
|  | |  | |  |
|  | |  | |  |
+--+ +--+ +--+

Output:
  ++   ++   ++
  ++   ++   ++
              
              
Input:
+----+
|    |
|    |
|    |
|    | ++
+----+ ++

Output:

   +-+
   | |
   +-+
      
        + 

Input:
+--+
+--+     ++
         ||
         ||
         ++
Output:
  ++
          +
          +
       
       
added 153 characters in body
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63
  • Standard methods of input/output.

  • Standard loopholes apply.

  • Input and output should be as a string.

  • Trailing whatevers are okay in output, as long as the towels are in the right place relative to each other.

  • You may assume that the length of each side of the towel will always be divisible by 2.

  • The towels passed as input will always be rectangular.

  • The towels will always be separated-- however, they may be separated by variable amounts.

  • , so shortest code wins!

  • Standard methods of input/output.

  • Standard loopholes apply.

  • Input and output should be as a string.

  • Trailing whatevers are okay in output, as long as the towels are in the right place relative to each other.

  • You may assume that the length of each side of the towel will always be divisible by 2.

  • , so shortest code wins!

  • Standard methods of input/output.

  • Standard loopholes apply.

  • Input and output should be as a string.

  • Trailing whatevers are okay in output, as long as the towels are in the right place relative to each other.

  • You may assume that the length of each side of the towel will always be divisible by 2.

  • The towels passed as input will always be rectangular.

  • The towels will always be separated-- however, they may be separated by variable amounts.

  • , so shortest code wins!

Tweeted twitter.com/StackCodeGolf/status/852572889727598592
the whitespace still shows
Source Link
Okx
  • 16.4k
  • 5
  • 43
  • 113
Loading
deleted 20 characters in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Loading
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63
Loading