Chittagong University of Enginnering and Technology, Bangladesh

ACMBEGINNER

 

Home \ TO START SOLVING PROBLEMS IN 24 HOURS OJ

Version 2.0

*Index   * Reference * Info * Mission * Update * Guestbook

 

TO START SOLVING PROBLEMS IN 24 HOURS OJ

Anupam Bhattacharjee
Department Of Computer Science & Engineering
Bangladesh University of Engineering and Technology.

This article is especially for the participants in 24 hours online judges

 

Learn a programming language

If you want to start programming in 24 hours online judge, the very first step is to learn a programming language. The most common languages used in the contests and 24 hours online judges are C, C++ (C plus plus), Java (Recently), Pascal. To start solving problems, you need not to learn all the languages (Although many programmers learnt more than one programming languages), but you have to learn at least any one of the four languages very deeply. This is because; when you will start solving problems you will have to concentrate only on the particular problem and you will have no time to think about the grammar of the programming languages. You should have a very well concept of the special features of the language you have learnt (for example, STL in C++) and you should practice these features to remove ambiguity while programming. After learning a language, check the other languages for any special feature that is much hard in the language you have learnt but very easy to code in that language (for example, in Java it is easy to use linked list as it was previously programmed (Built-in function) but in C it is harder as you have to write it manually.). You have to learn the standard form of the languages.

 

Choose any of the famous OJs 

There are many famous online judges that can judge your solve 24 hours. Some of them are 

 You may try to solve any of them. All of them have there own problem sets. Choose any one of them. 

 

Forget Efficiency and start solving easier problems 

Sometimes, you may notice that many programmers solved many problems but they made very few submissions (Of course, they are geniuses). At first, you may think that I should try to solve the problems as less try as possible. So, after solving a problem, you will not want to try it again with other algorithm (may be far far better than the previous algorithm you used to solve that problem) to update your rank in the rank lists. But my opinion is that if you think so you are in a wrong track. You should try other ways as in that and only that way you can know that which of the algorithms is better. Again in that way you will be able to know about various errors than can occur. If you don’t submit, you can’t know it. Perhaps a problem that you solved may be solved with less time in other way. So, my opinion is to try all the ways you know. In a word, if you are a beginner forget about efficiency.

Find the easier problems. Easier problems mean those problems that don’t need a particular algorithm as I assumed you as a programmer who don’t know many algorithms. Those problems are called ADHOC problems. You can find the list of those problems available in 24 OJ in S. Halim’s, acmbeginner’s, acmsolver’s websites. Try to solve these problems and in that way you can increase your programming capability. As far as I found, volume-4 of Valladolid OJ has many easy ADHOC problems.

 

Facing Compilation Errors? 

The first source of compilation error is the submit process. Earlier, most of the OJ has no special submitting system. They used mail programs (Yahoo mails, Hotmail systems etc) to get sources from the authors. These mail systems have many disadvantages. They append some extra lines at the end of the programs and as the compiler can’t recognize them, they give CE (Compilation Errors). These systems also break a long line of your program to several lines which may cause CE and wrong answers. So, if any special submitting system is available for the OJ, use them (For example, the submitting page of Valladolid OJ). To know more about compilation errors, check my article at acmsolver’s website).

 

Learn algorithms 

Most of the problems of 24 online judges are dependent on various algorithms. An algorithm is a definite way to solve a particular problem. If you are now skilled in coding and solving easier problems, read the books of algorithms next. Of course, you should have a very good mathematical skill to understand various algorithms. Otherwise, there is no other way but just to skip the topics of the books. If you have skill in math, read the algorithms one by one, try to understand. After understanding the algorithm, try to write it in the programming language you have learnt (This is because, most of the algorithms are described in Pseudo code). If you can write it without any errors, try to find the problems related to the algorithm, try to solve them. There are many famous books of algorithms. Some of them are

  • Introduction to ALGORITHMS – Cormen, Leiserson, Rivest, Stein
  • Fundamentals of COMPUTER ALGORITHM – Sahni, Horowitz, Rajasekaran
  • Internet

Try to make modified algorithm from the given algorithms in the book to solve the problems.

 

Last words 

Don’t be pessimistic. Practice makes a man perfect. So, try to solve more and more problems. A genius can’t be built in a day. It is you who may be one of the first ten of the rank lists after someday. So, get a pc, install a programming language and start solving problem at once. My only advice is,

“Take programming as a fun.”

 

References

 

Acknowledgements

Anupam Bhattacharjee  is grateful to Dr. M. Kaykobad, Dr. A. Kashem, Rezaul Alam Chowdhury, Munirul Abedin, Shariar Monzoor, Rujia Liu, Adrian Kuegel, and Jimmy Mardal, Hasan Shihab Uddin, A. K. M. Saifun Nabi, Sujoy Kumar Chowdhury above all his family for their helps and for inspiring him. He is also helpful to all his friends for helping him to prosper and inspiring him for contests in 24 hours online judge

Biography
Anupam Bhattacharjee is a BSc student of Bangladesh University of Engineering & Technology (BUET). He has been participating in 24 online judges for long days at Valladolid site and has made a room in the first quarter of the rank list. His interests are contests, algorithms, music, and after all computer programming. Visit him on 
http://anupam.envy.nu
 

Copyright © 2003 M H Rasel
[
Webmaster]
Last modified

1