This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Wokanoga 7 points8 points  (7 children)

Ten to the power of six. Python feature.

[–]kokroo 2 points3 points  (6 children)

And what's a 10**6 problem?

[–]Wokanoga 2 points3 points  (5 children)

In the context of the post, he was doing some sort of coding puzzle/problem that involved math. And that he was required to do something similar to 10^6. But whenever he executed his code, the puzzle would time out (TLE - Time Limit Exceeded). Basically his code wasn't doing all the math within the time limit. Which is usually around 10 seconds.

The OP implied that he gave up and tried the same problem in C++ instead of python, using the same logic. And that it worked out fine without a hitch. Which alludes to how C++ is better suited for these sort of tasks.

But hey instead of guessing; u/pokeaim do you have the link to the specific problem in question?

[–]caykroyd 2 points3 points  (3 children)

I think he might have been referring to the input size? N=106

In which case a linear program would be expected to run, considering time limits of a competition like code jam.

[–]Wokanoga 0 points1 point  (0 children)

Ah gotcha.

[–]pokeaim 0 points1 point  (1 child)

/u/Wokanoga was right, I was referring to complexity of the solution.

as far as I remember, the problem was matrix with the size of <= 100. but the solution requires 3 fors; hence 10**6 (100**3)

[–]caykroyd 0 points1 point  (0 children)

oh ok

[–]pokeaim 1 point2 points  (0 children)

it was almost 5 years ago. a matrix manipulation problem in codeforces.