Optimizations for Competitive Programming

Revision en1, by vatsal, 2016-06-06 17:00:05

Hello Readers, I have seen that many people don't use scanf or cin or cout or printf but their own input output functions but it looks horrible to me. I have heard that some people were able to pass "naive" algorithm under time limit with the help of optimizations. I would love if everyone here would share their optimization codes and explain meaning of every line so that "everyone" would get it in C++. I only know ios_base::sync_with_stdio(false); cin.tie(0); Also I don't understand the meaning of these lines. Thanks for your efforts. :)

Tags programming, competitve programming, optimization, c++ 11

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English vatsal 2016-06-07 13:53:17 27 Tiny change: 'functions but it looks horrible to me. I have h' -> 'functions . I have h'
en1 English vatsal 2016-06-06 17:00:05 587 Initial revision (published)