Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Uncategorized | 1 Comment

Solution to a Shaping Regions Programming Problem

For the first time in my life while applying for a job decided to proceed with solving qualification tasks (despite some of a reasonable criticism of such practices).

And, as it usually goes with today’s HR-cast, got no reply in a week. Thus, feeling free to spoil it down here.

Shaping Regions

N opaque rectangles (1 <= N <= 1000) of various colors are placed on a white sheet of paper whose size is A wide by B long. The rectangles are put with their sides parallel to the sheet’s borders. All rectangles fall within the borders of the sheet so that different figures of different colors will be seen.

Input

The order of the input lines dictates the order of laying down the rectangles. The first input line is a rectangle "on the bottom".

Line 1: A, B, and N, space separated (1 <= A,B <= 10,000)

Lines 2-N+1: Five integers: llx, lly, urx, ury, color: the lower left coordinates and upper right coordinates of the rectangle whose color is `color’ (1 <= color <= 2500). The color 1 is the same color of white as the sheet upon which the rectangles are placed. The first input line is a rectangle "on the bottom" (below all rectangles) and the last input line is a rectangle "on the top" (not covered with anything).

Output

 

The output file should contain a list of all the colors that can be seen along with the total area of each color that can be seen. The list of colors should be sorted according to color ID. Do not display colors with no area.

  
 

For sample input
20 20 3
2 2 18 18 2
0 8 19 19 3
8 0 10 19 4
Sample output is:
1 91
2 84
3 187
4 38

http://cid-6b8ee681d2c79b18.skydrive.live.com/embedicon.aspx/src/20100314-shaping_regions.linq

Note: It wasn’t explicitly stated what tools/platforms/versions to choose, so I risked to utilise LINQPad queries – they’re basically plain C# code, without VisualStudio.Net-related heavy lifting. (LINQPad can be downloaded freely, as well as a required Microsoft .Net Framework 4.)

Posted in Computers and Internet | 7 Comments

Bicycle ride on abandoned rail near Kaniv

Posted in Uncategorized | Leave a comment

Drupal Camp Kyiv 2009

Posted in Computers and Internet | Leave a comment

Seminar: Introduction to BSCS

Another semi-improvised venue to introduce newcomers to BSCS iX Release 2 system scheduled on February 7–8, room 112, Kvazar-Micro Education Centre (that’s a 3rd to the last stop of 5 trolleybus).
 
What’s BSCS, you might ask ? This is a computer program, that helps UMC (and some hundred other such businesses aLL over the Globe) to bill subscribers for their cellular phone usage.
 
Nothing prevents for an occassional stranger (what about you?) to come and join. Though, I’ll be greatly surprised if anybody else, but new folks from KM-Soft will participate.
 
Cheers.
Posted in Computers and Internet | Leave a comment

Course 2349: Programming with the Microsoft .NET Framework

WHEN:

December, 10-15

WHERE:

Kyiv Polytechnic Institute, bld. #6, room 235

(1st floor, near Goethe Institute, "Kvazar-Micro" plaque)

Kvazar Education Centre: [http://edu.kvazar-micro.com/education/it/ms/2349.php] (mistakenly scheduled at Dec., 17th)

Vendor’s site: [http://www.microsoft.com/learning/syllabi/en-us/2349bfinal.mspx]

Posted in Uncategorized | Leave a comment

Hotel in Keeev for mere mortals

It has turned out to be that there are hotels in Kyiv that charge less than 100 green bucks per day.

Posted in Travel | Leave a comment

It’s over now, it’s over

A temporary suspension of discoveries

Posted in Travel | Leave a comment

fra

 

Another trainer, now of English descend. Now yours truly can at least to have a pleasure to hear a true Anglo-Saxon pronunciation.

All evening spent in a company of colleagues at Sachsenhausen. Apfelwein appeared to be a sort of white light liquid, which is mixed either with carbon water OR fanta by aborigines. I’ve tried both ways. Also i’ve tried some Hessian traditional food, which name I’ve already forgotten. As well, I’ve forgotten the name of the tavern, but is still can be recovered from a box of matches I’ve got there as a present.

Cheers

Posted in Uncategorized | Leave a comment

fri out

20071020
 
Frankfurt – Mainz – Koblenz – Bonn – Cologne – Koblenz – Mainz -Frankfurt
 
Saturday morning happened to be cold and rainy here. Having to meet the high scholl fellow after 4 years of purely virtual communication, on a freshly discovered grounds, with a cell phone barred, posed a significant uncertainty. Anyway, in 12 o’clock i’m meeting V. at Niederrad (quite familiar to see him — having married and getting a descendant doesn’t sometimes change people that much).
 
It surprise me alot that well familiar S-8 train is not just a usual city route. It actually reach another landstate of Rheinland-Pfalz. So we take it and go to the Mainz. The weather is getting better, the sunshine reflects on a sparkling buildings of Opel factory in Russelheim. In Mainz we should change our RE train to Koblenz, thus getting some dozens of minutes to walk around the railway station. (The reason for frequent train changes is because of a wonderful opportunity Die Bahn gives to a weekend traveller: for 35 EUR one can get a ticket for up to 5 persons, eligible for all local trains. This effectively means that one can cross all the country by train on such a ticket, and even get outside to, say, Belgium or Luxembourg, having paid a small extra fee. Of course there is a drawback with a speed of such travel.)
 
The trains appears to be a fancy 2-floor vehicle. V. kindly reseves a place for us on a top deck so that we’re observing a bypassing landscape from above. And that said, what a wonderfully landscapes they are ! The rail from Mainz to Koblenz is going just in between of Rhein river and a hills of it’s left bank. Here and there are vineyards just climbing up these hills. There numerouse cute little towns literarely seized in a narrow place between the rail and hanging rocks. Some time on a top of such rocks, there are a picturesque ruins of castles. Sometimes castles are not ruins, at least there are trampling flags on them. Towns seems to come from a middle ages, considering architectural forms. In most of them, on a ground floow there is a tavern. Towns are connect with a thin road wich mainly goes along the rail, sometimes climbing higher on rocks. Again, the landscapes ae fascinating. On the other side, the Rhein flows, and then again, the same hills on the other side, with vineyards, castles and smaLL towns.
 
In Koblenz we’re paying the visit to a local McD, where a typical afro-deutschlander equips us with cheesburgers (i’m grabbing a stick with a local sugar — dunno yet what for). The we’re changing train for another time and in 1 hour we’re in Bohn.
 
Initially, we had no intetion to stop In the former W. German capital, but V. said insisted to make another train swap to get to Cologne quicker by making less stops. Bonn appeared to be a wonderfull place to walk a little. From a first glance it looks like a small town with a many pedestrian streets and numerous shops. But there are some reminiscense of formely significance, such as a presense of a subway. Another thing that makes Bonn such a cute place, is that around the railway, instead of a usually expected industrial districts, there are normal residential quarters. So one can feel almost as in a city car on a tourist route observing a local habits and lifestyles.
 
Getting out of central railway station in Cologne, we’ve found ourselves directly behind the Dome. What a bizarre creation! After being constructed for rougly five centuries, it still is being repared and beutified! Unfortunately, our time resorce is scarse, so there is no chance to me to refresh all the memories of my 12 years old visit here. We making arrange a walk through a center, which is much more crowded than in Bonn. Perhaps tha latter fact makes Cologne is not so pleasant place to relax. But it may well be the fact that it getting dark sooner, thus making it impossible to see aLL of the city landmarks.
 
The way back is almost familiar. V. is leaving in Bonn central station. I’m travelling alone to Koblenz, nearly alone in the car, seeing almost nothing through the mirror window glass. Waiting for train some 20 minutes, taking my place on the 1-st floor of the same fancy train, and then for two hours watching as a story is rolling back with it’s cute tiny towns, lonely stations, and rocks, now almost invisible in the dark. It’s getting really late, and I began to worry to be on time in Mainz for the last S-8.
 
Luckily, in another 30 minutes upon arrival in Mainz, i took a place in my S-8, and in another hour i got to Niederrad.
 
That’s it. There is stillcertain sentiment in my head, but will try to explain it some other time.
 
 
 
 
 
Certain pedestrian street in Bonn
 
 
Vadym before Cologne Dome
 
 
20071021
 
No trade in the city
Posted in Travel | Leave a comment