Several days ago I stumbled upon a problem EXPR2 in SPOJ. The problem could be very easy if this constraint didn’t exist: use only C/C++, Pascal, or Java, and there must not be any semicolons in the source code.
Well, after googling and thinking a little bit, I realized that this problem can be solved easily using C++. The main savior here is the if block construct.
Besides our teachers, mentors, or fellow friends, internet is a good place to ask if we have any programming-related questions. There are many forums or website dedicated to helping programmers. Experts from all over the world will happily help us. Often, we can obtain their answers only within minutes.
So, here is a list of good websites from which you can get programming supports.
This is a write-up for the problem Plant Location in CodeChef December 2009 Challenge.

Problem Statement
Given N points (x, y) on a plane and a straight line (Ax+By+C = 0), determine the position of point P on the line such that the sum of all points’ distances from point P is minimum.
Constraints
- 1 ≤ N ≤ 2000.
- |A|, |B|, |C| ≤ 5000; B ≠ 0.
- |x|, |y| ≤ 5000.
- No points lie on the straight line.
- No points share the same positions.
- A, B, C, x, y are integers.
- Time limit is 3 seconds.
After competing in many SRMs, I realized that I had to use good TopCoder Arena plugins to achieve the fastest coding experience. I have been using FileEdit + CodeProcessor + some tester plugins before, and I was quite satisfied with their performance during SRMs.
The most vital plugin is probably the tester plugin, because with a single click in my IDE, all sample testcases will be run. There is no need to click many buttons in the Arena to run the testcases.
However, as a programmer, I am interested to create my own tester plugin. So, here is my BETA version of the plugin, called TesterDream. Please have a try!
Do you, as a programmer, sometimes feel bored writing many programs? Or tired struggling to design some important algorithms? I do.
Take a rest. Programmers also need refreshing activities. Maybe by reading some jokes.
I’ve searched the internet and found many amusing jokes. I read them and feel refreshed. No, they aren’t jokes you usually find in books. They are jokes about programming, the topic you’re interested in. Now I want to share them to you.
Re
cently I participated in a programming contest named BNPCHS 2009, or Bina Nusantara Programming Contest for High School Students. It was a national contest in Indonesia. Luckily I was one of the finalists. I passed the qualification round, by marking full points on 3 given problems.
Everyone knows that C++ syntax is more flexible than many other languages are. You can type many confusing, tricky, obfuscated, yet working source codes in C++.
But do you know these syntactic tricks? These may only be syntactic sugars, but I find them very useful, especially in contests where speed is important.
In fact, that task can be easily accomplished using goto statement. You can’t use break statement because it only breaks the innermost loop.
However, many programmers hear the myth that goto statement is very bad, buggy, obsolete, etc. so they want to avoid using it.
So, how to break nested loops in C++, without the mystical GOTO statement? If it were used, the code would be something like this.