quanpham0805's blog

By quanpham0805, history, 5 years ago, In English

In GCJ problems this year, the time limits are stated 20 seconds per test set. I don't know how many calculations could GCJ do in 1 second?

Tags gjc
  • Vote: I like it
  • +47
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +14 Vote: I do not like it

I think, you can expect ~$$$10^8-10^9$$$ operations per second, depending of operations type.

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I think it should be ~10^8 for each test case, otherwise I could do something like 20*10^8 -> 20*10^9 = 2*10^9 -> 2*10^10 per test case, which is a little bit too much.

»
5 years ago, # |
Rev. 2   Vote: I like it +16 Vote: I do not like it

It depends what language you are using. Assuming you use fastIO, the max bigO runtime per testcase you can have per language is approximately:

C++: 3*10^8, Java: 10^8, Python: 152

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    And idea about What will be the estimated operations if we're using costly operations like / and %?

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it -14 Vote: I do not like it

      I have no idea for the /, but it should be equal to +, -, *.

      For the %, for example, a % b, I think it is implemented like a - (a / b * b) (assume that a and b are integer), so it might be 3 times slower, but I'm not sure about this neither.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    Is that a typo for Python? It doesn't seem right that it should be 5-6 orders of magnitude slower than Java.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm using C++ for all submissions with normal cin and cout, so it should be a little bit less I think (maybe around 10^8/test case, I usually assume this number of operations)

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

For a second I thought that we were making fun of the slow servers this year. (Looking at you, shameful KS round 1A)