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

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

We will hold AtCoder Beginner Contest 404.

We are looking forward to your participation!

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

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Anyone knows why kenkoooo hasn't been updating the problem difficulty for nearly 2 months (since ABC397/ARC195/AGC071)?

The problems of ABC402/ABC403/AGC072 is also not shown in the chart.(Though I can see my submissions on those problems in /user-submissions.)

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

AtCoder Beginner Contest not found?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

China is on the Labour holiday =D

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

404 not found

»
12 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

If we change Page Not Found to Beginner Contest:

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Another AI Beat Contest.

»
12 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Why AC*48 WA*6 here?

Sad, I lost my AK because of corner cases.

»
12 месяцев назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

atcoder_official, ban angrymoon999 please.

The submission behavior of this account is abnormal, and I do not believe that this is code that a normal person can write simultaneously.

For D: 1 2 3

For E: 1 2 3

For G: 1 2

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In C , isn't checking for the frequency of all nodes as 2 will do ? I got 4 WA for it

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In Problem F, the solution which uses brute force to enumerate every strategy can get Accepted. In theory, the Time Complexity is

$$$ \Theta\left(T \cdot K \cdot C^{\sqrt m}\right), \quad C = \exp \left( \pi \cdot \sqrt{\dfrac 23} \right) \approx 13. $$$

Is the solution expected?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Any hint for E?

»
12 месяцев назад, скрыть # |
Rev. 4  
Проголосовать: нравится +8 Проголосовать: не нравится

ban lkfush please. this is an alt account and i can confirm he use ai in the contest 1 2

ban SB_JAPEN, this username is not legal and he must use ai cause he solve ABCDEF veryvery fast

ban timebomb please. he must use ai too

mywwzh is the bigest cheater in China, ban him too please

»
12 месяцев назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

I'm trying to figure out why is E allows for $$$O(n^2)$$$, because I claim that this algorithm should pass in O(n) and is straightforward:

Spoiler

Can someone please help me find a test case that should break this? Thinking about multiple possible test case ideas but they all get $$$O(n)$$$ amortized.

(P.S I'm aware of the $$$O(n$$$ $$$log$$$ $$$n)$$$ solution, but I'm trying to figure out why the range min queries are not $$$O(n)$$$ amortized considering the fact that all queries are special since they are all of the form $$$[i-C[i], i-1]$$$ which is not the same as in a segtree problem, which can solve for any general range.)

  • »
    »
    12 месяцев назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +3 Проголосовать: не нравится

    I'm not sure I follow, how do you do the instructions of the third paragraph without visiting all the bowls accessible ? Because if you need to visit for each bowl, every bowl between its range, then your complexity should be O(n²)

    • »
      »
      »
      12 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      I think a solution of time complexity O(nlogn) is possible.

    • »
      »
      »
      12 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Here's the thing, you do! However, there's a very key observation to be made.

      Spoiler
  • »
    »
    12 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится
    your approach
    Spoiler
    • »
      »
      »
      12 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Just managed to prove that surprisingly in this case, despite the worst case being $$$O(n)$$$ for each bowl you can get it down to $$$O(n)$$$ amortized if you're clever with how you manage part of the approach you mentioned as supposedly having worse case $$$O(n^2)$$$! (The challenge however, remains in proving that not implementing this allows for $$$O(n^2)$$$ worst case)

      While segment tree is useful to guarantee $$$O(n log n)$$$, because your queries are more specialized (specifically, the start/end points of your queries are known beforehand and the queries chosen are those based on the moves you make, which you have some information you can learn about while doing the algorithm, i.e. "those elements cannot be options you can pick on any future queries"), you can actually avoid the requirement to maintain a segtree which allows for $$$O(n)$$$.

  • »
    »
    12 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Maybe due to $$$\sum_i c_i$$$ is $$$O(n^2)$$$

  • »
    »
    12 месяцев назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    DP was more straightforward , there could be $$$O(NlogN)$$$ optimisation but that wasn't needed to be forced,

  • »
    »
    12 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Figured out that this algorithm would be $$$O(n)$$$ if we're clever with our checking. The question remains of whether or not a direct bruteforce without this optimization is $$$O(n^2)$$$ or also $$$O(n)$$$ by using amortized analysis.

    Completing the Algorithm/ Proof of O(n)
  • »
    »
    10 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Does the logic in your spoiler work? I've tried to implement it but it fails 13 of the 80 testcases. If you got it to pass, please share your implementation. Thank you!

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I performed pretty badly today, sucks to be stuck in E after 1 WA...

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

why does my greedy bitmask not work? Link. I believe that if there is a smaller mask, then we don't we need to worry about it in the super masks

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone give me some advice on how to perform well in a contest? I can't think logically and just want to implement the code at a fast speed so that I often can't get it right.

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is G a known / standard problem as it seems very difficult to be solved by so many people ?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Will there be any English editorial, or just Japanese one?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think this problem, abc266 E — Throwing the Die, is very similar to today's F.

Somehow I find that atcoder team really likes this kind of problem, which has the following dp pattern. Let dp[x][y] denote that we still have x steps to go, and currently we have obtained y scores, and the value of dp[x][y] denotes the probability. We can find the transition by considering what scheme we select to do in the next step, and thus dp[x][y] usually depends on some dp[x-1][y+z].

»
12 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone pinpoint the problem in my code?

https://atcoder.jp/contests/abc404/submissions/65494321

Gotcha!! Done

https://atcoder.jp/contests/abc404/submissions/65494576

if you are already here. Do let me know if i can optimize it.

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

is Problem E a standar problem?? I am having a hard time understanding problem E.. can someone please help??

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone please explain, why are we picking a zoo atmost two times only in Problem D??

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why was my friend Vegwu_ banned?

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hello everyone,

I've been working on Problem D from ABC404 and devised a strategy where I compute the minimum cost to visit each animal at least once and then double that cost, under the assumption that this would ensure each animal is visited at least twice. However, I've noticed that this approach doesn't always yield the optimal solution.

I've spent several hours trying to identify a counterexample but haven't been successful. I would appreciate it if someone could explain why this method might not always produce the optimal result.

Here's my submission for reference: https://atcoder.jp/contests/abc404/submissions/65602415

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

English isn't my native language,please pardon if some typing or gammer error.

An easier and faster($$$O(n)$$$) solution for E:

Well,if we can move one bean from bowl $$$i$$$ to bowl $$$j$$$,we can also move it to all bowl $$$j\le k\le i$$$.

Let $$$j$$$ the first bowl in which there is a bean at first.

If we can move one bean from bowl $$$i$$$ to $$$0$$$,we can also move it to $$$j$$$.In fact,it isn't a bad idea:although we can move it to bowl $$$0$$$,we need one more operation to move the bean in bowl $$$j$$$ to $$$0$$$,so moving it to $$$0$$$ directly cannot decrease the number of operations we need.

So,one of the best solution is:move all the beans to the bowl $$$j$$$ then move them to $$$0$$$ together.

How to move them to $$$j$$$?This is actually the problem we solved just now.

So we only need to know how many operations we need to move some beans from one bowl to the next bowl in which there is a bean at first.

Just use memorizable DFS to solve it in $$$O(n)$$$ time.

More informations in Submisson.