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

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

I submitted the same code twice in codeforces round 908(div.1).problem A.

I submitted for the first time in m1.codeforces.com, but it didn't show in submission page ,so I submitted for the second time.

For a few minutes,the two submission's came out together in my submission page,that gives me -50pts of pernalty.

Could the second submission be removed?

MikeMirzayanov

Полный текст и комментарии »

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

Автор MagicSpark, история, 4 года назад, По-английски

We can see that on the home page of atcoder there will be two contests in December.

They're agc050 and agc051(Both are Good Bye rng_58)

So could anyone tell me what happened to rng_58?

Полный текст и комментарии »

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

Автор MagicSpark, 4 года назад, По-английски

I find that I can enable coach mode(there isn't a button when I open gyms)

So what's the condition of opening a coach mode?

Полный текст и комментарии »

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

Автор MagicSpark, история, 4 года назад, По-английски

In Grakn Forces 2020,I ranked 75 and get a T-shirt according to KAN's comment(https://codeforces.ml/blog/entry/82787?#comment-705409).

This is the first time that I get a T-shirt,but can somebody tell me how to get it?

UPD: 14 months passed,where is it?

Полный текст и комментарии »

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

Автор MagicSpark, история, 5 лет назад, По-английски

When I'm taking part in Educational Codeforces Round 87,I come up with a random solution.

But I didn't think it can pass.(In fact I'm wrong and the solution has more than 99.99% possibility to pass)

And I think for a long time to find a non-random solution without getting good ideas

Can somebody solve this problem?

Полный текст и комментарии »

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

Автор MagicSpark, история, 5 лет назад, По-английски

When I am solving 1197D,I didn't see m<=10 and then I find a solution that can solve m<=n<=3e5

Here is my solution:

The range [l,r] is equal to [l,l+m-1],[l+m,l+2m-1]....[l+xm,r]

then we will enumeration the value of l+xm.

We consider every reminder(from 0 to m-1) of position module m and solve them independently.

When we are solving each of the reminders,we have v[i]-->the value of the ith range(from the ith position fits the reminder to the next),then we will consider the value of two parts

First:[l,l+m-1],[l+m,l+2m-1].....[l+(x-1)m,l+xm-1]

Second:[l+xm,r]

We can use segment tree to get the max prefix sum of [l+mx,l+(m+1)x-1],then it's the second part.

When we are solveing the first part,we need to find the min value of the prefix sum of v[i].

This can also be done using segment tree.

Then the answer for each l+xm is First+Second-k.

Here is my submission https://codeforces.net/contest/1197/submission/57841454

The final answer is the maximum of them.

Overall complexy O(n log n) with big constants

I wanna know if there are better solutions.

If you have,please share under this blog.

Полный текст и комментарии »

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

Автор MagicSpark, история, 6 лет назад, По-английски

I tried to solve 1153F. I got up with an unusual idea.Then this is my code.I clone the 1153F to a mashup.And I accepted with maximum time 1825 ms.But the time limit is only 1 second. Can some one help me to optimize the code? (Because it is not so slow,I think I don't need to change the algorithm,And I only get this way to solve the problem) [submission:53500731] in the mashup and 53500951 in the contest.

Полный текст и комментарии »

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

Автор MagicSpark, история, 6 лет назад, По-английски

When will the of educational round 60 be published?Usually there is only a few hours after the contest the tutorial will be published.But now, almost two days past,where is the tutorial? (Sorry for my pool English and poor rating.) Oh sorry it published.

Полный текст и комментарии »

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