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

Автор BekzhanKassenov, 12 лет назад, По-русски

Привет всем!

Сегодня в 21.00 EDT состоится Topcoder SRM 634.

Удачного раунда!

P.S Все никак не могу разобраться с новым интерфейсом их сайта. Как по сайту попасть на описание соревнования, которое я выложил? Я получил его через clist.by

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

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

Another 3:00 AM-ish round (in my country). Hope I won't go to school disappointed from my failure :D

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

Можно попасть в старый интерфейс, дописывая &legacy=true к параметрам.

А также переключиться на него по умолчанию в настройках.

Вот прямая ссылка на старый календарь, которая вроде бы должна работать и без &legacy=true.

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

What is the solution to Div2 500pt problem?

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

    Let A_i be the minimum amount of people who have bought all items from 0 to i.

    Then, we have A_0 = s[0] as our base case.

    Then, we can find a formula for A_i = max(0, A_(i-1) + s[i] — N). We can derive this since we know at least A_(i-1) people have bought items 0 to i-1, s[i] people have have bought item i and there are N total people. Thus, A_i is minimum size of the intersection between the people who've bought items 0 to i-1 and people who've bought item i.

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

Just waked up 30 min before the contest and decide to enter the contest open 250
OUTAGE
open electrical generator the internet was like FLIP-FLOP ON-OFF ON-OFF waiting for ON then submit 250 but there are no another ON during contest
MY WORST SRM EVER

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

How to solve 500?

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

    It's maximum weight independent set on a bipartite graph.

    First, make a node for each red or blue segment you can draw. Then, connect two nodes if they can not occur in a configuration together. We can see that this resulting graph will be bipartite. Our answer will be an independent set of this graph, so we want to maximize the weight of it. We can do this with max flow as follows:

    • connect the source to each blue node with the score of that blue segment
    • connect each red node to the sink with the score of that red segment
    • connect a blue and red node with infinite capacity if they conflict

    We can see the maximum weight independent set is just the sum of all blue/red scores we can get minus the minimum cut. We know we can solve min cut on a bipartite graph with max flow.

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

How to solve div-2 1000 ???

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

    Here's a rough sketch.

    Start with the string "11111...111". Then, for each character in order, try greedily setting it to zero. It can only be set to zero if the resulting string is special and is also strictly greater than current. The reason we need to check if the resulting string is still special is if ST is not a special string, where S is some arbitrary string, and T consists of all 1s, then ST' will definitely not be special, where T' is some arbitrary string that is the same length as T. The running time of this is O(N^2)

    Alternatively, there is a different solution to this that is also google-able (but it seems no one had this solution). You can see it here: http://en.wikipedia.org/wiki/Lyndon_word#Generation The running time of this method is O(N)

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

In Div 1 — 250, I simulated the process as follows: Maintain a set of all the people with number of items purchased as the key. For a new item with frequency say x, first give to all the big-shoppers then the remaining is given one by one to the shopper having minimum number of items in his bag and then the list is updated. But, needless to say, I failed the system test (got WA). What is wrong with the logic?