Page 2 of 2

Posted: Tue Oct 05, 2010 8:24 pm
by virstulte
I think it's amusing that I actually did this brutally fast in Excel. I typed out U, L, D, or R depending on which way I thought the flags pointed, then imported those into a column into excel. A few if statements and I was able to incrementally change the x and y position and copy the formulas down. A scatter plot of the data points with a connecting line gave me a pretty clear answer. I thought about coding it, but figured why use C++ as a golden hammer?

Posted: Mon Aug 01, 2011 5:47 pm
by bodjo
i like this challenge funny idea it took me a lot of time to find the right path :roll:

Posted: Mon Aug 01, 2011 7:18 pm
by DaymItzJack
virstulte wrote:I think it's amusing that I actually did this brutally fast in Excel. I typed out U, L, D, or R depending on which way I thought the flags pointed, then imported those into a column into excel. A few if statements and I was able to incrementally change the x and y position and copy the formulas down. A scatter plot of the data points with a connecting line gave me a pretty clear answer. I thought about coding it, but figured why use C++ as a golden hammer?
The .png's actually have 'l', 'd', 'r', 'u' in them, IIRC.

Posted: Fri Aug 26, 2011 7:04 pm
by compudemon
i need to learn drawing in python lol

Code: Select all

 #--#--#  |              #--#--#  #--#        |  #--#--#--#              #--#              #--#--#--#  #--#--#                       #--#--#  #--#--#     #--#--#  |     |          
    |     |              |     |  |  |        |  |        |              |  |              |  |        |     |                       |           |        |        |     |          
    |     |              |     |  |  |        |  |        |              |  |              |  |        |     |                       |           |        |        |     |          
    |     #--#  #--#     #--#--#  |  #--#     |  |        #--#        #--#  #--#        #--#  |        |     |        |  #--#        |           |        |        #--#--#          
    |     |  |  |  |     |     |  |     |     |  |           |        |        |        |     |        |     |        |  |           |           |        |        |     |          
    |     |  |  |  |     |     |  |     |     |  |           |        |        |        |     |        |     |        |  |           |           |        |        |     |          
    #--#--#  #--#--#     |     |  |     #--#  |  #--#--#     #--#  #--#        #--#  #--#     #--#     #--#--#        |  #--#        #--#        |        |        |     |          
                |        |     |  |        |  |        |        |  |              |  |        |        |  |           |     |        |           |        |        |     |          
                |        |     |  |        |  |        |        |  |              |  |        |        |  |           |     |        |           |        |        |     |          
                #--#--#--#     #--#        #--#--#--#--#        #--#              #--#        #--#--#--#  #--#--#--#--#--#--#--#--#--#--#--#--#--#--#--#--#--#--#--#     #--# 

##############################################################################################################################################################################

Posted: Fri Aug 26, 2011 7:08 pm
by CodeX
I used Python and just made it write out a SVG so I didn't need anything like PIL

Posted: Sat Aug 27, 2011 12:36 pm
by bodjo
I used python also with turtle much more easier then PIL

Posted: Fri Jul 06, 2012 2:43 am
by alakani
More PHP, wewt. I'm glad the flag names contained U, D, L, R. This one was fun :D

Code: Select all

$page = file_get_contents('http://www.hacker.org/challenge/chal.php?id=52&name=alakani&password=XXXXXXXXXXXXX');
$lines = explode("\n", $page);

$x = 10; $y = 10; $lastx = 10; $lasty = 10;
$answer = imagecreate(590, 50);
$black = imagecolorallocate($answer, 0, 0, 0);
$white = imagecolorallocate($answer, 255, 255, 255);
imagefill($answer, 0, 0, $white);

foreach ($lines as $line) {
  $lastx = $x; $lasty = $y;
  if (strpos($line, 'wro.gif')) $x+=10;
  if (strpos($line, 'wlu.gif')) $x-=10;
  if (strpos($line, 'wdk.gif')) $y+=10;
  if (strpos($line, 'wua.gif')) $y-=10;
  imageline($answer, $lastx, $lasty, $x, $y, $black);
}

imagepng($answer, 'telecran.png');

stretching is evil

Posted: Tue Aug 28, 2012 11:44 pm
by gowron
When I finally caught how the countries translate to directions, everything seemed simlpe. As Matlab was running anyway I used it to plot the crane's path. But the picture looked somehow messed up and it took me another day to figure out that the scaling of x and y wasn't identical... funny how asymmetrically stretching an image destroys the readability.

Posted: Thu May 16, 2013 7:25 am
by Hmark1
This was a very funny challenge.
But somehow I took a few wrong steps at first.
A friend told me to try interpreting the directions on the numpad, starting at "5". :P

Posted: Tue Sep 03, 2013 9:28 am
by AgRaven
Heheh, I took a low-tech approach: I copied the html source to a document, find and replace with R,L,U,D as appropriate. After trying blocking it out in excel I had a better idea: if the challenge is about an etch-a-sketch, why not use one? Googled for an online version and voila: http://www.ohioart.com/lets_sketch.jsp

After getting "The An" I switched to the end of the instructions and did them in reverse (L=R, U=D etc), and after "tch" it was enough to guess.

Great challenge, loads of fun.