Driveways

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Input is a map of buildings and roads. Connect each building to the road with the shortest straight driveway possible.
-MWI

Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

 |    # | #     # |
-+      |         |
 #    # | #     # |
   # #  |  # # #  |
        |         |
--------+---------+
# # # # | #        
       #|#         
# # # # |     # #  
--------+ #        

Sample output:

 |    #-+-#     #-+
-+      |         |
 #    #-+-#     #-+
   # #  |  # # #  |
   | |  |  | | |  |
+-+++++-+-++-++++-+
# # # # | #   | |  
       #+#    | |  
# # # # |     # #  
+-+-+-+-+-#        

Sample input:_

#  |   #   # |    #
   |   |     +-----
   +---+--+  |   # 
   #      |  |     
          +--+ #   
       #  |  #     
 #        |        
----------+        
          |   #    
      #   |        

Sample output:

#--+   #   #-+    #
   |   |     +---++
   +---+--+  |   # 
   #      |  |     
          +--+-#   
       #  +  #     
 #     |  |        
-+----++--+        
      |   +---#    
      #   |        

Sample input:_

      +-----+       
    +-+   # +-+     
   ++       # ++ #  
#  |  #        |    
   |        #  |   #
#  ++    #    ++    
    +-+     +-+     
      +--+--+       
         |    #     
#        |          

Sample output:

      +---+-+       
    +-+   # +-+     
   ++ |     # ++-#  
#--+  #        |    
   |        #  +---#
#--++    #  | ++    
    +-+  |  +-+     
      +--+--+ |     
         |    #     
#--------+          

Ranking

Perl _

RankUserSizeTimeDateStatistics
1tails1470.05032023/10/12 18:23:040B / 45B / 92B

gs2 _

RankUserSizeTimeDateStatistics
1whio680.75542023/10/20 11:47:3433B / 12B / 21B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o2787.98652023/10/15 03:32:510B / 151B / 109B

Language Ranking_

RankLangUserSizeScore
1gs2whio6810000
2Perltails1474625
3Scalarotary-o2782446

return to the top page