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

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

We will hold AtCoder Beginner Contest 338.

We are looking forward to your participation!

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

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

Hope to make ABCDE!

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

ACed ABCF,but No DEG(

»
2 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится
Me after every ABC
»
2 года назад, скрыть # |
Rev. 9  
Проголосовать: нравится -12 Проголосовать: не нравится

Hello everyone!I the round gone well.I hope that you all will get positive delta from this contest. Can someone explain me what is wrong in my code for E problem?

https://atcoder.jp/contests/abc338/submissions/49737722

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

$$$D \gt \gt \gt \gt \gt E$$$

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

Did anyone manage to cheese $$$2^n \cdot n^3$$$ on F? I got to (32xAC,2xTLE) before realizing the $$$2^n \cdot n^2$$$ optimization and getting AC.

Also E has appeared in a previous ABC/ARC. I can't seem to find the link but the problem involved points on the sides of a square (instead of a circle) and drawing arbitrary curved lines between them (instead of chords) but the solution is identical. Granted, its an educational contest, so it probably doesn't matter too much.

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

What is the difficulity score of Problem D E F based on codeforces rating system?

»
2 года назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится
A
B
C
D
E
F
G
  • »
    »
    2 года назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +3 Проголосовать: не нравится

    You don't need an RMQ data structure for E.

    I'm assuming $$$A_i \lt B_i$$$ in the following notation for simplicity. You can just swap them if they aren't, it still represents the same chord.

    Keep a stack and process the chord endpoints in order from $$$1$$$ to $$$2n$$$. When you reach $$$A_i$$$, push $$$i$$$ onto the stack. Then when you reach $$$B_i$$$, check if $$$i$$$ is on top of the stack.

    If some other value (say $$$j$$$) is on top of the stack it represents a pair of chords with $$$A_i \lt A_j \lt B_i \lt B_j$$$, i.e, chords $$$i$$$ and $$$j$$$ intersect, so it isn't possible. Otherwise no chord intersects $$$i$$$, so we just pop it from the stack and continue.

    Submission

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

Can someone tell why my binary search code doesn't work for C

My Code
»
2 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится
»
2 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

My solution to problem F is a little bit different from the one in the editorial.

I also use dp[st][i] to denote the minimum weight under the condition that we have visited all the nodes in the bitmask of st, and we are now at the i-th node. Then, we use function numof1(st) to denote the number of 1s in st, and my algorithm works as follows.

Initially, we have dp[st][i]=0, where numof1(st)=1.

Then, suppose that we have got all the values of dp[st][i], where numof1(st)=1,2,...,k-1, and we are going to find dp[st][i], where numof1(st)=k, by using dp[st'][j], where numof1(st')=k-1. For dp[st'][j], we can go to any dp[st][i], if and only if, st=st' | (1<<i), and there is an edge from node-j to node-i.

Next, for any dp[st][i], we find all the nodes involved in st, and update dp[st][i] again, by using Dij algorithm.

Finally, the answer is the minimum one of dp[(1<<n)-1][i].

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

Hi,everybody,I found a problem in E Here is the Sample Input 3 114 514 512 113 115 513

But Atcoder's Output is No and somebody's AC code'output is No But somebody's AC code'output is Yes and I try drawing a picture,I found that there is an intersection between the chords, Can you help me?