Telecran

Discussion of challenges you have already solved
virstulte
Posts: 2
Joined: Sun Sep 12, 2010 6:11 am

Post 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?
Yes. No? Perhaps. What?
User avatar
bodjo
Posts: 37
Joined: Sat Feb 26, 2011 9:27 am
Location: tunisia

Post by bodjo »

i like this challenge funny idea it took me a lot of time to find the right path :roll:
DaymItzJack
Posts: 106
Joined: Thu Oct 29, 2009 9:21 pm

Post 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.
compudemon
Posts: 33
Joined: Sat Aug 13, 2011 2:13 pm

Post by compudemon »

i need to learn drawing in python lol

Code: Select all

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

##############################################################################################################################################################################
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

I used Python and just made it write out a SVG so I didn't need anything like PIL
User avatar
bodjo
Posts: 37
Joined: Sat Feb 26, 2011 9:27 am
Location: tunisia

Post by bodjo »

I used python also with turtle much more easier then PIL
alakani
Posts: 2
Joined: Thu Jun 28, 2012 8:21 pm

Post 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');
gowron
Posts: 9
Joined: Mon Sep 20, 2010 2:23 pm

stretching is evil

Post 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.
Hmark1
Posts: 2
Joined: Wed Sep 26, 2012 12:37 pm

Post 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
AgRaven
Posts: 13
Joined: Sun Feb 24, 2013 8:27 am

Post 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.
Post Reply