solved it with straight forward algorithm with 300 LoC in java.
I've implemented backtracking functionality, but my first choice was always correct so that no backtracking was done
running time with GUI was several seconds.
Search found 12 matches
- Fri Oct 26, 2012 7:11 pm
- Forum: Challenges Solved
- Topic: Shattered and Shuffled
- Replies: 13
- Views: 1131
- Wed Apr 18, 2012 10:06 pm
- Forum: Challenges Solved
- Topic: Spiral Bits
- Replies: 31
- Views: 2749
- Tue Apr 17, 2012 7:50 pm
- Forum: Challenges Solved
- Topic: Black Box
- Replies: 13
- Views: 1033
I guess not, therefore the reverse calculation is only about twice as fast as the normal brute force approach. Well, what you have to solve is the linear congruence equation: x*22233442 == 186968300 (mod 4294967296). This can be done with knowledge of elementary number theory (extended euclidean al...
- Thu Sep 10, 2009 12:26 pm
- Forum: Challenges
- Topic: Tic Tac Blah
- Replies: 31
- Views: 45600
- Thu Sep 10, 2009 11:19 am
- Forum: Challenges
- Topic: I need some help to solve 'One Minute Man'
- Replies: 5
- Views: 11173
- Thu Sep 10, 2009 6:14 am
- Forum: Challenges
- Topic: Floating
- Replies: 17
- Views: 24779
- Tue Sep 08, 2009 5:23 pm
- Forum: Challenges
- Topic: Once upon a time
- Replies: 24
- Views: 36236
- Mon Sep 07, 2009 4:51 pm
- Forum: Challenges Solved
- Topic: Smell as Sweet
- Replies: 15
- Views: 1275
- Mon Sep 07, 2009 11:22 am
- Forum: Challenges Solved
- Topic: Broken Image
- Replies: 15
- Views: 1470
my first thought was to perform a brute force substitution, but the size of the image is too large. so i had to checkout wiki for specifications of png format. after knowing a bit of the structure of png, i tried to trace the Python Imaging Lib reading that png file. when an error comes, the lib is ...
- Mon Sep 07, 2009 4:45 am
- Forum: Challenges
- Topic: Once upon a time
- Replies: 24
- Views: 36236
- Fri Sep 04, 2009 2:58 am
- Forum: Challenges
- Topic: Didactic XOR Cipher 3
- Replies: 35
- Views: 61503
- Thu Sep 03, 2009 8:30 pm
- Forum: Challenges Solved
- Topic: Broken Keys
- Replies: 15
- Views: 1488
you had a good solution, but yet another
I used the fact: when a<b, a/b equals 0.
max(a,b)=(a/b *a + b/a *b)/(a/b + b/a)
here's my code:
max(a,b)=(a/b *a + b/a *b)/(a/b + b/a)
here's my code:
Code: Select all
0<0<1</*1<1<0</*+0<1</1<0</+/p