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

Автор EJIC_B_KEDAX, история, 3 года назад, По-русски

Привет, Codeforces!

Во 20.06.2023 17:35 (Московское время) начнётся Codeforces Round 881 (Div. 3).

В этом раунде будет 7 задач, которые подобраны по сложности так, чтобы составить интересное соревнование для участников с рейтингами до 1600. Однако все желающие, чей рейтинг 1600 и выше могут зарегистрироваться на раунд вне конкурса.

Раунд пройдет по правилам образовательных раундов. Таким образом, во время раунда задачи будут тестироваться на предварительных тестах, а после раунда будет 12-ти часовая фаза открытых взломов. Мы постарались сделать приличные тесты — так же как и вы, мы будем расстроены, если у многих будут падать решения после окончания контеста.

Вам будет предложено 7 задач и 2 часа и 15 минут на их решение.

Штраф за неверную попытку в этом раунде будет равняться 10 минутам.

Напоминаем, что в таблицу официальных результатов попадут только достоверные участники третьего дивизиона. Как написано по ссылке — это вынужденная мера для борьбы с неспортивным поведением. Для квалификации в качестве достоверного участника третьего дивизиона надо:

  • принять участие не менее чем в пяти рейтинговых раундах (и решить в каждом из них хотя бы одну задачу)

  • не иметь в рейтинге точку 1900 или выше.

Независимо от того являетесь вы достоверными участниками третьего дивизиона или нет, если ваш рейтинг менее 1600, то раунд для вас будет рейтинговым.

Задачи были придуманы и написаны: zwezdinv, EJIC_B_KEDAX, molney, Sokol080808, meowcneil, Vladosiya.

Также большое спасибо:

  1. Vladosiya за координацию нашей работы.

  2. MikeMirzayanov за системы Polygon и Codeforces и тестирование раунда.

  3. tute7627 за красно-чёрное тестирование раунда.

  4. ace5, sevlll777, oursaco, lightseba, gmusya, pavlekn, vrintle, tolbi за жёлтое тестирование раунда.

  5. diskoteka, moonpieXXIV, JuicyGrape, shell_wataru, MGod, Phantom_Performer, tarattata1, alex.kudryashov, Restricted, abs0lute за фиолетовое тестирование раунда.

  6. Alex239, MrEssiorx, olyazyryanova, marzipan, Pa_sha, Rudro25, sadness, IHateGeometry, ivan.alexeev, krigare за синее тестирование раунда.

  7. Guevara74, ctraxxd за бирюзовое тестирование раунда.

  8. sahal, dope, viteli, prohamer80 за зелёное тестирование раунда.

Всем удачи!

UPD: Разбор.

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

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

As an author, I recommend you to participate in it.

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

wow !! Vladosiya is back :)

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

Hope so it would not be like the CF round 880

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

Wish this contest is not bad like Round 880.

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

As a tester, this round is bombastic.

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

As a tester,

I tasted some apples I tested some cool problems.

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

first unrate div3,GL&&HF for everyone:)

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

and one more thing,how can i become a tester

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

As a Tester,

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

As a tester, you must participate! Problems are interesting!

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

Waiting for this round. Best of luck everyone

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

As a participant, I hope to become yellow one day.

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

Div 2?????!

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

As a tester, blablabla...

ahmet23 orz!..

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

I think there is a mistake in the typo, it should be Codeforces, not Codefoces, missing a "r" letter

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

As a friend of the tester, I don't know good this round, or not

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

As a tester, I recommend you to take the contest :)

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

Wish this isn't bad as 880 ;-;

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

As a blue tester, I may say that I am a blue tester.

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

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

hope the problems are well balanced

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

I hope can solve four or five problems

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

hope to get CM today! :D

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

As a non-tester I will test this round during contest.

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

I'll test this round at 20:05 :-)

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

Grey Tester missing !!

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

omg a div 3, I'm so glad!

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

As a participant, I hope to become blue one day.

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

Can I become expert today?

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

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

It's a good one, nothing like 880 :)

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

contest of trees

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

E and F are really good problems.

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

Long Long anyone ?

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

Почему неправильный ответ 2 в задаче F1 считается как неверная посылка и влияет на штраф, если второй тест — семпл?

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

Can someone tell me why my solution for D gave wrong answer for testcase 4

`

def solve(num, graph, diction): if len(graph[num])==0: diction[num]= 1 return 1 if num in diction: return diction[num] ans=0 for item in graph[num]: ans+= solve(item, graph, diction)

diction[num]= ans
return ans

for _ in range(int(input())):

n= int(input())
# a, b, c, k= map(int, input().split())
# arr= list(map(int, input().split()))
# arr2= list(map(int, input().split()))
# a, b, c, k= arr[0], arr[1], arr[2], arr[3]
graph = [[] for i in range(n+1)]

for i in range(n-1):
    a, b = map(int, input().split())
    graph[min(a, b)].append(max(a, b))
    # graph[b].append(a)

diction = {}
# ans= solve(1, graph, diction)
# print(graph, diction)
q= int(input())
for i in range(q):
    a, b = map(int, input().split())
    ansa= solve(a, graph, diction)
    ansb= solve(b, graph, diction)
    print(ansa*ansb)
# print(diction)

`

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

Finally a nice and easy contest after a string of hard ones

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

Although E is binary search, technically an easy sqrt solution exists in n^1.5 by processing queries n^0.5 at a time.

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

How would F2 be solved? Initially I thought it was continuing the idea of max/min subarray sum but on arbitrary paths, and that we could use binary lifting to find the LCA, then to find max subarray sum on path from u to v, take best of the three cases: u to LCA, v to LCA and some path that crosses the LCA. But didn't find a good way of doing it. Am I on the right track or is it something completely different?

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

As a participant, I enjoyed this contest a lot, especially the F2 problem! :D

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

    please explain your solution for problem F.

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

      F2 (and F1):

      First of all, we pre-build the tree and answer all the "?" queries later.

      Let's note that, if we know the min and max values between all the subsegments on the path, then all other in-between values are reachable. For example, if there are subsegments with cost -5 and 7, then there always is at least one subsegment with cost 3. Why? Because when we add a new node to the path, the cost always changes by 1, there are no jumps. We can't get from 0 to 3 without going through 1 and 2 first, for instance.

      All we need to do is to calculate these min and max values quickly, and then it's a simple check that minn <= k <= maxx.

      Now, when faced with a "?" query, let's find the LCA (Least Common Ancestor) of u and v. Where can the min be? Well, it can just be somewhere on the first path (u -> LCA), or on the right one (LCA -> v). But perhaps it touches both, meaning it's the best suffix of (u -> LCA) + x[LCA] + the best prefix of (LCA -> v) (OR the suffix of (v -> LCA), since it's the same thing, just reversed).

      All we need to find these values is some binary lifting. For each up[v][power], you'll need to precalc the total sum on the segment, the best subsegment sum, best prefix and suffix sum.

      I hope this makes sense. :')

  • »
    »
    3 года назад, скрыть # ^ |
     
    Проголосовать: нравится -36 Проголосовать: не нравится

    Really? F2 is just 2 standard well known techniques mashuped together. What part was nice?

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

Can anyone tell me why memory limit exceeded on this submission https://mirror.codeforces.com/contest/1843/submission/210459020

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

Can you solve D by only using BFS? or would get TLE and have to use DFS?

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

Can F2 be solved with persistent segment tree?

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

As far as I know , all of the sample tests don't cost any penalties when getting WA or RE and so forth , but why problem F has cost me a penalty when I got WA in test 2 although it's included in the sample test . IS it a problem with the system testing or anything else ? thanks in advance.

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

Tasks E and F1 are very interesting, and the condition is very incomprehensibly written in task D. It also seems to me that there is too big a gap between D and E. It was too difficult to guess the key idea in E for its place in div3.

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

Nice contest, problems were from various topics, and their difficulty and overall time to solve were adequate

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

I read A statement wrong. Then, 10 minutes later I read it wrong again. 40 more minutes later, I read it wrong yet again. Finally, 80 minutes after the beginning of the contest, I read it right.

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

in d i took the count of leaf nodes reachable from u and v . their product should have been the answer but what is wrong with this one which failed on test case 4

https://mirror.codeforces.com/contest/1843/submission/210448804

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

treeforces

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

I loved question F1!

Don't know if it was intended, but running Kadane's algo on a tree was very satisfying.

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

Any ideas on E , I was really stuck there for a long time but couldn't think anything

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

AH YES!!! THE OG div3 contest for newbie/beginner coders who are well versed with 'trees' right??? disappointed.

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

E: We let t[x]=inf initially, and if we a[x]=1 on the i-th query, we let t[x]=i. Then if the segment [L, R] become beautiful at the i-th query, i will be contained in t[L, R], and there will be at least floor((R-L+1)/2) elements smaller than i. so after we sort t[L, R] increasingly, the (1+floor((R-L+1)/2))-th element will be i. So we can solve the problem by range query for k-th minimum element on t[1, n]. We can answer the queries by Mo's algorithm, in which we need to maintain a subset of [1, q]. Using sqrt decomposition we can add/remove an element in O(1) and query k-th minimum in O(sqrt(q)), so we can solve the problem in O(n*sqrt(m)+m*sqrt(q)).

F1: Assume the minimum sum of weight over all subsegments of path (u, v) is m, and the maximum sum is M. Then if sum(L1, R1)=m, sum(L2, R2)=M, when we change the subsegment (L, R) from (L1, R1) to (L2, R2) by extending or reducing the length by 1 each time, the sum of weight will be increased by -1 or +1 each time, so the sum of weight can be any integer between m and M. Therefore, we only need to find m and M for path (u, v). When u=1, we only need to check for path (1, v). Let p be the parent of p, define M(v)=the maximum sum of weight over all subsegments of path (1, v), suf(v)=the maximum sum of weight over all suffixs of path (1, v), we have suf(v)=weight(v)+max(0, suf(u)), M(v)=max(M(p), suf(v)). Similarly we can calculate the minimum sum m(v).

F2: When u can be any nodes on the tree, we need to look for what if we concatenate 2 paths. Let M=the maximum sum of weight over all subsegments, suf=the maximum sum of weight over all suffixs, pre=the maximum sum of weight over all prefixs, sum=the sum of weight over all nodes on the path. Then if we denote (L, R) be the concatenation of path L and R, we have:

(L, R).sum=L.sum+R.sum

(L, R).M=max(L.M, R.M, L.suf+R.pre)

(L, R).pre=max(L.pre, L.sum+R.pre)

(L, R).suf=max(R.suf, R.sum+L.suf)

So we can merge information of any 2 paths. Therefore, we can solve the problem by binary lifting: Let infos[r][u] be the information of the path from u to the (2^r-1)-th ancestor of u, and parent[r][u] be the (2^r)-th ancestor of u, we can find LCA(u, v) and merge path from u to LCA(u, v) and the reverse of the path from v to the child of LCA(u, v).

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

    In F2, what if u and v are in the same subtree?

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

    kth minimum can be solved by wavelet tree instead of Mo's, the complexity is O(m * logq)

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

    Here is a very elegant solution for E that I used:

    Maintain a fenwick tree of values. It need not be persistent, we will take care of that later. Of course we will binary search on queries (because of course, monotonicity). Let us define these three functions.

    • $$$go(i,j)$$$ : apply queries in the range $$$(i,j]$$$.
    • $$$rollback(i,j)$$$ : cancel queries in the range $$$(i,j]$$$.
    • $$$check()$$$ : on the current state, check if the array is beautiful.

    Trivially, $$$check()$$$ can be implemented in $$$O(M \log N)$$$. Also, $$$go(i,j)$$$ and $$$rollback(i,j)$$$ can be implemented in $$$O((j-i)\log N)$$$ similarly. Maybe with a PST it will be faster. but without it, we don't seem to find a better time complexity for these three functions. But this time complexity seems to be enough. Why?

    Let us look at the time complexity deeply. There will clearly be $$$O(\log Q)$$$ calls to $$$check()$$$. So that part is $$$O(M \log N \log Q)$$$. Now the issue is whether the other two functions will be fine. Look further. What will we find? Write down the recurrence formula. You will find this — $$$T(Q)=T(Q/2)+O(Q \log N)$$$.

    This recurrence seems very familiar, doesn't it? We can easily see that this recurrence is equivalent to $$$O(Q \log N)$$$. Now, everything seems so trivial.

    Time complexity at last — $$$O(N+Q \log N + M \log N \log Q)$$$.

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

For D I was using DFS in python and it was having RTE on test 7, so I googled for decision and found the way to use threading, but for unknown reason now my code does not print anything help me please https://mirror.codeforces.com/contest/1843/submission/210454284

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

    i used BFS and got RTE on test 7 too, i feel like it's probably a key error or something but i can't find it

    https://mirror.codeforces.com/contest/1843/submission/210442051

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

    Because on each iteration on DFS you pass the graph to the function. It will be like 10^10 memory which gives MLE

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

    The MLE is because pypy handles function calls differently, which means it handles setrecursion depth differently: so not only will pypy happily allocate enough RAM for the call depth you requested, the amount per level of depth might be surprisingly heavy.

    tl;dr setrecursiondepth on pypy gets you your MLE result before hitting any of your other bugs

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

      https://mirror.codeforces.com/contest/1843/submission/210468007 i stopped passing the graph to function and i use python 3 instead of pypy how can I conquer the runtime error?

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

        interpolation's comment above is an incorrect extrapolation of low-level concepts like pass-by-value vs. pass-by-reference... python's already skating on top of its own system of internal objects, so VERY LOOSELY SPEAKING, since you're already interacting via levels of indirection, everything you're passing in python code is already a reference (except when it's not, but for a mutable object/collection, this story fits here better than the low-level fear of a massive copy).

        If you only used setrecursionlevel to undo python's safety limit, you're probably running out of stack space (stack overflow, undefined behavior, etc.). In cpython, you can essentially set the limit to whatever you want (since there's no matching pre-allocation like in pypy), but that doesn't change how much stack space there is. That's why the bits with threading and setting a custom (large, multiple of target system page size) stack size happen. Other languages also need to do this too, just that it's conveniently handled in cpp compiler parameters and commonly pre-applied due to its popularity in competitive programming (and a source of angst for other contests where people go back to running code on their own systems).

        Personally, my habit is to simulate bfs/dfs iteratively rather than confronting python's recursion warts or dropping into lower-level (ie closer-to-hardware/system, less abstracted-away) concepts (otherwise might as well go back to cpp).

        You can also look up 'bootstrap recursion' but like the thread-parameters backflips, test it out before trying to use it in contest... I'd at least rank bootstrap above the thread-parameters idea as you can keep pypy's faster-worst-case speed.

        But before any of that, you should probably internalize python-y ideas of mutable/immutable so you feel more comfortable predicting behavior of things like a name passed as a function parameter. Try to avoid slapping 'global' onto things in reaction to errors without understanding the underlying causes etc... happy hunting!

        edit:

        A follow-up...! The biggest weakness of the thread-parameter approach is finding the right value for the thread's stack size. See 210486427 and how it consumes 450,528 KB by requesting 268,431,360 for its thread's stack. Weirdly, that seems to be a maximum on codeforces. I tried a smaller value ~160mb and reproduced the test 7 stack overflow. Maybe there are values in between that'll work, but it's not something I'd mess with mid-contest.

        Other approaches mentioned (sorry for sloppiness, was poking at this whenever I got a moment this afternoon):

        bootstrap recursion: note the use of yield 210485286

        iterative simulation: 210483619

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

Feels more like atcoder ABC__

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

could some figure out what did i do wrong in f1

this is my submission : 210459296

for every x(1<=x<=n), i have stored the maximum continues ones and minus ones from 1 to x.

then while querying i just checked

if k==0 ans is always true

else ans is true if maximum length of ones or minus ones >= absolute(k)

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

any approach for E please explain??

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

Good round! The statements are very clear and I love it!

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

Tree forces !

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

I loved the round! I hope you all get your delta increases!

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

I don't understand why I got a TLE on F1. Here is my submission https://mirror.codeforces.com/contest/1843/submission/210465690

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

E can be solved using parallel binary search

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

Can someone help me understand why I am getting TLE https://mirror.codeforces.com/contest/1843/submission/210409586?

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

I have a question about problem D. It can be easily solved using recursive DFS, and (at least almost) participants used this solution. But how could you know in advance that it would be satisfactory? I mean, that we know that n <= 2*10^5. And the tree could be very long and thin. In this case a recursive solution would cause stack overflow. So whether almost anyone did a leap of faith that trees would not be so thin?

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

Div 3 A to D did not test binary search and since its a div3 binary search is usually tested => neuron activation => immediately starts coding binary search solution for E

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

    I also had the same thought initially, then I reverted, and then came back and solved it. The binary search was subtle. If you have not implemented a similar algorithm before, it is definitely tough to inspire. The idea is to check a prefix, and from there it takes linear time to check. Initially, I thought it would take NM time to check. Good to see you got the insight instantly!

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

Can anyone tell me what is wrong in my python solution for problem D here? It gives Runtime error on 7th testcase. 210431759

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

first time solve div3 E lol, i was hard stuck at D cuz i have no experience with graph before. Great ground <3

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

Great round! First time solving E feels great, sadly i got 5 WA's in D.

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

Is there any penalty for nonsuccesful hack on a div 3?

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

I just miscalculated subtree in problem D and getting negative delta.Life goes on!!

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

In problem D,I miscalculated subtree nodes of leaf. Life goes on!!

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

Nice contest! I like problem F

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

F2 is 2 hard for div3 :(

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

Not a lot of people mentioning problem C. Albeit simple, very nice question. The observation that broke the problem was that the node u has children 2u and 2u+1 (obvious if you are grounded with binary trees).

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

F2: Commutative law, I miss you...

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

That's a good contest and I got + rating. Thank you to EJIC_B_KEDAX and his friends.

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

how to find out the turtorial of these exercise

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

This is the best 3rd division of those that I have solved!

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

https://mirror.codeforces.com/contest/1843/submission/210504578

Please see the above solution for problem D and tell me where i am going wrong :( spent so many hours to figure it out. but couldn't able to resolve it :(

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

My solution to problem A is still in queue and when I submitted it was shown accepted and now its showing in queue.

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

My two questions are still in queue...why is it so?

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

why my rating has not been improved even after solving three questions?

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

It was last rated div3 for me :)

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

Why hasn't the tutorial out? Crying ಥ_ಥ

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

Why did my rating fell from 852 -> 796??? It shows accepted. I am really unable to understand this platform.

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

The name of the problem B may indicate that you should use long long.

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

EJIC_B_KEDAX I'm surprised this passed pretests :/ :/ went from 200 to 1522 :/ https://mirror.codeforces.com/contest/1843/submission/210366483

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

Я писал двумя аккаунтами поэтому у меня одиннаковый код

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

Hi, I got a notification of plagiarism in the last contest of Codeforces Round 881 div3. I have gone through both the submissions and both the codes seem to be different to me. It must be a coincidence that plagiarism was detected because if a question has a particular type of approach there is a good enough probability that it might match someone in a pool of about 30k participants, I think that same thing happened here. This was a normal dfs + dynamic programming question and I think the other person has done the question in the same way. There is no way I have cheated here. Please review it once.