একারেজিংইউফরপ্রোগ্রামিং

মাহবুবুল হাসান শান্ত

আমার আমি :::‌‍ প্রোগ্রামিং ::: পড়াশুনা

এটা একটা বিশাল চিঠি হতে পারে - কিন্তু এটা একটা হিস্টোরিক গল্প। ২০০৫ এর ঢাকা রিজিওনাল এসিএম আইসিপিসিতে - একটা কলেজ পড়ুয়া দলের কাছে দেশের সবগুলো ভার্সিটি লেভেলের টিম হেরে গিয়েছিল - এবং কন্টেস্টের একটা পর্যায়ে মনে হচ্ছিল যে কলেজের টিমটা ফুদান ইউনিভার্সিটিকেও হারিয়ে দেবে। আমি তখন পাশের একটা কম্পিউটারে বসে ছিলাম, আমি, সুমিত আর সানি - এবং আমাদের একটা মাত্র বেলুন লজ্জায় নেমে যাচ্ছিল আর আমরা এই চিৎকারগুলো শুনছিলাম - যেগুলোর কথা মাহবুব এই চিঠিতে লিখেছে।

চিঠিটার নাম ছিল ENCOURAGING u for programming । সেপ্ট ২৫ - ২০০৫ এ লেখা।

I hope every one is in good mood. This mail is mainly to encourage our new generation to the way of programming. And if you think that it is just for augmenting the glory of our achievement… then I would say “as you wish”. Because it will depend on your mentality. Same thing will be different to different people!

Ok, so come to the point now!

(Well, I will continue my TTM-13 soon,)

may be many of you know that there was ICPC regional held at north south university (NSU) on 22-23 september. And it might be know to you that we missed IOI this year. So may be to just appear at international level contest our mkbd sir tried and gave us the opportunity to appear at that regional unofficially. (For those who don’t know, ICPC regional is the gate through which teams for ACM world final are chosen)

well, on 22 there was simply practice conest it is only for making us practiced with the judging procedure. It is called MOCK. Mock would start from 3.30 and we reached there around 2.40 may be. But reaching there we could realize that we are a kind of burden to them. No care with us. And after a lot of troubles we entered contest room and started the contest after 5/10 minutes of the contest. We were 6 kids there. 3 persons a team. So there were 2 teams. We were not shown in the main ranklist though our coach satej vi told me that he talked with the authority and convinced them to show us in the rank. But they did not. There was a completely separate rank list of our two teams. So we were just looking at both rank list and comparing ourselves with the main contestants.

Anyway, on the first day we were given 3 problems and my team solved 2 where the another team solved 1. in the main ranklist we could see that many university teams also did 2 but no 3.

So we were happy with our performance but unhappy with the management. But also happy that we could at least get the chance!

Second day, if I am not wrong then we faced with logging in problem and may be we got the problem set after 2 minutes. Nafi unpinned the problems and pinned those separately. I was taking the problems and was eye brushing over them. Nafi saw a problem (A) and started to code that. After coding we submitted that and got AC on 16 minute and before that about 6 university team got AC before us. That means we are in 7th rank. NOT BAD as a college student! The first AC was on 11 min.

Later our another team also got AC but they already got 2 penalties.

anyway, in this side I was looking over other problems but I don’t know why I could not understand the problems. There was a geometry problem that looked easy but very puzzling at the same time. So I could not understand what to do! But the I worked over the problem F quite sometime and got the trick of the problem statement. Then I described the soln to nafi and he coded it. And submission and again AC. This time we are the first team to solve 2 problems. But we could see that the china team FUDAN university was trying the problem H, not only they but almost all the top level teams were doing so.. but we could not see any easy way for H then.

By this time, from khobaib I understood the problem C. and had a great brain storm. It was not tough but it was really a great feeling when you can find the way of soln for such a tough looking problem. But now there occurred a bit problem. We need to use a special kind of coding for making the code simple which is not known to me. So I asked nafi to do that… but he was not agreeing but I was insisting… his point was: as I found the algorithm so I should code it. By my point was: I am giving you the back up support, telling you what to code but you have to code not me! (I was not in coding mood though) but ok, then I sat to code but I think I showed a bit cold anger then! (I am sorry if I did so) nafi took the responsibility to code that and when we were going to submit we could see that the FUDAN team got another AC and got the top place. We may be after 1/2 minutes submitted that C problem and got AC. YUPPY!!! We are in the first place again!!!

In this side seeing our great(!) work many people came to see us, took our photos, took video, we were getting balloons, and what to say a very pleasant experience!

But we were in this 3 AC. And FUDAN university managed 1 MORE AC and thus they solved 4 problems where we did only 3. other universities were in just 2 AC. (haha…)

We were not finding any problem to solve… when we were thinking what to solve what to solve… then nafi and khobaib noticed from the rank list that Dhaka University teams did problem D. I worked on that while nafi was coding A, but could not manage any way! But we could realize that it is very simple if not then DU teams could not do it. So we used a funny method. First nafi guessed but his guess was wrong, then khobaib then me then again nafi, but our guess was wrong then well at last we could realize what is the secret behind this problem and yes got AC. We are the only team getting 4 AC in only 4 submission. That means no penalty.

And what to say, many high ranked persons came to our room and encouraged us… and well after solving last 3 problems we shouted in loud!!!

But what to solve next??? We had more 2 hr in hand. In the very beginning nafi and khobaib thought on H cause it was looking easy but many teams yes a lots of team tried it but was getting penalty so we were afraid it must be tough. But we could see that FUDAN did H. so we must have to do it. Nafi did the half in very beginning of this problem. But what about the rest. I recalled a formula from my past programming life. But was not able to relate it. But after quite some time I managed to solve the rest. Coded it and on the way of coding we saw that FUDAN did H and thus 5 AC of them.

Well we had to debug our H because we could see that there were many special cases of H. and when we sent it we got “wrong answer” reply. Huff… I got unhappy. So now again the debugging. And after checking with only two cases we found that our code was wrong. But we could not manage where the mistake was. So I again fall with paper and pen. And was describing to nafi how I derived all those rest formulas. And suddenly we noticed that the formula I recalled from my past is the opposite of what is needed. So we simply modified that and got AC. I can still remember I shouted loudly at that AC. Because it was great! YES!!!

Anyway we had 1 more hour n hand. Many came and told us many thing. But well FUDAN did another by this time and did 6 where we did 5 and other universities were just on 3 and only 1 may be was at 4 AC. So after a lot of thinking nafi sat to code B. but in this side me and khobaib was making brain storm over other problems E and G. but could not find any way! But well nafi finished his coding just 10 or 12 minutes before the contest end. But it had a lot of mistakes which we traced later. So we could not debug that and that is the end of the great story! FUDAN 6, we 5, and some other universities(may be 3 or 4 teams) 4.

As I said our another team got only 1AC. But not bad.. not good though!

Anyway, we were just given the lunch coupon but later we were specially invited for the dinner at Sheraton. But unfortunately they only invited my team not another one. We were a bit sad so!

Anyway, at the dinner and prize giving ceremony they have given out the prizes to the university teams. And then they announced our achievement and we got some prize!

So we being college students can do these things. so come up boys! It does not matter that u r a school/ college/univ student. U can do it!

I believe that we have golden possibility in programming which is not in math! But I am not saying that math is not needed then. but to say the truth math helped me to solve two problems there. So you have to do this to at the same time isn’t it?? So why are you waiting?? Start programming from now! We are ready to help you!

AND once again thanks to NSU and mkbd sir for giving us such a great opportunity!

Mahbub