Showing posts with label competitive-programming. Show all posts
Showing posts with label competitive-programming. Show all posts

Sunday, August 28, 2016

Google Apac 2017 Round B Problem A "Sherlock and parentheses"

The problem was to find maximum number of substrings of L left brackets and R right brackets that are balanced. The first thing we can see is that, the number of balanced substrings will be maximized only when the left and right appear in pair, without any nesting. .i.e.

Quick Compilation of bits/stdc++.h header for competitive coding

If you are using bits/stdc++.h header to include all the header files at once, then probably you are also facing compilation time of about 8 to 10 seconds. This compilation time is long during contest, as you need to get the output fast to go with the Read-Eval-Print-Loop( REPL ) approach, and it can be frustrating at times.

Friday, August 19, 2016

List of competitive programming websites/OJ

There are several Online-Judges(OJs) and Competitive Programming websites on the Internet, here are few we are active on