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

Автор 123gjweq2, 5 часов назад, По-английски

I thought of this problem today, and since I don't really have much problem-creating experience, I would like to hear the opinions of experienced problem creators on whether or not it would be a good div. 2 A. Feel free to try it if you would like. I have added the solution.

Problem:

One day, $$$n$$$ people are made aware of the website codeforces.com. Let's call this day day $$$0$$$. The day after day $$$0$$$ is called day $$$1$$$, the day after that is day $$$2$$$, and so on. If you randomly select $$$1$$$ of these $$$n$$$ people, what is the expected value of the absolute difference between the day they were made aware of codeforces and the day they created a codeforces account? If the expected value is too big to fit inside a 32-bit integer, output $$$-1$$$.

Input:

The first line of each test, $$$t$$$, is the number of testcases $$$(0 \le t \le 10^3)$$$. Each testcase consists of a single integer, $$$n$$$ $$$(1 \le n \le 10^6)$$$.

Output:

For each testcase, print the expected value. It can be shown that if the expected value is less than the largest 32-bit integer, the expected value is an integer itself.

solution
code (python)
  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

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

I am a newbie, but this problem is more like an April's Fools day contest problem.

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

ermmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

»
4 часа назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

This is pretty atrocious.

For one, your assumption is not justified from the problem statement. Why should people not making an account even be considered positive infinite difference?

Furthermore, all div 2A requires some computation. This problem can be solved without even reading the input (aside from T). You don't even need line two in your solution...

Also, by convention, almost all problems generally have sample cases with explanation. This would give away this problem instantly.

(EDIT: This is probably a joke, sorry for over-reacting lol)

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

Truly an iq problem.

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

beautiful problem! like a Div 2 F