Category Archives: Competitive Programming

Fast I/O in Java in Competitive Programming

Using Java in competitive programming is not something many people would suggest just because of its slow input and output, and well indeed it is slow. In this article, we have discussed some ways to get around the difficulty and change the verdict from TLE to (in most cases) AC. For all the Programs below… Read More »

Some important shortcuts in Competitive Programming

The most common tools to save time in C/C++ are typedefs and macros. Unfortunately, these features are not available in many other languages like Java. Here are some examples of our C/C++ code Shortcuts: // Shortcuts for “common” data types in contests typedef long long ll; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<int>… Read More »

A Better Way To Approach Competitive Programming

This article helps to all those who want to begin with Competitive Programming. The only prerequisite one need is the knowledge of a programming language. Now, Let us find a better approach to Competitive Programming. Please note: One should read the proper Input and Output format because most of the beginners make mistakes of having… Read More »

Generating Test Cases (generate() and generate_n() in C++)

Generating test cases for array programs can be a cumbersome process. But the generate and generate_n functions in the STL (Standard Template Library), come handy to populate the array with random values. generate() The generate functions assigns random values provided by calling the generator function ‘gen’ to the elements in the range [begin, end). Notice… Read More »

Fast I/O for Competitive Programming

In competitive programming, it is important to read input as fast as possible so we save valuable time. You must have seen various problem statements saying: “Warning: Large I/O data, be careful with certain languages (though most should be OK if the algorithm is well designed)”. Key for such problems is to use Faster I/O… Read More »

Competitive Programming: Conquering a given problem

  Programming is the process of developing and implementing sets of instructions to enable a computer to do a certain task.The programming contests like ACM ICPC, Google CodeJam, and IEEE Extreme etc. are delightful playgrounds for the exploration of intelligence of programmers. From knowing the contest at first to being at ACM ICPC Amritapuri Regionals,… Read More »