You are not logged in. Please login at to post your questions!


how to reduce compilation time in C ??

I am getting TLE in my program .. using for loops 2 times & it is showing to optimize my algorithm?? plz help

asked 05 Jan '14, 23:26

shantanu10's gravatar image

accept rate: 0%

are u sure u want to reduce the compilation time...:P

(06 Jan '14, 21:15) kunal3614★

Optimization will depend on type and category of problem. for example if problem is sorting then it can be optimized from O(n^2) to O(n) but not below that. Share your problem and solution,then only any one can help.

Vaguely I can just suggest, try to do a thing in linear time i.e O(n) time rather than O(n^2) if it is giving TLE.


answered 06 Jan '14, 02:21

c0d3_k1ra's gravatar image

accept rate: 11%

Actually the problem is from live contest and that's why I won't be able to discuss it here..but thanks for the advice

(06 Jan '14, 15:56) shantanu102★

if you use c++, then prefer scanf and printf over cin and cout, will compile quicker. i dont know any other trick yet.


answered 06 Jan '14, 02:41

garakchy's gravatar image

accept rate: 1%

yup. already using scanf & printf

(06 Jan '14, 15:57) shantanu102★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 05 Jan '14, 23:26

question was seen: 18,477 times

last updated: 06 Jan '14, 21:15