Archive for April, 2007
You are now browsing the archive for April in 2007.
You start off with two bases, Sylvanas’s and Varimathras’s in the upper left and Garithos’s in the lower right. As usual when you have to defend several fronts, lower the speed to slow from the start. The key here is taking the map on systematically. Gold is abundant, and thus you will not be in a hurry to expand.
Start by setting up a solid defense in both bases, and sending your Shades to strategical locations close to both the orange and the purple bases, so that you can anticipate their attacks and prepare specifically for them.
The optional quest to save the dwarves is a given. It is very easy to complete, and their siege tanks are an invaluable asset. Start by upgrading your Keep to a Castle, training some Footmen and upgrading as much as you can. After fighting back the first wave, which seems to come from the Green base every time, send Garithos and his units to the north to rescue the dwarves. You will need to do this quickly, since you will soon be attacked by flyers.
Next, build five Siege Engines and as many Knights as you have population for. Send Garithos and his army to the west, in order to secure another gold mine and get one threat off your back. Keep healing your troops and micromanaging the Siege Tanks, and you will have no problems leveling the base. In the worst case, you will have to retreat when your tanks have been destroyed, and attack again with more tanks. Tanks solve everything.
With the Green base out of the game, you can probably defeat Balnazzar’s base already. However, if you want to be on the safe side, get Sylvanas and an army of Banshees walking/hovering southwards. I never attacked the Orange base, but I figure that it shouldn’t be too much of a problem, as long as you make sure that you have time to return before Balnazzar has destroyed your base.
When time comes for the last assault on Balnazzar, start by attacking on Sylvanas’s side. Possess everything that you want. After a ten seconds or so, most of the defending units should have moved to the north-western part of the base in order to fight Sylvanas back. Don’t worry if you’re outnumbered, since this is only a decoy. Enter Garithos and a lot of Kights and Siege Tanks. The tanks will make a short story of any buildings, while the knights’ armor along with Lord Garithos’s Devotion aura make your army nearly impervious. Keep silencing and putting enemies asleep with Sylvanas and Varimathras, while maintaining a steady supply of new units. Once you start destroying the unit-producing buildings, the Dread Lord will stand no chance.
Even if you have given up your dreams of making it to the first pages of Digg and Slashdot, there’s lots of traffic out there orbiting the A-list sites, just waiting to be tapped into. I discovered the potential of Lifehacker by chance.

Lifehacker is not too keen on advertising your personal URL — instead, people have to follow a link to your profile, and can get further through there. This discourages many from being helpful and giving comments, since they feel that they are not given enough back. However, there is one underestimated part of commenting: linking to external sites. Which, coincidentally, happen to belong to you.
In the beginning of this year, I tried biphasic sleep. I resigned, though, since it was incompatible with my social life. Very timely, a post showed up on Lifehacker a month later about Power napping. Sharing my experiences, I’ve got 300 hits from that page in less than a month, and my comment was not even among the first five.
The point is that 10 hits a day is a lot for any small blog. I recommend subscribing to Lifehacker, if not for its excellent content, then for this reason. You don’t really need experience, either: just read up quickly on the subject, post a post, post a comment, and watch the traffic rolling in.
Mystic algorithm
Banned by Chinese firewall
Tell me who killed Jeeves
The algorithm is banned in China. This is not the algorithm. I figure that I owe the great web-comic xkcd too much to pass up on this semi-Google bomb. Perhaps I’m also doing hapless victims of the Algorithm a favor in helping them find xkcd, too.
All my keys displaced
I cannot find anything
Yet, it’s cool. Dvorak.
I just started learning. This is short since I’m using dvorak.
Haiku are not just
Sentences of seventeen
Syllables three-split
I’ve noticed that a lot of people decide to express (irrelevant?) opinions in the form of haiku. I’m guilty of it, too — the fact that only 17 syllables are needed is very attractive, since you do not need to put up an elaborate argument. Can’t people put the least bit of energy into making their haiku readable?
sound of the milk tooth
falling from her mouth onto
the bed woke us up
From Thumping Beet. (I don’t want to point fingers; this is just what got me thinking. No offense, Julie.) Seriously, I had to read three times to realize that it was only one sentence.
This chapter is really easy, as long as your micro-management is at its top. First of all, take the game speed down to Slow. Tempo is too important to play this map on even Medium. Next, divide your strike-force into two parts — Varimathras and the ghouls on one side, and Sylvanas and the rest on the other. You are going to take out every unit and every town hall in every base.
Your base
As soon as you have sent your forces on their way, start training Ghouls and Banshees. Send the Banshees to back-up Sylvanas, and the Ghouls to Varimathras. After a while, upgrade the Ghouls’ attack and defense at the Graveyard. As soon as you have enough gold, summon a Slaughterhouse for Meat Wagons and Abominations. Don’t bother with defense. There will be no forces to attack you.
Sylvanas’s team — Undead bases
On your way to the first base, you will encounter a footman guarding two Mortar Teams. The game hints you to possess them, and this is a good idea. Do so, and proceed into the city. Keep your Mortars away at first, until most of the opposing units have been killed. Have Sylvanas Charm as many Abominations you can. Only use Dark Arrow when necessary (the last few hits on a unit), since you’re going to need that mana for Charming. Make sure to proceed slowly and systematically through the city, so that you do not wake too many units simultaneously.
Do not attack the buildings, only the units. When you have cleaned the first base up, send in your mortars and let them attack the Necropolis. After it has been destroyed, take out the unit-producing buildings, starting with the ones producing the strongest units and going down.
Send your other forces, along with the newly trained Banshees, down to the next base. Charm the Frost Wyrm in the northwest of the base, and then possess Abominations. If you have any Banshees over, take on the Crypt Fiends. Next, focus all of your fire on the Dreadlord. Do not forget to wake sleeping units by attacking them once, or you’ll lose a lot of fire-power.
Once the military units are extinct, hunt down out the last acolytes and destroy the Necropolis. This way, you have effectively destroyed the base, and there is no need to stay there. Take Sylvanas’s army and the mortar teams to meet up with Varimathras.
Varimathras’s team — first Human base
Varimathras and his ever-increasing number of Ghouls will easily destroy the Town Hall and kill the peasants working there. Make good use of the Dreadlord’s Sleep spell, especially on that pesky knight. You can keep the knight sleeping until you are done with everything else, and then kill it quickly by surrounding it.
If Sylvanas isn’t done yet when you are (she’s got two bases to take care of, after all), spend your time destroying all the unit-producing buildings. If you have even more time, take down the towers, too. They will be upgraded when the morning comes.
Position your units outside the last base and await Sylvanas and her squad.
Together — last Human base
You should have about one minute left at this point. If time runs out, you’re going to have quite some problems and will probably need to retreat and fight the battle out the old-fashioned way, defending and using your base. It shouldn’t be that difficult, though, since you’ve made sure that the Undead will not be able to gather any more resources.
Run into the base and surround Lord Garithos. Send Banshees to Possess the Knights, and perhaps a Mortar Team or two. Sylvanas should Charm the Gryphons. Now take the buildings down in just the same way as you did with the other bases.
Destroy the remnants of the bases in whatever way you like. It doesn’t matter wheter it’s morning or midnight if the Dreadlord and his pet Sir Garithos lack resources to train units with. Just don’t let the units trained with the few resources that they do have catch you off-guard, though — just “sending in the meat wagons” does not work, I’ve noticed.
The sum of the squares of the first ten natural numbers is,
12 + 22 + … + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + … + 10)2 = 552 = 3025
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 385 = 2640.
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
Using the brute-force method, this problem is very straight-forward to solve:
1
2
3
4
5
| for ( my $n = 1; $n <= 100; $n++ ) {
$s1 += $n*$n;
$s2 += $n;
}
print ( $s2 * $s2 - $s1 ); |
The first line initiates the loop. It will be run from 1 to 100, i.e. the first one hundred natural numbers. The second line accumulates the sum of the squares, one by one, while the third line just keeps track of the sum of the integers. After the loop, the difference between the sum squared and the squars summed is printed. The script runs in less than a second.
Arthas’s return to Northrend can be very periolous if you attempt to play nice. Do not. This chapter is very easy, as long as you use the correct strategy. Illidan’s servants expect you to attack the first coastal Blood Elf encampment, because when you do attack and set up a base there, they will know exactly where you are. Instead of easily leveling the base, leave a few farms. This way, the Naga and the Blood Elves will never attack you. Now, you will only have to penetrate their defenses without losing your irreplacable units. Leave a few ghouls by the surviving farms, so that you can build up a base in case your army loses a battle.
The first thing that you should do is to kill Sapphiron and have Arthas raise him. This can be done without losses if you only let Arthas, Anub’Arak and the Meat Wagons fight. Use your Crypt Fiends for webbing the dragons to the ground, after which you can let them burrow in order to stay out of danger. Next, go destroy barrels to collect resources. You can also travel to the island that you started on to kill some creep for gold and items. Buy a fleet, consisting of mostly Battleships, from your newfound gold and wood.
You should now just wait, and let your new companion do all the job. Sapphiron can single-handedly destroy every Blood Elf base on the map with his Frozen Breath. It will take some time, but as long as you keep the undead dragon alive with Arthas’s Death Coil, it is the safest way by far.
When only the Naga base is left, you can play it safe and establish a base of your own. The rest of this mission should then play itself. I assaulted the Naga base with my units and battleships, but unfortunately both ghouls died. With only 10 wood I was unable to establish theb ase, but Arthas, Anub’Arak, Sapphiron and two Crypt Fiends are enough for destroying the guardians of the entrance. Just remember to keep your heroes and Sapphiron alive. Sapphiron can easily kill the last guardians, since only the dragons are capable of attacking air, and your dragon is a lot stronger than them.
As Lady Sylvanas, you are only able to build Acolytes, Ghouls, Banshees and Meat Wagons. However, those Banshees are upgraded to Master level from the start, which means that you can Possess as much as you want to. You should get all of your firepower from this: Abominations and Crypt Fiends along with Ogres and Bandits.
There is a lot of neutral units to possess in this map. I recommend first going to the gnolls in the West, who also happen to guard a gold mine. Possessing the leader will net you a nice aura as long as you can keep him alive. The gold mine is free to use; it will never be attacked.
Next, attack the ogres in the nort-west. After the stone barricade, Possess the leader immediately to minimise losses. The ogres are great meat shields, and you can replace them with more units from the mercenary shops. Try not to lose the leader, since his aura is useful. Keep a couple of Banshees in your base while doing this in order to impede potential invasions long enough for you to come back with your squad of Ogres.
Now, it’s time to set up an adequate defense. The best place to defend against Varimathras at is just north of your base, between the hill with trees and the river. Place your melee units in that pass, and at least five Meat Wagons on the hill. This will make sure that not even the invasions supported by Meat Wagons will be able to cause damage, since you will shoot their wagons with yours. The purple attacks from the East are never strong enough to be a significant threat. A couple of melee units in front of Nerubian towers and meat wagons will suffice.
Next comes the purple base. Make sure that you have a lot of Banshees and Meat Wagons. If you manage to Possess or kill most their units, your wagons will have a free way to destroy the towers and unit-producing buildings. Make sure that Sylvanas buys a Scroll of Town Portal before every assault, so that she can take the army back quickly in case of an invasion from a certain Dread Lord. After the purple base has fallen, the gold mine is all yours.
You can take on the bandits if you want to. Their units will bolster your army nicely, and after acquiring their leader, you will likely be able to take on the red base without any pause.
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest number that is evenly divisible by all of the numbers from 1 to 20?
This means that you have to find the lowest common multiple of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 and 20. Here is a Perl script that does that very thing through brute force:
1
2
3
4
5
6
7
8
9
10
| for ( my $n = 20; 1; $n++ ) { # do forever
for ( 1..20 ) { # for every integer from 1 to 20
if ( $n % $_ ) { # if $n is not divisible by the integer..
last; # ..end the for-loop
}
if ( $_ == 20 ) { # if $n has been divisible by every number up to 20..
die $n; # ..print the result and terminate the script
}
}
} |
However, this script will probably take 20 minutes or so to interpret. In order to optimize it, we could first remove some of the numbers that are divided with. 1 is unnecessary since all natural numbers are divisible by 1. We don’t need 2, either, since all numbers divisible by multiples of 2 (such as 4 or 18) are divisible by 2, too. This way, we can deduce away all of the numbers except: 11, 12, 13, 14, 15, 16, 17, 18, 19 and 20.
This isn’t the end of the optimization: Why are we incrementing only by 1? If we increment $n by 20 every loop, we will still get all values that are divisible by 20. This way, we can make the code a lot faster — after applying this step, I found the answers in 16 seconds instead of 700 seconds. This is the final script, with lines 1, 2 and 6 changed.
1
2
3
4
5
6
7
8
9
10
| for ( my $n = 20; 1; $n += 20 ) { # do forever, incrementing by 20
for ( 11,12,13,14,15,16,17,18,19 ) { # for the relevant integers
if ( $n % $_ ) { # if $n is not divisible by the integer..
last; # ..end the for-loop
}
if ( $_ == 19 ) { # if $n has been divisible by every number up to 19..
die $n; # ..print the result and terminate the script
}
}
} |
Earlier Posts »