Автор awoo, история, 8 лет назад, По-русски

Привет, Codeforces!

В 20.09.2018 17:45 (Московское время) состоится Educational Codeforces Round 51 (рейтинговый для Див. 2).

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ACM ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Роман Roms Глазов и Иван BledDest Андросов.

Удачи в раунде! Успешных решений!

А вот сообщение от наших друзей из Harbour.Space:

Harbour.Space University is proud to announce new partnerships for this year’s Hello Barcelona Programming Bootcamp — VTB and Indeed Tokyo, with the addition of team sponsors Phaze Ventures and Spark Labs.

VTB, the largest international bank based in Eastern Europe, continues to be an official partner of our Hello Programming Bootcamp series, adding further quality to the 3rd edition of the Hello Barcelona Programming Bootcamp by bringing their own participants, as well as by supporting top teams from around the world.

Indeed Tokyo is Japan’s branch of the #1 employment website in the world, giving job seekers free access to millions of jobs from thousands of company websites and job boards. As they sponsor for the second year in a row, Indeed continues to offer the best job opportunities to the boot camp participants as they gather in Barcelona from September 26 to October 4, 2018.

UPD: Тесты и валидатор по задаче F содержали ошибку, в данный момент работаем над ее исправлением. Правильные ограничения были указаны в условии. В ближайшее время проведем перетестирование всех решений. Возможно раунд окажется нерейтинговым, это пока обсуждается.

Поздравляем победителей:

Место Участник Задач решено Штраф
1 kmjp 6 210
2 MrDindows 6 223
3 elykuil 6 242
4 Fekete 6 274
5 Nisiyama_Suzune 6 274

Поздравляем лучших взломщиков:

Место Участник Число взломов
1 halyavin 299:-14
2 Laggy 100:-10
3 greencis 29:-2
4 Volkov_Ivan 19
5 dorijanlendvaj 13
Было сделано 694 успешных и 497 неудачных взломов.

И, наконец, поздравляем людей, отправивших первое полное решение по задаче:

Задача Участник Штраф
A traxex 0:03
B answhldkd 0:02
C ainta 0:06
D greencis 0:07
E tfg 0:38
F baggins 0:26
G yasugongshang 0:56

UPD2: Мы провели расследование и получили следующие результаты. Заметным образом (более 3-х минут рабочего времени) эта ситуация задела 10 участников. Для всех остальных раунд точно будет рейтинговым. Для этих участников мы посмотрим на изменение рейтинга и, если оно отрицательное, то переведем их в неофициальное участие.

UPD3: Разбор опубликован

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

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

Wish you all +100 rating!!!

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

Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

thanks codeforces for three contest in a row.also waiting for a div-3 contest.

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

    Hope next div.3 will be soon :) Now I'm too busy with the studying and other activities but I'm trying to prepare it as soon as possible

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

      I really need to say the amount and the quality of contests you prepare are interesting, although not each contest you prepare is perfect, but the overall desirable quality is stable, I don't know how difficult it is to prepare a contest, but I bet it is not easy at all, sometimes I notice that you give attention to negative feedback, when you should only consider the constructive one, try to avoid that, every active contestant in codeforces realizes the amount of effort and creativity you offer to the community

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

I haven't been able to do a contest in a while... all contests are either morning/noon on weekday or early morning on weekends (I live in US).

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

Пули догоняют стрелка

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

Short statement and strong pretest plz.

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

Is it rated for Div. 3??

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

I have not competed in a contest in a long time. I think last time was before my sweet cow "Ernesta" gave birth to tiny and soft brown and white "Vaquita linda".

Now I'll leave the barn for a while and try to have a little fun with this contest. Or maybe I'll take my laptop to the field, and use the sheeps and cows as inspiration while I write code under the sun, gazing at the sunflowers and listening to the little singing birds.

Viva Argentina! Poder gaucho FTW!

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

4 consecutive contests what a great week

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

Delay :(

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

D — Delay P — Problem

DP

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

delay in Education rounds is no more a surprise for me, It has become a trend.

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

Delay is for registering for next contest.

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

I am staying at office late to take part in the contest and it just got delayed -_- . Now I may have to miss it :(

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

is it rated?

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

Problem A was unexpectedly too much implementation based :(

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

when you finish doable problems 25 minutes before and keep on refreshing the page to see your rank falling :(

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

How to solve F?

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

    Delete a tree from the graph. You are left with a graph of at most 42 nodes. You can use distance pre-processing on the tree (lca) and on the remaining graph (floyd-warshall) to answer the queries.

    For more details: http://mirror.codeforces.com/contest/1051/submission/43144878

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

    Cut the given graph down to any spanning tree. There will be at most ~20 spare edges, you can calculate distance between any two nodes in O(log n) if you drop these spare edges out and consider only spanning tree.

    Now we will have to consider edges that we dropped out. Let G be complete graph where edge (U,V) is minimum of the path between U and V in the spanning tree and the length of spare edge between (U,V) if it exists. G contains only nodes from the initial graph which have at least one spare edge attached to it, so G is not larger than ~40 nodes. Let's calculate the shortest path between any two nodes in G (e.g. using Floyd algo).

    Ok, now for each query we just take the spanning tree path length between U and V as the initial answer and try to make it better by choosing every two vertices U', V' from G and taking spanning tree paths U-U' and V'-V plus G path U'-V'.

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

    I think it's easier to think about it this way:

    Let T be any spanning tree of the graph, S be the set of edges in the original graph but not in T, and V be the set of vertices in S. Note |V| ≤ 42. Then any path that is not entirely in the tree must pass through at least one vertex in V. So the answer for a query (u, v) is min((dist(u, v) in the tree), (dist(w, u) + dist(w, v))) over all w in V. So you can run a Dijkstra from all such w and compute the answers this way.

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

Damn man, what was the pretest 6 in C ;_;

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

A huge skill gap between D and E/F :(

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

I think A was harder than B/C/D.

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

swap(A, B);

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

What's test 4 in E?

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

Can someone point out the mistake in this dp implementation for problem D ? http://mirror.codeforces.com/contest/1051/submission/43148059

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

Got my mistake

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

Expected solution for C ? I used some DP .

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

Isn't C's problem statement confusing? I initially interpreted that nice numbers are only on the basis of the multiset s, not a and b.

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

    Yes. The English problem statement is incorrect.

    To quote: "Vasya has a multiset s consisting of n integer numbers. Vasya calls some number x nice if it appears in the multiset exactly once."

    When you type "the multiset", it refers to some specific multiset (the one mentioned). If you were to write "a multiset", it could refer to some other multiset as well. The problem statement was unambiguous regarding which multiset is used to define which numbers are nice: "the multiset" s given in the problem statement.

    Pretty annoying to spend 20 minutes of competition time just trying to figure out what kind of error was left in the problem statement.

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

What is wrong with 43149226 for C?

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

Everyone must be so afraid of halyavin right now XD

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

F,the data is wrong, since I get RE if I set MX=1e5+5, and get AC when I set MX=2e5+5

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

In problem F,the statement says m<=100000. However,in test 11, m > 100005.

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

For problem B the solution always exists ?

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

I think that there is an invalid test case in Problem F. It appears that the test case 11 has M > 100000.

TLE Code: 43149555

AC Code: 43144968

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

F,the data is wrong, since I get RE if I set MX=1e5+5, and get AC when I set MX=2e5+5

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

Lol, F's constraint is 1 ≤ n, m ≤ 105, but in test case 11, m = 105 + 20.

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

How does hacking a solution affect the scoreboard of the hacker in educational rounds?

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

how to solve D and why :P? because I didn't know what to think

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

Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

I think there is something wrong with CF-Predictor. halyavin got rank 839 and it predicted that he get +65.

UPD: Actually, he got rank 835.

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

http://mirror.codeforces.com/contest/1051/submission/43144963

What's wrong with my C?

It fails on Test 7

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

If the issue with F can be solved, please do not make this round unrated. It'll be very disappointing.

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

How to solve problem E?

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

    Let dp[i] be the total number of ways to partition the suffix of a starting at i. And let dp[n]=1 (n is the last character index+1). To calculate dp[i], you need to know the smallest index i' (i'>=i) such that the sub-string a[i, i+1, ..., i'] forms a number >= l, and you need to know the largest index i'' (i''>=i) such that the sub-string a[i, i+1, ..., i''] forms a number <= r. dp[i] will be dp[i'+1]+dp[i'+2]+...+dp[i''+1]. To find i' and i'', you need an algorithm which finds for every i the longest prefix starting at i which is also a prefix of l, and the longest prefix starting at i which is also a prefix of r (Z algorithm does this in linear time). And to sum the dp values, you can use cumulative sum on dp as you are calculating it. There is a bunch of corner cases that need to be handled of course.

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

the number of people who solved F isn't high enough to make the round unrated

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

Can you make the round unrated for only people affected?

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

Problem F had the same idea as this problem, but with a slightly tricky implementation.

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

I know it's not fair to make it rated for the participants who wasted time on f but it's also not fair to make it unrated for all the other participants ...

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

If this gets unrated, it will be the first unrated educational round [rated for div2]

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

If anyone wants to discuss a probabilistic aplroach to problem F: http://mirror.codeforces.com/blog/entry/61948

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

If this round will be unrated.It will be better for those people who have at least one submission of problem F but not for all please, since the issue created with only problem F. Thanks.

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

In problem F, if the condition m-n<=20 doesnt exist, how to solve it ?

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

    Run floyd warshal or dijkstra for each pair or dijkstra on every query. There is no fast solution without that condition.

    Maybe some A* or some probabilistic stuff — no idea how that works in practice.

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

Sorry for the F, but hope this contest will be rated...

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

How to solve G?

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

    if doesn't exist any i,j(i!=j) such that a_i=a_j or a_i=a_j+1

    then obviously we can't do any operations and they are pairwise different

    so the answer is 0

    and now consider we got a new (x,y)

    lets look at the 2 conditions below:

    (1) lets say that there exists a_i+1=x and b_i<y, we should apply operation(2) to x and apply operation(1) to a_i so that we can add b_i-y(which is a negative value) to our answer

    (2) if there exists a_i=x, then we must apply operation(1) to one of them to make it pairwise different, and obviously, we should apply the operation to the one with smaller b

    after we have done our operations, we should get something like (a_i,b_i1),(a_i+1,b_i2),(a_i+2,b_i3)....

    be aware that these b are sorted so that b_i1>b_i2>b_i3 ...

    To conclusion, let consider we get (a_i,b_i1),(a_i+1,b_i2),(a_i+2,b_i3)...(a_i+m-1,b_im) ,(a_j,b_j1),(a_j+1,b_j2)...(a_j+k-1,b_jk) (a_j>a_i+m-1+1)

    if we get a new (x,y) that a_i<=x<=a_i+m, we should rearrange the them so that we get a new sequence (a_i,b_i1),(a_i+1,b_i2)...(a_i+m,b_i(m+1))

    and if a_i+m+1=a_j

    we should merge the two((a_i,b_i)... and (a_j,b-j)...) into one((a_i,b_i)...)

    we could do this by using a BST and Heuristic merge in O(Nlog(N)log(N))

    sorry for the bad explanation, you can check my code if you need

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

http://mirror.codeforces.com/profile/answhldkd this account is pretty obviously a team account. look at his submissions. ( http://mirror.codeforces.com/submissions/answhldkd ) You can recognize easly that coding style of B, D, F is simillar, but for F, A, C they are very different.

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

Problem F is similar with http://mirror.codeforces.com/gym/101808/problem/K which I have done 2 weeks ago. But my biggest mistake is tried to solve D before F. After contest, read F and say: OMFG!

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

For us, the game started very late, we stayed up late to the early hours, so I hope this game should rated.

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

Да тут надо анрейт делать по любому

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

Hope the contest will be rated. Few people were affected by issue in F, it could be unrated only for these people

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

Is it rated??

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

Is the contest made unrated?

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

hope final testing will starting soon.its truly boring waiting a long time for testing.

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

is this contest rated or unrated ? for one test case in problem F round shouldn't be unrated problem F must be deleted or round became unrated for people who have solved problem F

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

Longest discussions ever...

1.politics

2.arms deals

3.educational round 51 rated or not

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

The System Test has started!

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

I open Codeforces about 20 times for the result of the discussing

and check the announcement said "are discussing" or "will discuss"

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

this is truly awkward ,if only for problem (F) this round will become unrated.

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

Вы можете подтвердить, что во всех входных данных 1051B - Взаимно простые пары соблюдается ограничение из условия 1 ≤ l< r ≤ 1018? Похоже, моё решение не прошло именно из-за этого. Я использовал беззнаковый целый тип.

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

    unsigned int хранит числа от 0 до 232 - 1, так что Вы правы, ваше решение не прошло именно из-за этого.

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

    Решение не проходит по нескольким причинам:

    1) unsigned int не гарантированно влезает в эти ограничения. В случае с использованным G++11 гарантированно не влезает. Нужен long long (не обязательно unsigned).

    2) Нет гарантии, что спецификатор %u прочитает корректно unsigned long long. Для этого лучше использовать %llu или (что еще лучше) вообще отказаться от scanf.

    3) Третий тест это l = 2, r = 3. В этом тесте очевидно ответ 2 3. Однако решение выдает 1 2. Так что тут еще и сам алгоритм неверный.

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

why do these issues occur only when I do well in a contest ?!!!

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

I think there aren't lots of people affected by issue in problem F, because number of people that solved it didn't change much after rejudge, so I think it's better to make unrated only for them(If they want that ofc).

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

Maybe we can make the round unrated for those people affected.

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

Seriously, just only for few people its going to be unrated for all users? Its very unexpected from CF . Very sad. I cant believe it.

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

Upsolved problem A with adding "type" symbols after every char, which let me use backreference in regex. Solution with Perl: 43170240

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

Is it rated or unrated? Not determined yet?

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

Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

If it's unrated, it would be very sad :( I will lost the chance to become CM.

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

So it is rated now? Nice.

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

Thanks a lot CF. Finally its going to be rated. Feeling really happy now. Again Thanks a lot.

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

Rated For Not Affected! That's Really a Nice Decision

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

In problem A, any particular reason for not allowing T > 1 during hacking phase? Actually these 43147222 , 43149770 solutions will fail on test cases such as : http://mirror.codeforces.com/contest/1051/hacks/489717/test

By the way, they are exactly same submissions by different users but in different languages.

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

Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

Why does Bottom Up take much less time than top down with memoization??
In regards to 1051D - Bicolorings and following submissions:
Top Down: 43169291
Bottom Up: 43175270

Is it due to Hashing?

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

I have a question:

In problem F 1051F - The Shortest Statement ,it says m-n<=20,so it will be at most 21 Edges are not used after building a tree, so if every edge's u and v are different it will have at most 42 points.

I take these points out and run dijkstra to get these points to every points' shortest-path. but I only define a array dis[41][maxn], and I saved id start from 0.

I think it should get RE during system test. Why it got AC? If I use assert in my code, it got RE on test 6. I don't understand why really. (sorry for my poor English. :P)

Here's my code.43141017

use assert.43177498

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

Where is editorial?

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

why no editorial even after 12 hours?

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

Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

Может закинете разбор в материалы соревнования, а то как-то можно подумать, что разбор еще не опубликован, раз его нету в материалах.