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

Автор Hamroz_JONN, история, 19 месяцев назад, По-английски

Everyone says it's 10^9 operations, but that's way too slow.

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

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

I believe it's around 1e8 operations per second

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

    Could you please tell how much exactly ?

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

      No, and nobody can. It depends on how cache-friendly your operations are and how much can the compiler cut out from your branching, plus then you have to check every inbuilt function for its complexity. It is better to think that 2-3e8 operation can pass on CF with average operations, up to 1e9-5e9! if they are cache friendly, and < 1e8 "heavy" operations (umap, sqrt, modulo, division) and so on.

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

i think it's 4e8 (4 * 100000000).

»
19 месяцев назад, # |
Rev. 2   Проголосовать: нравится +25 Проголосовать: не нравится

~5 operations/sec

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

The only trustible way to see how many loops your code can run in one second is to simply stress test it. (i.e. generate random data incrementally and test them against your code to see how much it can run)

If you mean how many "instructions" though, you can just do $$$\text{IPC} \cdot \text{(Clock Speed)}$$$

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

the machines of codeforces can run about 3e9 times per second, i tried 5e9 and it didn't TLE, but the machines of other online judges usually runs 5e7-5e8 per second