pimenta's blog

By pimenta, history, 7 years ago, In English

Hi,

I've wrote a solution for problem 883K - Road Widening in C++11 and Golang. C++11 runs in 156 ms, but Golang gets TLE (3000 ms).

C++11: 31844450

Golang: 31844038

Why? Did I do something wrong in the Golang implementation, increasing the time complexity?

  • Vote: I like it
  • +16
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
  Vote: I like it +10 Vote: I do not like it

What is Golang?

»
7 years ago, # |
  Vote: I like it +16 Vote: I do not like it

Nevermind, just found the explanation here.

Same golang code with buffered input gets 1294 ms (AC): 31845683.

With both input and output being buffered, 390 ms: 31845737.