Saturday, May 08, 2010

Google Code Jam - Qualification Round 2010

Google Codejam 2010 is here! As usual, there are three problems with 33 points each (10 points for the small dataset and 23 points for the big dataset). Here's my overview so far of the tournament.

Problem A : Snapper Chain
So far the problem has 84% correct ratio, so it'd indicate it's an easy problem and it is. The problem statement might seem a bit confusing but break it down to essentials, understand the atomic problem and you'll have your solution in no time. But beware, if you don't use appropriate techniques, you might be in trouble for the bigger dataset, so try out some long inputs on your own before you run it for the actual dataset.

Problem C : Theme Park
94% percent correct ratio! Wow, that's saying something. Looks like most of the people got it right. I think I did too and I hope it stays the same for the big testset too. It's quite a straight-forward problem to give any hint. Just manage your data structures well and you should be able to solve it in no time.

Problem B : Fair Warning
As always is the case with Google Code Jam, there will always be one problem where only your coding skills will not save you. You can't just crunch your numbers with a really huge data-type and get away with it. No sir! And Problem B falls straight into that category. As the problem clearly states, "64 bits will not save you. You have been warned." One of the inputs could be as high as 1050 And that's where I am stuck. Hopefully I can solve it out.

I'll post the solutions and tricks here once the contest is over. Till then, happy coding and stay tuned!

Saturday, February 27, 2010

Strong earthquake hits Japan of 7.0+ magnitude

This just in. Strong earthquake of 7.0 magnitude near Japan and soon enough Tsunami is expected to hit Japan near Okinawa islands. Hope it's not too bad. Will try to keep updating.

Meanwhile, you can follow @BreakingNews for the latest details.

Thursday, December 31, 2009

5 films we did not talk about in the decade

It's that time of the year again where people make lists of the best and the worst, especially about films. Add to it, it's 2009 and hence people get a chance to talk about the best-worst of the decade as well. There are already thousands lists out there about it, so I don't want to add it to the noise. Instead I'll talk about the movies that not only escaped aam junta's attention, but esteemed critics' as well. Movies that I think deserved better.

Haasil: Set mostly in Allahabad, Uttar Pradesh, this film will be talked about how politics mostly works in rural India from college politics to regional politics to one's personal life. Ironic as it may sound, so-called protagonists of the film, Jimmy Shergill and Hrishita Bhatt, are mere sidekicks. Dialect-based dialogues and witty one-liners are special highlights. Minor characters like Badrishankar Pandey, Inspector Tiwari, Jackson-wa leave their own imprints on this fabric. Most of all, the film will be remembered by power-packed performance from Irfan Khan. Irfan Khan's The Warrior may have won the BAFTA, but this is the role that'll be difficult to overtake even by the Khan himself.

Manorama Six Feet Under: I absolutely hate when any Hindi film-maker uses the word "inspried" loosely, when in fact his movie is straight lift or even frame-to-frame copy of another movie, Korean movies being the latest trend. Navdeep Singh, in the true sense, can use the word inspired. Based on Roman Polanski's classic Chinatown, Manorama is set in the desert state of Rajasthan. With all the elements that define noir cinema; double-cross, twists and turns to false identity; added with underplayed sincerity of Abhay Deol, makes a fitting tribute to the original movie.

Chameli: It'd have never struck me to cast Kareena Kapoor as the title character of the movie that is Chameli, but much to my surprise she plays out just fine. With backdrop of a rainy night, two strangers and soulful melodies (Total respect to Sunidhi Chauhan), Chameli manages to pull-off a superb fable of human emotions.

Hey Ram: No, it's not about the greatness of Mahatma Gandhi, nor it's about off-again-on-again plot to assassinate the father of the nation. Kamal Hassan, one of the most versatile actors of our times in the truest sense, in the role of Saket Ram talks about his partition riots induced, hatred-filled journey to the redemption. The film created curiosity for the wrong reasons (Kissing scene between Rani Mukherjee and Kamal Hassan) than it should have. This is the film that Atul Kulkarni and Shahrukh Khan can boast off in their resume, in spite of their supporting characters.

Zubeidaa: Zubeidaa was most likely Shyam Benegal's first mainstream movie, so critics did not feel the need to put it with Benegal's best of the works. Sad. In momentous role of her career, Karishma Kapoor, which won her the national award, plays the title character Zubeidaa with aplomb. Narrated as the series of memories by her estranged son, Riyaz(Rajit Kapoor), Zubeidaa goes through journey of a girl from her teenage effervescence to a trouble marriage to a queen of a falling empire ends with a quote from her son. आखिर माँ चाहती क्या थी? (What did the mother want after all?)

Obligatory honourable mentions: Waisa bhi hota hai - Part 2, Ek Chaalis ki last local, Aamir, Being Cyrus, Raincoat

Monday, December 28, 2009


This blog has been dysfunctional too long that even the author doesn't remember the last post. By now, the faithful readers would've deserted this place. One thinks that one would blog often if one had more time at hand, but that's a lie. When one has a lot of free time, one still doesn't blog.

Back to the point. After four years of fruitful and enjoying times at Read-Ink Technologies, I finally decided to move on. Great learning experience though it was, I thought it was the time for the change. So here I am. With effect from December'09, my new employer is Microsoft India and yes, I've moved to the city of Nizams, Hyderabad. So if you are from Hyderabad, drop in a comment to say hi or if you are a laconic type, a simple tweet will do at @nishitd.

* * * * * * * * * * * * * * *

Now since you may have come here looking for some entertainment, will leave you with some Hyderabadi flavour, a clip from The Angrez:

Monday, June 15, 2009

Jack Bauer and Consequentialism

It's an age-old debate whether the end justifies the means. No one personifies it more than Jack Bauer. Technically, he is an outlaw who has violated Constiution of United States than perhaps Osama Bin Laden would ever have. Still, he is a hero. He is the dark knight. Introduction of Agent Renee Walker in season 7 has especially highlighted the choices Jack Bauer makes. It's as if Renee Walker represents Jack Bauer with conscience. Perhaps justifying the quote, "Either you die a hero, or you live long enough to see yourself become the villain". Anyway, in his talk with Renee Walker, season 7 finale, Jack Bauer reveals what he thinks of himself, which in my opinion, summarizes pretty much his behaviour in the whole series. (Mostly harmless. No major spoilers ahead)

Jack Bauer
"I can't tell you what to do. I've been wrestling with this one my whole life. I-I see 15 people held hostage on a bus, and everything else goes out the window. And I will do whatever it takes to save them, and I mean whatever it takes. I guess maybe I thought, if I save them, I'd save myself."

Renee Walker
"Do you regret anything that you did today?"

"No. Then again, I don't work for the FBI."

"I don't understand."

"You took an oath. You made a promise to uphold the law. When you cross that line, it always starts off with a small step. Before you know it, you're running as fast as you can in the wrong direction just to justify what you started in the first place. These laws were written by much smarter men than me. And in the end, I know that these laws have to be more important than the 15 people on the bus. I know that's right. In my mind, I know that's right. I just don't think my heart could ever have lived with it. I guess the only advice I can give you is, try to make choices that you can live with."

Tuesday, February 24, 2009

GMail down -- creates havoc!!

Around 1600 hours today, GMail has gone down. Not for me only, the whole world, it seems! And the effect...

#GMail is already trending topic on Twitter. My whole timeline is abuzz with "#FAIL" quotes. People are running around to find some Oxygen. If this isn't up within 15 minutes, it will start flooding with "Is world coming to an end" quotes and you may be able to see people on the street shouting slogans.

Goes on to show, how much we are dependent on GMail! Difficult to survive without GMail it seems. What would creatures like me do, if not for twitter?

Thursday, February 19, 2009

American Idol : Anoop Desai

Remember Sanjaya Malakar? Of course you do! Otherwise known as that horrible singer from India. Desis in America got pretty excited too. I remember Arati talking about, how sms voting for Malakar was almost norm of every desi get-together. (Can't find the damn link right now). What with myspace protests and all that, he was, if somewhat infamous, celebrity until he was finally voted out. Phew!!

Desis have a new hero now : Anoop Desai . From whatever little I have seen, he is a decent singer and any day better than Sanjaya. It's just the beginning, so too early to judge or form an opinion about him, so as of now it's wait-and-watch. My friend Neha here, got pretty fumed about the judge, Ryan Seacrest calling him Anoop Dog. She assumed that pseudonym was drawn from Slumdog. But as it turns out, Anoop himself identified as 'Anoop Dog' (On the lines of 'Snoop Dogg' I think) during his audition, which I personally think is pretty lame. May be he just meant it to be one-time-funny and leave it at that.

One thing I believe is that no sensible American will call you terms like dog, at least publicly. Even if not for the sense of equality, they'd be damn afraid of racism controversy that might follow such comments. So unless you are one of those dumb blonde American celebrities, you wouldn't call such terms to African-American or Asian or any other minority. Any way, coming back to Anoop Desai. I am just waiting for the time, when India's 24x7 idiotic media will pick up this story and make big deal out of it. Digging history of Anoop Desai circa 1761 and desis flooding blogosphere with Anoop Desai posts.

Oh, and just in case you were wondering, that 'd' in 'nishitd' stands for 'Desai'.