125 Ad spot 125 Ad spot

ACMSolver or Art of Programming? 24 X 7 Updates

From 2002 ACMSolver is campaigning for free programming knowledge!

3 September 2010 0 Comments

An Interview with Burunduk2

An Interview with Burunduk2
How long have you been engaged in programming? How did you start?

As I remember I started programming when I was 9 years old in my third year at school. My first programming language was Basic. One day I found an old book describing the principles of solving differential equations. I didn’t understand them at all but the examples were given in Basic and I began learning the language.

When I had grasped the fundamentals, I started coding. First I wrote programs just for mastering the language and then went on with the ones closer to real life problems. During the first year of my self-education I tried to write small games – mathematical and arcades mainly. Later I wrote editors, image viewers, and code-helping utilities. (My own 3-D shooter game I left unfinished.)

I participated in my very first programming contest in the sixth form. It was the Saint-Petersburg School Olympiad where I got the last but one of the third category certificates for solving several problems. By that time I had been already attending a special programming group for kids. At such circles children had an opportunity to study Logo, Pascal, C, Basic and learn how to solve algorithm problems. Thus by the time when I started taking part in real programming contests, I’d already had some programming skill.

[...]

1 September 2010 0 Comments

Algorithm and Programming Competition links

Programming Competition :COCI : Croatian Open Competition in Informatics
USACO : United States of America Computing Olympiad
IOI Thailand League
Al Zimmermann’s Programming Contests
Google Code Jam 2010
Codeforces BETA

Online Judge && Problem Container :Programming.in.th : เว็บยอดฮิตโดยคนไทย
USACO : United States of America Computing Olympiad
IARCH Problem Archive
Sphere Online Judge
Timus Online Judge
TopCoder Problem Archive
UVa Online Judge
PKU JudgeOnline
British Informatics Olympiad
ALL IOI TASK (1989 – 2008) : รวมโจทย์ IOI

IIT Kanpur, Algorithm Applets Page
Thailand OI Official Website
TopCoder Algorithm Tutorial
COME ON CODE ON
ACMSolver
Algorithmist

IOI Information :IOI Official Website

Tags:
29 August 2010 0 Comments

Getting Started in UVa Online Judge

Getting Started in UVa Online Judge

by Zac Friggstad

The UVa Online Judge is a web site where you can try solving a number of algorithmic problems by implementing the solution in C, C++, Pascal or Java. The problems are usually described in a few paragraphs and some sample input and output is given for the purpose of illustration. For example, the problem might state that a weighted, undirected graph is given as input and you are to output the cost of the minimum spanning tree.

Solving a problem on the UVa Online Judge requires the following:

  • Read and understand the problem statement
  • Devise an algorithm to solve the problem
  • Implement the algorithm in C, C++, Pascal or Java
  • Finally, if you are convinced of its correctness, upload your code to have it judged.

The judging is automated (they use benchmark input and output files), so you can typically expect a response within a few seconds.

Getting Started: A Step-By-Step Introduction

The website is located at http://uva.onlinejudge.org/. After registering, choose the “browse problems” link on the lower-left side of the main page. From here, you will be asked to choose which problem set volume you want to browse.

Since this is a tutorial, I will suggest a problem. Follow the “Contest Volumes” link and select “Volume CXI” from here. We are going to try problem number “11172: Relational Operator”, so select it from the list.

Begin by reading the problem statement; hopefully you realize that the problem is absolutely trivial. Don’t worry, there are plenty of far more interesting problems on the archive. This problem is chosen to help you get used to the mechanics of the judge.

Make sure you are comfortable with the input and output specifications. When you submit the problem, the judge will supply their own input based on the input specification and the judge expects the output to conform to the specification in the problem description.

Begin by coding the problem. You should read the input from standard input and write to standard output (e.g. cin and cout in C++ or scanf() and printf() in C). For example, the following C++ code would solve this problem:

#include <iostream>
using namespace std;
int main() {
int n, a, b;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a >> b;
if (a < b) cout << '<' << endl;
else if (a > b) cout << '>' << endl;
else cout << '=' << endl;
}
return 0;
}

Try compiling this problem and testing it with the sample data; I suggest creating a file with the sample input and supplying this file to the program as standard input. For example, if the program name is ‘relational’ and the file name is ‘input.dat’, then you can test your code by executing ./relational < input.dat from a terminal window.

Does it work? Great! You are ready to try submitting it to the judge. In the upper-right corner of the problem description page you should see the graphic . Clicking on this will bring you to the submission page for this problem. Select the language you coded the problem in and upload the file using the upload tool. Once you are ready, click submit and hope for the best!

You can check the status of your submission by selecting the “My Submissions” link on the left side of the page. The “Verdict” heading will tell you if it was solved or if there was a problem (e.g. wrong answer, ran too long, crashed, too much memory was used, compile error, etc).

Now go ahead and solve some more problems!

[...]

27 August 2010 2 Comments

How to get started with TopCoder?

How to get started with TopCoder?

by  Vaibhav Pandey

After successfully coding the first time in Topcoder, I really feel greatful in sharing my experience with all. Simply, it was great. Got to learn a lot of new things. I have started it too late but being in UPTU and that too in a college where seniors are not that into coding, it was still very early.. ;)

So, I am writing this post to acquaint my mates with the TopCoder Competitions. What I m goin to discuss is all about the algorithm competitions.
Top Coder is a programming arena where you are given a set of problems and you have to solve them (in your preferred language) in a given amount of time. There are some simple steps to follow before starting with the coding competition:

  • Goto Topcoder site and get yourself registered.
  • Now when you are registered, download the Topcoder arena. You will need Java to be installed in your system for making the applet run.
  • Get yourself an editor(I use KawigiEdit). The editor helps in generating the code required for the competition. If you need help to install it.. read this.
  • Start the contest application and start navigating. There are practice rooms where you can practice the earlier SRM’s(single round matches).

SRM are the single round matches which are organized twice every month. You are given three problems to solve. What you need to do is to generate the code using KawigiEdit and simply put your logic in the function provided.
The important point about TopCoder is that you don’t use the main() method in your code. All your logic is dumped inside a function and you have to return your answer instead of printing it.
The several phases of the competition are:

  • Coding Phase: During this phase you are given 75mins of time to solve as many problems as you can. What you need to do is to write your code, compile it and after rigourous testing on test cases provided and some of your own test cases, “submit” it.
  • Intermission: 5mins intermission.. I hear a song usually.. :)
  • Challenge Phase: During this phase in 20mins time any of the room members can see your code or you can see theirs. If anyone finds anything wrong with anyone’s code, he can simply challenge it. If he succeeds the submitted problem will be discarded and points will fall back to 0.00
  • System Testing Phase: After the challenge phase comes System Testing Phase. This takes a fare bit of time. After near about 20mins you can goto tools and room summary for checking whether your code passed the System Testing or not.

[...]

26 August 2010 0 Comments

International Collegiate Programming Contest, Asia Region – Kanpur Site 2010

International Collegiate Programming Contest, Asia Region – Kanpur Site 2010
Deadlines:
  • Rgistration Starts: 17 August, 2010
  • Registration Ends: 18 September, 2010
  • Preliminary Online Contest: 30 October, 2010
  • Kanpur Site Contest: 11-12 December, 2010

Registration is a two steps process:

Step 1: Register your team on the ACM ICPC Contest’s International Site http://icpc.baylor.edu. This is required and must be done by 18 September, 2010.

Step 2: Fill the registration details (by clicking here), take a printout and send it along with the registration fee to the Contest Director so as to reach on or before 18 September, 2010.

Registration Fee:

For Teams from India:
Rs. 3,000/ -(1,500+1,500). Make TWO demand drafts, each of Rs. 1500/- drawn in favor of “ACM Kanpur” payable at Kanpur, India. Do not forget to write the Address for Correspondence on the backside of the Draft. However in case a team from India can not qualify the preliminary contest, the draft of Rs. 1500/- will be returned soon after the Online contest.
*For Teams from Other Countries:
US$ 200/-. Make ONE demand draft of US$ 200/- drawn in favor of “ACM Kanpur” payable at Kanpur, India.

Website: http://www.cse.iitk.ac.in/users/acm/registration.html

26 August 2010 2 Comments

ACM-ICPC How to get started?

by Chua Hock-Chuan (ehchua@ntu.edu.sg)

To know more about ICPC, read the ICPC mother site (@ http://icpc.baylor.edu/icpc/) or Wiki “ICPC”. To summarize, ICPC is the programming contest for the university students (just like the IOI – International Olympiad in Informatics – is the programming contest for high school students). The ICPC contest rules are:

  • Each team consists of THREE students
  • Each team is given only ONE computer
  • Each team is given 5 hours to solve 8-10 problems (in C, C++, Java and possibly Pascal)
  • The team who solves the most number of questions in the shortest time is the winner
  • There are two stages for the contest: Regional’s and the Grand Final. Winners of each regional contest proceed to the Grand Final

PREPARATION…

Step 0.1 – Read, Read, Read: on programming, data structures, algorithms, and object-oriented programming.

Step 0.2 – Pick your Language: Pick a programming language that you are comfortable, either C++ or Java or both (but not C nor Pascal as they lack advanced libraries).

Step 0.3 – Gather Programming Resources: Gather programming books and materials, especially online references and resources.

Step 0.4 – Setup your Programming Workbench: If you can afford a laptop, get one (so that you can program at the Starbucks and in the train).

Depending on the host, the contest could be run on Linux (most likely) or Windows or any other exotic machines.

For Java programmers
Use JDK 1.5 and above, which greatly simplifies the IO processing. The Java IDE of choice is certainly eclipse – an open-source IDE supported by IBM (the official sponsor of the contest), and it runs on both Linux and Windows. For newcomers, read “How to install Eclipse“, “writing your first Java program in Eclipse“, and “debugging Java program in Eclipse“.

For C/C++ programmers
It is harder to decide because you have a few options:

Important for All Programmers

  • You should be familiar with the use of graphical debugger to improve your programming efficiency and productivity.
  • You should be familiar with the libraries, such as Java’s API and C++ STL.
  • [TODO] more

Step 0.5 – Online Judges and Training Sites: There are many “online practice sites” called online judge, that archive hundreds (or even thousands) of past contest problems. You could try the problems at your own time and own target, and submit your solutions online. You program will be automatically compiled and run with a carefully-designed set of test inputs. The status of the run, such as “accepted”, “wrong answer”,”compile error”, “presentation error”, “time limit exceeded”, “memory limited exceed”, “output limit exceed” will then be shown to you. In the case of compilation error, some of the sites may also show you the compilation error messages.

These are the sites that I frequently used (google or wiki “icpc”, “online judge” to get the full list).

  • Peking University Online Judge (PKU): This site support many languages, including Java (JDK 1.5), GNU’s GCC/G++ (for C/C++) and Visual C/C++ version 6.
  • Universidad de Valladolid Online Judge (UVA): This is the most reputable site, with a good forum (equipped with search). The support for C++ is excellent, however, the support for Java is mediocre (no JDK 1.5).
  • USA Computing Olympiad (USACO) Training Program: This is the training site for IOI (International Olympiad in Informatics for high school students) instead of ICPC. However, it provides a very systematic training on the algorithms frequently encountered in contests, e.g., shortest path, greedy, dynamic programming, heuristic search, minimum spanning tree, and etc. It supports C, C++ and JDK 1.5.

[...]