Блог пользователя Ezio07

Автор Ezio07, история, 6 лет назад, По-английски

Following are my two C++ submissions for today`s contest AIM Tech Round 5 problem C,

Time Limit Exceeded

Accepted

Both are exactly same except an extra semicolon.

The solution is of O(NlogN) time complexity. Although my submissions were after the contest, but its highly likely that some users may have faced the similar issue during the contest, which is unfortunate.

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

I guess it is because servers fluctuation. There is a same problem.

Also, try to use ios_base::sync_with_stdio(false);cin.tie(0); next time.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Yeah thanks! It works pretty fast that way. But maybe time limits or constraints for such problems should be adjusted so that either most of O(NLogN) pass or most of them fail.

    For example, time limit was 3 seconds for a very similar problem (with similar constraints) Maximal Intersection of round 506, which allows most O(NLogN) solutions to pass.