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

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

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)
  • Проголосовать: нравится
  • -31
  • Проголосовать: не нравится

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

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

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

ermmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

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

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)

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

Truly an iq problem.

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

beautiful problem! like a Div 2 F

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

This could be a good troll problem (I think it's slightly troll, but a bit less troll than the recent 1234 1234 1234 problem D). However, the fact that you just posted it on your blog means it will never be a codeforces problem.

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

there is a nonzero chance they will never create an account therefore the expected value is zero ??
I don't think that's correct