Skip to content

Posts from Best HW programmer.

No ratings yet — be the first to rate!
User Avatar
18 years ago
Auto-translated
So, the competition program includes 5 tasks, with the following programming languages: Basic, Delphi, C++. Please send your code to my email in .txt format. Task #1 (very easy): Given a race, determine the level 7 unit of that race. Task #2 (high school level): Input the names of heroes and their levels, and output a list of heroes sorted by level in ascending order. Task #3 (solvable): Two warriors meet in a field, but one realizes he cannot defeat his opponent and decides to use trickery. Both warriors attack without retaliation, on a field of length n cells. The first can teleport to any cell, and the second is a foot soldier with a speed of v cells. Warrior 1: A HP, damage - A1, where B1-A1 > 0 Warrior 2: B HP, damage - B1, where B-A > 0 Can warrior 1 defeat warrior 2 if, in one turn, he can either move and attack (in any order)? Task #4 (related to programming): The task condition is extremely short - write qsort (specifically for those who know it)! I strongly request that you do not copy from the internet or other sources; I hope for your honesty and solidarity with the other participants. Task #5 (a bit more complex): A hero is lost in the Dungeon and cannot find the exit! You volunteered to help him! Let's imagine that the Dungeon is a collection of caves (n of them) connected by tunnels, and up to 4 tunnels can lead out of the same cave (including the one you came through). Find the shortest path to the exit in the given Dungeon, from the hero's location to the exit location (the Dungeon can be defined using a 2-dimensional array). If no such path exists, output that the hero will not survive. The tournament will last until the end of summer. I look forward to it! :)
учеба тяжела,
и я здесь не всегда,
обычно по выходным,
бывает и в будни я с ним,
ХВ ты не заменим))))

:cool: veni, vidi, vici - пришел, увидел, победил :cool:

Мир ПК - все и даже больше о компах и высоких технологиях

Лучший программист HW! Возможно это ты...
User Avatar
18 years ago
Auto-translated
Well...
Has anyone tried to create anything using this?
учеба тяжела,
и я здесь не всегда,
обычно по выходным,
бывает и в будни я с ним,
ХВ ты не заменим))))

:cool: veni, vidi, vici - пришел, увидел, победил :cool:

Мир ПК - все и даже больше о компах и высоких технологиях

Лучший программист HW! Возможно это ты...
User Avatar
18 years ago
Auto-translated
Back from the Summer Computer School, now I'll try to... :)
User Avatar
18 years ago
Auto-translated
How is the contest going?
Where do we go?
Where do we end up when we save the world?
18 years ago
Auto-translated
I wanted to offer some criticism at the very beginning, but I decided to wait. As I see it, the contest is not successful. And there are several objective reasons for this. 1. There aren't many programmers on the forum. 2. Not all programmers have the time or desire to participate. Some don't visit this section, or they do so quite rarely. Or maybe they're just not interested in this kind of competition. Thus, the audience is further reduced. Also, the contest isn't entirely fair in the sense that someone might even dream of becoming a programmer, but they simply don't have the knowledge at the moment to complete the tasks, because they (for example) are still in school. Someone else has long since received a higher education and works as a programmer; naturally, they have much more knowledge and experience, and what might cause difficulty for a novice programmer, an experienced programmer will solve without any problems. The novice isn't to blame for having devoted less time to programming, not even because of their talents/diligence, etc., but simply because they didn't have the opportunity due to their age.
O God of Earth and Altar,
Bow down and hear our cry,
Our earthly rulers falter,
Our people drift and die,
The walls of gold entomb us,
The swords of scorn divide,
Take not thy thunder from us,
Take away our pride.


G.K. Chesterton: English Hymnal
User Avatar
17 years ago
Auto-translated
Good day.

The idea was certainly not bad (since it's no longer summer :)).
So, I present to you a solution in Perl (since I'm currently learning it).
# Task #1 (as easy as it gets)
# Determine the level 7 unit of a given faction.
use strict;
use warnings;
my %un = (
	'1', 'Archangel',
	'2', 'Golden Dragon',
	'3', 'Titan',
	'4', 'Ghost Dragon',
	'5', 'Black Dragon',
	'6', 'Archdevil',
	'7', 'Hydra',
	'8', 'Ancient Horror',
	'9', 'Phoenix'
	);
my %cas = (
	'1', 'Castle', 
	'2', 'Rampart', 
	'3', 'Tower', 
	'4', 'Necropolis', 
	'5', 'Dungeon', 
	'6', 'Inferno', 
	'7', 'Fortress', 
	'8', 'Stronghold', 
	'9', 'Conflux', 
	);
print "Enter the faction: ";
my $n = 1;
while ($n <= keys(%un))
{
	print $cas{$n}, ". ";
	$n++;
}
print "\n";
my $un = ;
chomp $un;
$n = 1;
while ($n <= keys(%cas))
{
	if ($un eq $cas{$n})
	{
		print "For the faction: ", $cas{$n}, ", the level 7 unit is: ", $un{$n};
	}
	$n++;
}
I'll post more when I have some free time from work.

P.S. Just out of sporting interest, I'd like to see how this task is solved in Assembler.

Sincerely, K0Lb@zzeR.
:smile13: [ТУРНИР] "Гонка за Лидером" :smile13:
:smile28: [M] "Я и моя тень" - "I am and my shadow" :smile28:
:smile16: "Быстрая смерть" - "Fast Death" :smile16:
In reply to Майор Вихрь
User Avatar
17 years ago
Auto-translated
Major Whirlwind; 190593
I wanted to offer criticism at the very beginning, but I decided to wait. As I see it, the competition is unsuccessful. And there are several objective reasons for this.

1. There aren't many programmers on the forum.
2. Not all programmers have the time or desire to participate. Some don't visit this section or do so quite rarely. Or maybe they're just not interested in this kind of competition. Thus, the audience is even further reduced.

Also, the competition isn't entirely fair in the sense that someone might even dream of becoming a programmer, but they simply don't have the knowledge at the moment to complete the tasks, because they (let's say) are still in school. Someone else has long since received a higher education and works as a programmer; naturally, they have much more knowledge and experience, and what might cause difficulty for a novice programmer, an experienced programmer will solve without any problems. The novice isn't to blame for having devoted less time to programming, not even because of their talents/diligence, etc., but simply because they didn't have the opportunity due to their age.
That's fair, but I've realized that there's nothing I can do about it. Please forgive my absence – I was resting.)))
kolbazzer, I haven't written in Perl, and as for assembly, I don't know myself, but we can look for it
учеба тяжела,
и я здесь не всегда,
обычно по выходным,
бывает и в будни я с ним,
ХВ ты не заменим))))

:cool: veni, vidi, vici - пришел, увидел, победил :cool:

Мир ПК - все и даже больше о компах и высоких технологиях

Лучший программист HW! Возможно это ты...
User Avatar
17 years ago
Auto-translated
We didn't have any decent information at school, and on Instagram, I wrote something like, "How is that possible?"
Первый, кто был забанен за Правду.

Statistics