Thursday, October 22, 2009

void main()
int a;

Wednesday, October 21, 2009

void main()
int a=3,b=2,c;

To understand more about this printf, Click here

Monday, October 19, 2009

Kakuro puzzles resemble crosswords which use numbers instead of words. The aim of the game is to fill all the blank squares in the grid with only the numbers 1-9 so that the numbers you enter add up to the corresponding clues. When the grid is filled, the puzzle is complete. Sometimes called "Cross-sums" or "Kakro", Kakuro is Sudoku's bigger (and harder) brother.

Kakuro puzzle grids can be any size, though usually the squares within them have to be arranged symmetrically. As a rule of thumb, the more blank squares a puzzle contains, the harder it is, however this isn't always true, especially if it is a good quality puzzle.

NOTE: It is very important to note that a proper Kakuro puzzle has only 1 unique solution, and it will always have a logical way of reaching it, there should be no guesswork needed.

An easy Kakuro puzzle

Solution for the above puzzle

In discussing Kakuro puzzles and tactics, the typical shorthand for referring to an entry is "(clue, in numerals)-in-(number of cells in entry, spelled out)", such as "16-in-two" and "25-in-five". The exception is what would otherwise be called the "45-in-nine" — simply "45" is used, since the "-in-nine" is mathematically implied (nine cells is the longest possible entry, and since it cannot duplicate a digit it must consist of all the digits from 1 to 9 once). Curiously, "3-in-two", "4-in-two", "5-in-two", "43-in-eight", and "44-in-eight" are still frequently called as such, despite the "-in-two" and "-in-eight" being equally implied.

Solving techniques

Although brute-force guessing is of course possible, a better weapon is the understanding of the various combinatorial forms that entries can take for various pairings of clues and entry lengths. Those entries with sufficiently large or small clues for their length will have fewer possible combinations to consider, and by comparing them with entries that cross them, the proper permutation — or part of it — can be derived. The simplest example is where a 3-in-two crosses a 4-in-two: the 3-in-two must consist of '1' and '2' in some order; the 4-in-two (since '2' cannot be duplicated) must consist of '1' and '3' in some order. Therefore, their intersection must be '1', the only digit they have in common.

It is common practice to mark potential values for cells in the cell corners until all but one have been proven impossible; for particularly challenging puzzles, sometimes entire ranges of values for cells are noted by solvers in the hope of eventually finding sufficient constraints to those ranges from crossing entries to be able to narrow the ranges to single values. Because of space constraints, instead of digits some solvers use a positional notation, where a potential numerical value is represented by a mark in a particular part of the cell, which makes it easy to place several potential values into a single cell. This also makes it easier to distinguish potential values from solution values.

I find this game to be more interesting than Su-do-ku. I had never been interested in Su-do-ku though I like number puzzles in general! This game is a perfect replacement to Su-do-ku!

You can play this game online at

My First Kakuro puzzle (Took 19 minutes 32 seconds to solve this puzzle!)

Proud moment for me. So soon, it has become two years since this blog has been started. This blog was the first useful thing I did after turning 18 and it is growing old along with me! This is the 279th post in my blog. I planned to touch VVS Lakshman's magical figure of 281 to make this post memorable. But couldn't do it. Because I can't post in my blog just for the sake of posting. One kind request to my readers is that, if you want to comment on a post of mine, comment it here rather than mailing me or scrapping me in Orkut. Anyway, thank you for your support without which this milestone would have never been reached.

Sunday, October 18, 2009

This post is called ‘The Drop’.

Internal exam was a cakewalk for me. I had time to study from 8:30 to 10:45. I would study and then write exam from 10:45 to 12:45. Then after noon exam would be 2:00 to 4:00. I didn’t even go to my class during the internal exam. I studied with Raj Kamal in Mechatronics. I performed really well. Only a girl named Gauthami performed better than me. I was quite happy. I also noted that Johnson, Arun, Vimal Kumar were the other guys in the top ten. I took notice of them. Karthikeyan did reasonably well too; think he got the eleventh rank.

And then the classes went on for a month. Here I should mention about three staffs, Vijayanandhi Ma’am (Electrical Engineering), Sengodan Sir (Engineering Physics) and Velmurugan Sir (Engineering Drawing), next to my school teachers, these were rocking. They were giving their very best. I did exceptionally well in the second internal exam where none performed better than me. Till that, I did not make any serious friendship with any of my classmates. Johnson and Vanavan still were the only people I spoke with. Other than this I used to speak with Karthika, Kalyani and Jinju mostly to get the notebooks and observation works from them. He he. What else to speak? :-P.

Karthikeyan used to call me up once in a while. We discussed nothing but the subjects. Life was monotonous.

After the second internals, there was an announcement about a National Conference called Confluence and students could present paper in that. I did not know what a paper was not had idea of presenting a paper. Karthikeyan asked me whether I was interested in presenting paper. He informed me that Arun was already in the team. I thought for a while on the possibilities and replied positively. Karthikeyan became Karthi after sometime and I noticed that Arun was Arun Kumaar. The double a in his name was to be noted. Karthi suggested Solar Cell as the topic for our paper. We discussed with Sengodan sir on this. On a Sunday noon, Arun and Karthi came to my home. Arun was using computer at a rapid speed. Infact I noticed that during an English lab when, he changed the Show Hidden files from the folder option. But his speed was very much evident.

That day was like a training period with Arun and Karthi. Those guys taught me the shortcuts and I had never used Google images before that. That was also taught by those guys. Arun was using MS-Paint and Print Screen like magic. I had never seen such stuff before that. We used to get OD (On Duty attendance) for works on this paper. We later changed the topic as Solar Photo Voltaics. Prabu later joined our team.

Preparation went smooth. Meanwhile I joined Orkut and was introduced to chatting. Well, it was a kind of distraction to me. To be honest, I spent lot of time on this. But it helped me to get new friends. Especially, Deepa. I used to write my fan fiction work of Harry Potter in J K Rowling community. Deepa liked my work and sent me her friend request in Orkut. We used to spend lot of time chatting in Yahoo messenger. From being unknown strangers, we became very close friends. And due to excessive Internet usage (initially I had bandwidth restricted to 250 MB). I got a pretty fat bill! So I switched unlimited bandwidth. So I started downloading lot of movies.

I didn’t spend enough time on studies. In the third internal exam, from 1st rank I dropped alarmingly to the 11th rank. But the convincing part was that my performance was the same except for Maths. I still remember my mark. I scored 58. Karthi and Arun flunked but requested for marks from Sivasakthi Ma’am and cleared. So I wasn’t very much worried about my drop.

It was confluence day

We presented the paper. I don’t remember presenting it with flying colors. But we did a good job. Arun and I presented the paper. Karthi and Prabu took care of the slideshow.

Surge-2007 was an event organised by my seniors and the placement cell. I attended the Mock Press prelims. I had some ten GK questions and dialogue writing between Bill Gates and Lalu Prasad Yadav. I tried to be funny, by making all replies of Lalu in Hindi (I managed with the few words I know in Hindi). So I was able to clear the initial hurdle. And reach the finals. In the finals, I did pretty bad because I got the role as James Bond and I was against Vadivelu. So obviously I didn’t win the event. But, my schoolmate Gopalakrishnan who was studying IT in my college made it to the debate finals. Along with him he brought his friend, Gokul. He was into debate finals as well. They did really well in the finals. But there was one IT senior called Priyanka who stole the show. It was a wonderful evening. It was so late in the evening. I was waiting for my dad to come and pick me up.

Devaki Ma’am finally taught Linked Lists, Queue and Stack. I feel that it was an important phase in my programming career. Learning this stuff was very important.

It was the last week of the semester.

Semester was to be over.

I was not absent even for a single day in that year.

It was a Monday. I had to submit my mechanical lab records. So I took three hours leave. (3, 4, 5)- 6th and 7th hour was Mechanical lab, went to Vanavan’s room in hostel and finished the record. In the same week I had taken another couple of hours leave on Friday to finish Electronics lab record.

Those were the 5 hours; I was totally absent in that semester.

Top ten students from each class were given a scholarship of Rs. 10,000 by my college. Having performed well, I was an instant choice to that list. Unluckily, Johnson missed out. Arun and Karthi got it too.

I feel that, it should have been based on merit. But it had reservations.

1. OC-3
2. BC-3
3. MBC-2
4. SC/ST-2

If OC was 3 then BC, MBC, SC/ST all had rights to compete in OC and their reservation. But it was not the case.

Even when it was based on reservation, the reservation was not well-organised.
In my opinion, Arun was the only OC category guy to deserve it. In my class, there are only 3 OC students who joined through merit:

1. Arun
2. Karthikeyan
3. Kalyani

So naturally what happens is that, every year they would get it.

If it was similar to counseling, only Arun had the chance. But it was not the case. I do not know whose mistake it was. But it was a mistake.

Then the semester exams started. I did well in all the papers, except Engineering Drawing where I made 2 big blunders and knew that I would lose 30 marks in that paper for sure.

Overall I was happy with my performance in the semester examinations. In came holidays. I was glad that I would be entering my department the next semester!

The drop in academic performance was not hurting me because, I always believe, “Form is temporary and Class is Permanent”. I knew I could always bounce back, if I wanted to.

Journey will continue…

This post would be called Fear.

Yes, fear because I was afraid of the persons who had taken up the same course as me. I picked up when there were 5 seats remaining. Which means that there were nearly 30 people who had far superior cut-off to me and they should be more intelligent than me. So I should work really hard to compete with them.

I had never been industrious in my life except for my eleventh standard and brief period in twelfth standard.

Till tenth, I had never understood the Chemistry equations. What the principle was? Thanks to Chemistry teachers - Suresh Sir, Sekar Sir and Chandra Sekar Sir (It might be odd for you to refer so many persons as sir, but this is how I call them. Habits are hard to die!). I clearly understood the fundamentals of Chemistry in my eleventh and twelfth! Only when the fundamentals are strong, it serves the purpose of being industrious!

Well, there was a bit of selfishness from my side too. I learnt chemistry well because it could come handy for bio-chemistry in first-year if I pick medicine. But learning Chemistry was off no use except that it helped me fetch a seat in Computer Science and Engineering in Kumaraguru College of Technology.

Ok coming back to fear, I enquired to my family members and relatives on what College was about. They said that, I had to learn everything in advance and during lecture hours should get the essence of what the professor or lecturer teaches and get clarity by posing queries.

So, I planned to study the subjects in advance. I studied few chapters from a subject called Electronic Devices and Circuits because I already had that book borrowed from my uncle. My best friend Raj Kamal had joined Kumaraguru College too. He took up Mechatronics course. Since he joined under Management quota he had 3 weeks of bridge course. I enquired him what was taught and how the college was. He was giving positive reviews about the college. I was happy on picking the college.

My First day in College

It was August 31 2006, a Thursday. In the morning there was a meeting for the parents which I attended with my mother and grandfather. A person named Kavidasan gave a wonderful speech.
He told that, days when the proverb applied “Slow and steady wins the race” were bygone and gave a new proverb “Fast and perfect wins the race!” My mother and grandfather left the college after the lunch which was provided by college.

A new life was about to begin.

I was surprised by the fact that, all First years will be in a separate block called Science and Humanities and I Shall enter computer science department only in my second year. I entered the science and humanities block. I quickly skimmed through the notice board. I saw that my Physics teacher was my Class Advisor and his name was Sengodan. I had never heard that name in my life before. There was a teacher in my school called Senram, which was the closest name I could remember.

When I entered the class, the first person I met was a guy called Suresh.

In our lives we don’t like few persons from the first sight. This guy Suresh was one such person. I didn’t like him from the moment I saw him. He introduced to me another guy called Johnson. You know what? I had never been a first bencher in my entire school life, probably due to my height and my talkative nature. Staffs would not prefer to have me in the first bench during school. I was a standing a example to what people call “Chatter Box”. But I planned to take the first bench in College.

And there was a guy called Vanavan who came to the first bench because all other benches were pre-occupied. One major question which all staffs asked during the first class of theirs was, “how many of you are from biology major and how many of you are from computer science major?” My heart would start beating a little faster whenever I see the huge crowd of computer science students (they had computer science as their major in twelfth). I was afraid of them. I feared that they knew the programming languages like C, Java, Visual Basic, HTML etc., which I had seen my school mates studying. I knew nothing!

My dad arranged a person named Kamalakannan he was the nephew of my dad’s colleague.
He taught me looping, arrays and pointers. More than what he taught, I must thank him for introducing me to Yashwant Kanetkar’s book titled ‘LET US C’. I already had a book called ‘Projects Using C’ written by PVN. Varalakshmi. I read ‘LET US C’ like a story book. Tried out few programs and compared my logic with the one in Varalakshmi book. This was how I spent my first two weeks in College. Computer Programming was a paper for me in the first year. It was taught by Prof. Devaki. She was initially teaching the basic computer terms, generation of computers and such theories. Other staffs had entered into the syllabus as well.

I had eight theory subjects:

1. Computer Programming
2. Engineering Physics
3. Engineering Chemistry
4. Engineering Maths
5. Engineering Drawing
6. Electronic Devices and Circuits
7. Electrical Engineering
8. Technical English

Couple of practical subjects

1. Basic Engineering Lab
2. Physics & Chemistry Lab

I had two more labs viz., Electronic Devices and Circuits Lab and Computer Programming lab. But there were no exams for that lab!

Couple of weeks passed. As I hated Suresh at the first look, I liked Shiva Guru at the first look. Since, I was travelling to College by bus, I made few friends in the bus. Shiva Guru, Sriram Ayyapan, Arshad and Prahadeesh.

I used to go to Mechatronics class for lunch with Raj Kamal. So I was not maintaining a great rapport with the day scholars of my class. In fact, my term with both day scholars and hostellers was very bad mainly because of Electronic Devices and Circuits class. Since I had already prepared for that class, I would be able to follow what Sasikala Ma’am teaches. But none in the class except me and Johnson would follow that class completely. Johnson and Vanavan were my only pals in the class. In my Electronic Devices and Circuits Lab, my batchmates were Dinesh and Divya. Though they were not as close as calling pals, atleast they did not stare at me as the other classmates. Raj Kamal introduced to me a guy called Arun who was Raj Kamal’s entrance classmate. When that introduction took place, a guy passed a scorning look at me. I acknowledged it with another scornful look. I later learnt that his name was Karthikeyan.

So far I had spoken to only 5 to 6 odd persons in class. By now, I had known every person in the class by name mainly because of the attendance that is taken once every hour in college. In my school it was one-time attendance in morning and one-time in noon. Every hour attendance was pretty strange for me and it took some time to get used to it.

One day, there was an ellipse drawing exercise in engineering drawing class. I had completed that drawing. During break couple of girls, introduced themselves as Priyadarshini and Ramapriya and asked few doubts on drawing the ellipse. I had been wondering, whenever any person spoke to me, either Johnson or Suresh, it was for asking doubts to me. There was no discussion on movies or Harry Potter or any other book to which I was used to in school.

During bus travel, I used to read some book. So my bus mates that thought I was a nerd :-(. A misconception, most people tend to get when they see me.

The same day, after lunch there was a computer programming class. Devaki Ma’am asked a question on a simple assembly language program. My brain was working slowly; listening to a computer programming class after lunch was daunting task. Arun answered it, before I could get hold of what the question was. I was surprised, but fear factor was more than the surprise factor. There were people in the class who had better knowledge in computer than me.

And a week passed. Devaki Ma’am sent us an alternate in the form of Mr. Sivan Arul Selvan (he looked a perfect person to be cast as Uncle Vernon Dursley in Harry Potter), who did not teach us anything but questioned us on the computer configuration. Karthikeyan was called on to the stage and questioned on that. He said, he had a computer at home but did not know about configuration since he was a biology student.

There is a scene in Tamil film Vaali where the younger brother Shiva explains that his brother Deva is a deaf and mute person. But he hides that he is a dumb person by chewing a bubble gum. And since he can lip-read, nobody would detect that he his disabled.

Same applies to me as well. I was never proud of calling myself as a biology student in my class. Now that I have picked computer science, I like to address myself as a computer science student. I felt bad whenever biology was used as an escape route just as few Tamil medium students take that as an escape route in English classes.

I admired Sivan sir for the lively way in which he took the class. And two more weeks passed away, Internal exams were about to begin. Now I was feared of performing well in the exams.

Fear of losing makes you win. Fear of winning makes you lose! This was the lesson I learnt during this phase of college life!

Journey will continue...

I wanted to share my life at college. Its no secret. Its a reminiscence of my college life. I have named this post as Peristaltic Wave. I first heard this term when I was studying about the process of digestion in my zoology book, when I was in twelfth standard.

An interesting fact
When you consume food, whatever might be the posture in which you are, even if you are hanging upside down, the food would reach the stomach.

This gentleman called 'Peristaltic Wave' is responsible for this. In much of the gastrointestinal tract, smooth muscles contract in sequence to produce a peristaltic wave which forces a ball of food along the gastrointestinal tract. This wave helps to carry the food in a direction that is expected!

From the above paragraph it might me evident for you that I had been studying Zoology with a purpose (or even biology for that matter) and I was very passionate about it too. I wanted to be a Doctor.

It was March-2006 and I had my twelfth board examinations. The only exam for which I prepared giving my 100 percent was my biology exam. Though I gave my 100 percent I missed out on few one mark questions and couple of three mark questions. I was sure of getting 190 in the paper. So as I always calculate I calculated this too.

When I was studying twelfth, the medical cut-off was calculated in this pattern

Biology theory-100 marks (200/2)
Physics theory-50 marks (200/4)
Chemistry theory-50 marks (200/4)

Biology Entrance Exam Score-50 (90/90*50)
Physics+Chemistry Entrance Exam Score-50 (90/90*50)

Total: 300

My calculation was that I lose 5 marks in biology.

I had already calculated that I will be losing 16 marks in physics and 4 Marks in chemistry.

So it was losing 10 marks in total.

190/200 was my expectation.

Then came entrance examination.

I performed pretty well in biology and pretty bad in the physics-chemistry entrance examination. Mainly because, I was focussing on biology exam in the morning (I had both the entrance examinations on the same day). It was taxing my brain. My poor preparation resulted in poor performance. I made mistakes even in the easiest of the questions.

Results were announced

I got 189 in biology
185 in physics
193 in chemistry

It was 5.5+5.5. I had lost 11 marks. One more than what I expected.

Biology Entrance Exam Score-44.12
and 38.66 inPhysics+Chemistry Entrance Exam

Total cut-off was 271.78. I thought I will not get the medical seat which such a poor cut-off. In the previous years, it was around 285. I did not apply for the medical counselling itself. My friend Santhosh, who got couple of marks less than me applied with courage and belief that he would get a seat. I was shocked to know that he got a seat while I didn't bother to apply at the fear of not getting the seat.

Though I reconciled myself that I would not have got a seat in Madras Medical College nor Coimbatore Medical College I was quite worried. Infact I still worry!

I had not been telling about my performance in Maths. I scored 199 in Maths and made a blunder in the entrance examination by marking 14 questions wrongly. I usually solve the questions in working sheet and then fill in omr sheet. It was the last minute. In a hurry instead of marking from 77 to 90th question I marked from 78 to 100! So naturally I lost about 4 to 5 crucial marks in that. My maths entrance score was 36.93. Overall cut off was 269.59.

I had to apply for engineering counselling because I did not apply for the medical counselling. I had no other option left. I got the counselling rank. Mine was 2404 overall and I had a community ranking of 1248. I got a call for counselling on the third day. I knew I cannot make it to PSG but I was confident of making it to GCT. On the second day, GCT seats were filled. I was very upset. Infact even Kumaraguru seats were getting filled. On that day evening, I made a stern decision, whatever the college might be, I have to pick only Electronics & Communication or Computer Science or Information Technology. And shortlisted Kumaraguru, Krishna College. The next day, once Kumaraguru Open Category seats were filled, people shifted to other Chennai Colleges. When I was about to enter counselling, there were seven seats in Kumaraguru Computer Science. I was almost certain of getting it. When I entered counselling hall, they verified my certificates and took me to a Computer lab, where seat allocation was done. I was informed that, my session rank in Coimbatore was 1 and Session rank over all in Tamil Nadu was 3. And there were 5 seats in Kumaraguru Computer Science. So I would definitely get a seat.

At that moment, I felt that I was totally relieved. Life was appearing brighter to me. I was very happy.

I had expected something from life and life had given something else to me. The peristaltic wave called life had been taking me in a path which has been pre-determined. Whether I hang upside down or not, my journey through it will be on course! Life is all about making fortunate discoveries by accident. I discovered it on that day.

Journey will continue...