Was this inspired in Right Key Left?
I have no idea what to do in teebee's challenge, though this one was easy ^^
Beautiful City
- MyNameIsAlreadyTaken
- Posts: 31
- Joined: Sun Oct 17, 2010 10:21 am
- Location: Germany
This challenge was quite easy, eventhough th "nothing" irritated me at first. I thought you would have to form the word "nothing" from letters in the grid, concatenate the numbers to the left and right of each letter and use these as Ascii-Codes. But each of these letters appeared too often so I figured out it was the wrong way.
Solving this problem was about 5 mins of coding in C++:
But i bet the solutions in Perl or Python are even easier ;)
Solving this problem was about 5 mins of coding in C++:
Code: Select all
int main(int argc, char* argv[]){
const char* strings[] = {"4T4 2Z2 8S5 3V2 1L4 9W8 0M3 7N2 6G7 1X3",
"0L1 1W7 5U3 5D3 7H2 5N9 4I8 8E2 1Z5 8R0",
"5A7 8N4 1I4 0Y5 7E3 1S1 1H8 7V2 0D1 3L0",
"6O5 9I0 8A6 0R4 3S6 3O4 1V4 8J3 0I0 0A0",
"7J4 0S0 4O8 8N0 6H1 8Q6 2A9 6G3 4F2 1S3",
"0I7 7G2 2H4 9B3 8M4 9I3 9C2 4X4 6T2 8S8",
"7I0 3E2 9G4 5V2 2I0 7N0 3X1 5I9 8B2 9W1",
"9I3 1B4 6G0 8S4 6T0 0Y0 0W2 3S0 4H3 0T9",
"7D2 5E0 6R7 2K5 4S6 1A3 2N5 6D5 5T2 5R3",
"2T4 0X5 3B2 3K8 9S3 8H5 3U7 0M4 2S7 9A9"};
int x = 0;
int y = 0;
int tmp = 0;
do{
std::cout<<strings[x][4 * y + 1];
tmp = (strings[x][4 * y] - '0');
y = (strings[x][4 * y + 2] - '0');
x = tmp;
}while((x != 0) || (y != 0));
}
-
- Posts: 106
- Joined: Thu Oct 29, 2009 9:21 pm
- dangermouse
- Posts: 89
- Joined: Sun Jun 05, 2011 8:14 pm
- Location: deep space computing AG
- Contact:
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
Haha, always with the row/column thing... at first I got "THISISTHEWRONGWAY"
Code: Select all
0 1 2 3 4 5 6 7 8 9
0 4T4 2Z2 8S5 3V2 1L4 9W8 0M3 7N2 6G7 1X3 0
1 0L1 1W7 5U3 5D3 7H2 5N9 4I8 8E2 1Z5 8R0 1
2 5A7 8N4 1I4 0Y5 7E3 1S1 1H8 7V2 0D1 3L0 2
3 6O5 9I0 8A6 0R4 3S6 3O4 1V4 8J3 0I0 0A0 3
4 7J4 0S0 4O8 8N0 6H1 8Q6 2A9 6G3 4F2 1S3 4
5 0I7 7G2 2H4 9B3 8M4 9I3 9C2 4X4 6T2 8S8 5
6 7I0 3E2 9G4 5V2 2I0 7N0 3X1 5I9 8B2 9W1 6
7 9I3 1B4 6G0 8S4 6T0 0Y0 0W2 3S0 4H3 0T9 7
8 7D2 5E0 6R7 2K5 4S6 1A3 2N5 6D5 5T2 5R3 8
9 2T4 0X5 3B2 3K8 9S3 8H5 3U7 0M4 2S7 9A9 9
0 1 2 3 4 5 6 7 8 9
Row/Column:
0/0: T
4/4: H
6/1: E
3/2: A
8/6: N
2/5: S
1/1: W
1/7: E
8/2: R
6/7: I
5/9: S
8/8: T
5/2: H
2/4: E
7/3: S
8/4: S
4/6: A
2/9: L
3/0: O
6/5: N
7/0: I
9/3: K
3/8: I