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

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

Yesterday, when I was writing virtual contest in GYM, I found some interesting feature. From status I could find number of tests, I guess it works for any problem. However, I have not tested it for official round, but at all it's worth for a new blog. In the status-filter bar, you maybe have seen a section "test", but you probably dont know the magic, which can be done with it.

By changing sign to $$$\geq$$$(is greater than or equal to) and giving number to this empty space you can find number of test. If you found that maximal $$$x$$$, that all submissions are accepted and no submissions at $$$x + 1$$$, $$$x$$$ is the number of test. You may ask, why binary search is written in the title. It's the most optimal and the fastest way to find this number, less than 10 steps)

P.S. Sorry for my poor English

UPD: It works in Official Rounds.

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

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

Typical useless feature from Reddreamer:(

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

It is not the number of tests, it is the last test submissions ever failed on.

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

In the rounds you can use m2.codeforces.com. The judge simply shows the number of tests.

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

    original post: using ternary search to optimize function

    this comment: using calculus to optimize function

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

Also CF hasn't __int128 ,but other platforms like AtCoder , YandexContest and etc have

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

    and Why do you exactly need this?? use long long or similar data types

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

      Stuff like factoring or primality testing of numbers larger than 1e9 is very painful to do without __int128. The standard convex hull trick with constants ~1e18 and multipliers ~1e9 for the lines requires __int128 or custom long long multiplication to protect from overflows. There are a lot of other applications as well that I just can't recall right now.