Monday, December 25, 2006

There is a difference between "knowing the path" and "walking the path"

TopCoding Kalinov Style

Well I remember reading an article at TopCoder about Tomek which had a similar title.

Well this blog is about Kalinov and my appreciation for his art work.
Yeah thats what I'll call it, as its his artistic style of coding which awes me most at Topcoder.

I recently had the honor of conversing with this wonderful person called Luka Kalinovcic,
he is ranked 8th at TC and I guess his world ranking wouldn't be beyond 50 for sure.




Here is the reply :
==========================================================
Hi rajeshrathod!
Thanks for your kind words.

I wish I could give you some advice that would make you a great coder instantly, but such thing is impossible. It takes a lot of time, practice and a lot of solved problems.

So the only advice I can give you is to practice often and hard and to not give up easily.
It's also important that solving a problem is a pleasure to you. I certainly wouldn't solve so many problems if I didn't have fun solving them.


Also, don't hesitate to ask for help if you get stuck on some problem.
There are a lot of people willing to help you out.

Best of luck to you!
Luka Kalinovcic
=========================================================

What I most like about this guy, is that he makes it look very easy.
When I look at his code, it like a piece of artwork. He writes code as though some artist paints.
It looks beautiful.
His is a great coding style.
You know most of the time the code reflects the way the problem is represented in the brain, and that probably says it all,
Y
ou just know it when You see it.

It reminds of my first SRM(Single Round Match) at TC. (SRM 297)
Well I had the best time for the medium problem in DIV2. The same problem was used in DIV1 as the easy one , and it so happened that Kalinov had the best time for it in DIV1.

Well here is the screen shot which says it loud :



It was a pleasure when I found that, at least theres is one problem at TC where I was close to his abilities.

Here is the code that I wrote

sort(clientArrivals.begin(),clientArrivals.end());
VI temp(clientArrivals.sz);
FOR(i,0,clientArrivals.sz)
temp[i]=clientArrivals[clientArrivals.sz-i-1];

FOR(i,0,clientArrivals.sz)
{
FOR(j,i,clientArrivals.sz)
temp[j] += serviceTime;
i += tellerCount-1;
}
int max = 0;
FOR(i, 0, clientArrivals.sz)
if(max < temp[i])
max = temp[i];
return max;

And here is the code that he wrote

sort( clientArrivals.begin(), clientArrivals.end() );
reverse( clientArrivals.begin(), clientArrivals.end() );

int ret = 0;
for( int i = 0; i < clientArrivals.size(); ++i )
ret > ?= clientArrivals[i] + (i/tellerCount+1)*serviceTime;

return ret;



You could see the difference in being a green and a red.

Well may be I sound to glorifying it a bit, but its just that there is so much that one can learn from his ways.
Be it style, be it logic - code translation, be it speed or be it accuracy.
He is excelled in almost all aspects.
It usually happens that whenever we have competed together in a match, I always happen to take a look at all of his submissions just to understand that how well I could have understood and represented the problem and as a result how fast I could have solved it.


Kalinov rocks !!

Wish to follow his advice, may be I am not really red material but I guess it would certainly help me improve my coding skills.

There certainly is a difference between knowing the path and walking the path.

1 Comments:

Blogger Jinu Peyeti said...

Really nice blog. Good content. Keep it going.

Tuesday, February 27, 2007 4:54:00 PM  

Post a Comment

<< Home