Guides
Everyone gets stuck at games now and then. In an attempt to help some of those people, I publish guides to some games that I've beaten. Choose a game or browse through all of them.
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
}
}
} |
Begin by killing off the ghouls, and then move north. Make sure to take every sidepath that you can find, since there are many loyal units to rescue. Your ghouls will probably be mostly in the way, so don’t worry too much about healing them, except for cannibalizing after battles. Your abominations, however, should be kept alive at all costs. These are vital for the final battle.
Even though you are periodically attacked from behind, you shouldn’t rush this stage. The attacks are all weak, and you will probably survive all of them without losses if your Death Coiling is good.
It is worthwhile to assault the Dreadlord and his golems in order to rescue your two meat wagons. They are useful, not only against Nerubian Towers, but more so as fire support. Just make sure that you do not leave them too far behind; the attacks in the back might damage them, and your only way of repairing them is waiting for them to regenerate.
There are no real traps in this mission, and so your Shades will not work well for scouting, especially considering there are three or so hostile Shades who can spot them. Your Shades will do more good if you leave them beind in crossings, so that you can spot rear-attacks early on.
When you face the huge abomination in the end (I don’t remember his name — Bloodfeast?), you have two options. You can either just attack-move against him, which should work unless you’ve suffered major casaulties. The other option is using the Staff of Reanimation, which you should have picked up earlier in this mission, Arthas’s Animate Dead and the Necromancers’ Raise Skeleton in order to create free minions, which you can send in indefinitely.
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.
Find the largest palindrome made from the product of two 3-digit numbers.
There is probably an elegant way of doing this, but I prefer the easier method of brute force. This is a Perl script that calculates every product of three-digit numbers and saves all of the palindromic numbers in a list. It then sorts the list in descending numerical order and prints the first element in the list.
1
2
3
4
5
6
7
8
9
10
| my @l; # the list for all the palindrom numbers
for ( my $n = 999; $n > 99; $n-- ) { # do for 100 to 999
for ( my $m = $n; $m > 99; $m-- ) { # do for 100 to $n
if ( $n*$m == reverse( $n*$m ) ) { # if the product is a palindrom..
push @l, $n*$m; # ..add it to the list
}
}
}
@l = sort { $b <=> $a } @l; # sort @l numerically with the largest number first
print $l[0]; # print the first element (the largest number) |
The script finishes in about a second. Note line 3, the second for loop. Since $n times the numbers higher than $n have already been multiplied earlier in the loop, these can be left out to save time.
This is a really long mission. Start by pulling the speed down to Slow, since you’re defending or attacking at three fronts simultaneously. Now, start making units. Arthas needs only abominations, Sylvanas needs Banshees and Kel’Thuzad needs Necromancers. In the beginning, though, build some ghouls in Arthas’s and the lich’s crypts to get up an army quickly.
Unless you are very skilled, you will only be able to attack at one front at a time. Arthas will do a good job defending his side by himself as long as you put a ghoul near the Circle of Power, but Kel’Thuzad will need some help from you. His front is the most difficult one to defend. Cast Frost Nova as much as you can, and set Raise Skeleton to auto for the Necromancers. Cripple some units, too, since you will have more than enough collective mana. The skeleton warriors should be kept as a shield around the lich and the necromancers.
The key to fighting with Sylvanas is possessing everything stronger than a Footman, especially the Knights. On the other fronts you have the problem of Paladins healing the knights, but guess what happens if they have no knights to heal — that’s right, they can’t heal them! Using this strategy, you should be able to destroy all the bases on Sylvanas’s side quickly. No more villagers will try to escape through Sylvanas’s mountain pass any more, so therefore I just did a suicidal attack with the units I had left on the center and made sure that Sylvanas slipped through to Kel’Thuzad’s side. Her Life Drain and fire power was a considerable aid.
With only two fronts to defend, you can attack simultaneously. The key is not to attack the old-fashioned way. It’s not hit-and-run either, it’s more of a hit-and-die. As soon as you have slaughtered some villagers and raised them with your Necromancers, send the skeletons on a suicidal mission to destroy a farm. Even if you only damage it once, you will have won, because your skeletons are free and the farms are never repaired. You can do the same with Arthas. Just send him and some Abominations to destroy farms. Animate Dead to get them up again and do even more damage.
When only the centre Paladins are left, it is easy to destroy their base through a combined assault, since you now have 90 food to play around with.
Notes:
- Put your Shades at important crossings in order to warn yourself of escaping villagers.
- Killing your own Shades will not help, since they do not count against the food limit in this mission.
- You can get nice items by seeking out and killing some heroes — Arthas has a Mountain Giant, Kel’Thuzad has an Archmage and Sylvanas has some archer with Starfall.
- Make sure to always be stocked up with healing scrolls, since you have almost unlimited cash.
- When all the villages on one side have been destroyed, there won’t be any more attacks. You can keep pushing units to the center, or get them over to another side to help.
- Your units prioritize combat units over peasants, and might let them slip through fighting. To avoid this, let one or two ghouls stand closer to the mountain pass.
- Human units become Invulnerable as soon as they touch the circles.
- Don’t give up. This is a hard mission on par with the timed missions in Reign of Chaos, but it is possible.
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 317584931803?
To calculate the prime factors, I loop through the prime numbers, dividing the number with each if it is divisible. I used a modified version of my prime calculator:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| my $m = 3175849318035832905;
my @primes = ();
my $i = 1, $b = 0;
while ( $i < $m ) { # looped until the final prime factor has been found
$i++;
foreach (@primes) {
if( ! ( $i % $_ ) ) {
$b = 1;
next;
}
}
if ( $b ) {
$b = 0;
} else { # if it is a prime
push @primes, $i;
while ( ! ( $m % $i ) ) { # as long as $m is divisbible by the prime
print "$i \n"; # print the prime (since it's a prime factor)
$m /= $i; # divide $m by the prime
}
}
} |
The last number printed is the highest prime factor. Explanations for the modifications are in the code.
If you take your time on this mission, it is very easy. I finished it without using any of the gold at all, and had no problems.
First, choose which party to push and keep to that. I recommend Vashj’s Naga, since Vashj can destroy one of the generators in case you don’t want to risk your assassins. The fact that Kael and Illidan are periodically attacked is irrelevant, since they can be fended off without any casaulties as long as you micro-manage the damaged spellbreakers and firestorm all over the place.
Lady Vashj and her army should make it to the Mistress of Pain without any losses, too. Make good use of the turtles’ digestion systems and their siege attacks against buildings. Also, don’t be afraid to cast Crushing Waves and Frost Bolts with your Naga Royal Guards. Those Frost Bolts look really nice on Battleships. Do not attempt to take on the Mistress of Pain alone. Instead, activate the bridge to the west of the last Orc encampment and wait there for Illidan’s and Kael’s army.
Illidan and Kael should not lose any units, either. It’s a good idea to go slaughter the butcher for some nice tomes.You will probably lose some Spellbreakers there, but you will get them back when he drops his Rune of Resurrection. Don’t forget to attack the units just north and south of the well first, since you’re really going to have problems if they attack your priests and sorceresses from behind.
The Orc bases should be no problems, either. If you feel that you want to be on the safe side, you can walk the assassins in and have them Hide on strategical positions. In the last base, you can catch all of the Orcs, including the hero, behind their own buildings while picking them off with your ranged units. The Master of Torture can be beaten easilly if you just attack-move your units in there.
Probably the same thing can be said about the Mistress of Pain, but her Charm is nasty, and so I decided to hit-and-run until she and all of her units were dead. To do so, first place your army well away from her, e.g. by some well — her units don’t give up easily. Next, summon two Sea Elementals (Naga Royal Guards) and two Spirit Wolves (the Draeni assassin hero) and send them up to the attack one unit. Your goal is to kill at least one unit with every wave, since you don’t lose anything but the Mistress cannot replace her units.
Let Kael, Illidan and Vashj go behind the units. Illidan should survive going melee and mana-burning while you micro Vashj’s Forked Lightning and Kael’s Banish and Firestorm (or is it Firestrike? I don’t remember). You should be able to kill them all without any hero dying in a few waves.
Next is Magtheridon. He’s a little harder, and brute force won’t break him. I used the same tactic as against the Mistress of Pain, and it worked. It just took a lot more time. Remember not to waste time attacking the Infernals, since they are temporary summons.
« Later Posts —
Earlier Posts »