huseynahmadli2010's blog

By huseynahmadli2010, history, 8 months ago, In English

Is 1,5 seconds enough for O(10^10) in c++?

  • Vote: I like it
  • -11
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by huseynahmadli2010 (previous revision, new revision, compare).

»
8 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

It depends on the operations the solution is doing.

Very roughly, $$$10^8$$$ operations can be done in 1 second. $$$\frac{10^{10}}{10^8} = 100$$$, so $$$10^{10}$$$ operations would take about 100 seconds.

The actual time it takes may vary and its better to have a good understanding about how the time complexity and execution time form.

  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    but if it will be 2 seconds it will be AC so how do you explain this?

    • »
      »
      »
      8 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Maybe the complexity was calculated incorrectly. Also maybe pragmas and optimizations could change the execution time. Can you provide an example of $$$10^{10}$$$ solution getting AC?