123gjweq2's blog

By 123gjweq2, 4 months ago, In English

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)
  • Vote: I like it
  • -31
  • Vote: I do not like it

»
4 months ago, # |
  Vote: I like it +48 Vote: I do not like it

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

»
4 months ago, # |
  Vote: I like it +9 Vote: I do not like it

ermmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

»
4 months ago, # |
Rev. 2   Vote: I like it +10 Vote: I do not like it

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 months ago, # |
  Vote: I like it +21 Vote: I do not like it

Truly an iq problem.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

beautiful problem! like a Div 2 F

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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.

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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