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

Привет, Codeforces!

23 ноября в 18:05 по Москве начнётся Educational Codeforces Round 33.

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

В качестве эксперимента мы решили сделать раунд рейтинговым для Div. 2. Соревнование будет проводиться по немного расширенным правилам ACM ICPC. После окончания раунда будет период времени длительностью в один день, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

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

Задачи вместе со мной готовили Михаил awoo Пикляев и Владимир vovuh Петров.

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

UPD: Разбор задач.

Также у меня есть сообщение от наших партнёров, Harbour.Space University:

Be sure to join these courses to sharpen your programming and data analysis skills:

Combinatorics and graphs with Sergey Nikolenko, Researcher, Steklov Mathematical Institute at. St. Petersburg. He is a computer scientist with vast experience in machine learning and data analysis, algorithms design and analysis, theoretical computer science, and algebra.

Algorithms and Data Structures with Edith Elkind, Professor University of Oxford, Department of Computer Science. She researches game theory and the computation of social choices. She looks at the decisions involved in multi-agent systems such as auctions, elections and co-operative games.

Big Data Analysis: Mapreduce, Spark, BigTable/HBase, Distributed Data with Pavel Klemenkov and Alexey Dral. With HDFS, MapReduce, Spark, and NoSQL, students will master and sharpen their knowledge in basic technologies of the modern Big Data landscape.

Parallel and Distributed + High Performance Computing with Dalvan Griebler. The name says it all. Learn how to run your programs faster.

List of all courses:

27.11.17 — 15.12.17 — Image and Video Analysis with Archontis Giannakidis

27.11.17 — 15.12.17 — Linear Algebra with Archontis Giannakidis

08.01.18 — 26.01.18 — Text Mining & Translation with Sergey Nikolenko

08.01.18 — 26.01.18 — Combinatorics and graphs with Sergey Nikolenko

29.01.18 — 16.02.18 — Security analysis of networked objects with Yaroslav Rabovolyuk

19.02.18 — 09.03.18 — Security Operations Center and Cyber Threat Hunting with Sergey Soldatov and Teymur Kheirkhabarov

19.02.18 — 09.03.18 — Calculus with Dmitry Ivankov

12.03.18 — 30.03.18 — Malware Reverse Engineering with Vladislav Stolyarov, Victor Chebyshev and Boris Larin

09.04.18 — 27.04.18 — Incident Response & Digital Forensics with Konstantin Sapronov and Ayman Shaaban

09.04.18 — 27.04.18 — Linear algebra with David Zmiaikou

30.04.18 — 18.05.18 — Statistical Data Analysis with Evgeniy Riabenko

30.04.18 — 18.05.18 — Probability theory with Evgeniy Riabenko

21.05.18 — 08.06.18 — Parallel and Distributed + High Performance Computing with Dalvan Griebler

21.05.18 — 08.06.18 — Algorithms and Data Structures with Edith Elkind

11.06.18 — 29.06.18 — Big Data Analysis: Map Reduce, Spark, BigTable/HBase, Distributed Data with Pavel Klemenkov and Alexey Dral

Register for your spot

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

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

What are the exact rules of the rated contest? Since it's non-standard CodeForces round, you could have included more details about it.

Will hacks count into result? Will the ranking be like usual Educational rounds?

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

Are there going to be pretests?

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

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

24 hour open hacking phase ?

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

About the rules of rating distribution:

After the hacking phase the participants from Div.2 will be sorted according to ICPC rules (by number of solved problems, and if the number of problems is equal, by penalty). Then the rating will be redistributed according to places in Div.2.

There will be pretests, and the number of them will be larger than in regular Codeforces Rounds, but we don't guarantee that if the solution passes pretests, it will pass system tests.

This might be inconvenient for some participants, but remember that this round is experimental, and we may make ERs unrated again after this round (or change the rating distribution system in ERs).

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

Is there going to be more rated Educational rounds?

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

I can't wait to see how rated educational will work. Good luck to everyone!

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

So as i understood it will be a cf round with educational problems which are really nice, with rating system like atcoder and cs academy, no hacks(because they don't count into the rating). What can be better in the world than this???

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

Is it rated? And if it is rated, can it became unrated?

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

I think that you should write into the description with really big letters that is rated because some don't see it very well.

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

Спасибо что решили сделать рейт ) но не могли бы вы объяснить как будет проводиться раунд , когда начислять рейт ? через день или в тот же день и как там с хакингом ?

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

Участники с див1 могут принять участия просто так ? и можно ли их взламовать или могут ли они взламовать других ?

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

Лучше сразу написать все правила и как будет проходить раунд все такое что бы каждый раз один и тот же вопрос не задавали

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

Make next educational contests rated

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

So will system tests happen after the 24 hour hacking period so that hack cases can be added into the system tests?

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

You say: Educational rounds primarily pursue educational and training goals, rather than competitive ones. But edutcational is rated. Don't be so

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

Paradox :D Last official rated rounds — unrated. Next official unrated round — rated.

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

Will the rating change after the contest ends or it will change after 24-hour hacking phase? If it change after 24-hour hacking phase, will hacks affect to a participant's rating?

Hope this round will be the best rated Educational Round ever.

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

    Of course rating change after 24-hour hacking phase, because final system test occur after 24-hour hacking phase. Hack means a wrong solution, so rating must be affect with hack.

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

OMG! That's good!

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

What is the influence for penalty if I hack others? I have a suggestion. If I hack others successful, I got -10 min penalty, otherwise, I got 20 min penalty

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

I think it's first time, when educational round become rated.

Hope problems will have **short** statements not as this **announcement**.

Wish everybody luck and high rating...!

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

Is it "Rated"?

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

Will all Educational Codeforces Rounds be rated?

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

Rated educational contest: ACM with semi-freezing for the entire contest including yourself

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

Codeforces probably will be more and more interesting!Come on!

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

That's just a suggestion.

You can add another Rating Criteria say Educational Rating and make all the Educational Round rated based on the usual rating system or any other rating algorithm.

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

It'll feel more different if there would be no pretests and 1 day hacks.

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

Is it rated?

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

finally there will be Edu. Round in my contest list :-)

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

Why this page is not included in "HARBOUR SPACE UNIVERSITY" page as Educational Codeforces Round 32 Announcement?


UPD: It was updated.

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

I hope all Educational Codeforces Round get rated for div.2 and high rating for all participants :D

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

I'm a newbie =)) everry body who can help me how to study as well in IT

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

Good luck to everyone! We're all eager to know how this will work! Anyway, I want to mention that I'm okay with frequent changes of how the contests work, but I would like to maintain the situation of having one weekly contest that isn't rated(besides of other rated contests). What do you people think?

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

Могут ли участники див 1 после раунда взламовать ? или имеют права только див 2 ?

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

Is score will be Based on the time of submission??

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

best thing to an educational round :D

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

Again 30 pages queue :\

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

Experiment Failed. ( Long Queues )

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

12 minutes to surpass the queue (and received a WA after that). Either Codeforces server is running into trouble again, or you guys haven't anticipated enough about the number of submissions in educational contests...

UPD: Things are getting a lot better now. Can't compensate the issues, but still cheers ;)

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

    It's not our problem. So what do you want?

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

      Actually, it is. The pressure of waiting for judgement for your "threshold" problems — that means the "just right" problems, hardest you can solve in a contest — is increasing dramatically due to long queues. Also, nobody enjoys an environment with bugs and issues. They should be reported so that the administrators/moderators or the contest setters could figure out and attempt to fix it.

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

Is it rated?

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

In queue for more than 15 minutes!

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

Codeforces improves significantly!! There are only 27 pages of queue now.

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

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

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

I think new diagnostics of solutions in c++ failed the crash-test...

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

Why is the answer for a 3rd test case in problem D is 2? No explanation given as well as this question is also not well framed.

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

I think contest is going well.Queue is for having many test cases than regular contest :) Though sometimes it is bothering,but well enough comparing with bad pretest.

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

I hate D.Why you don't give an explanation to example when you know many people can't understand it clearly?

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

Is it Rated?

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

How to solve E?

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

Anyone who failed a pretest got screwed with penalty time.

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

The submission 32583028 got TLE, but then 32586076 got AC while I only changed the compiler from "GNU C++17 Diagnostics" to C++11 (and lld to I64d). How to explain this phenomenon?

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

Will rating be calculated according to your standings without Div 1 participants (kind of like Div2 rounds with out of competition Div1 competitors) or like a combined round?

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

For those who got WA on test 49 on D and later got AC, what logical error did you find?

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

hi i cant find the bug in my code

can anyone help ? http://codeforces.me/contest/893/submission/32598508

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

For those who got WA on test 49 on D and later got AC, what logical error did you find?

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

could someone help me with problem c I keep getting wrong answer on test 7 link to my solution: https://goo.gl/95gxqy

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

То чувство, когда решал С для ориентированного графа...

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

Good idea make round rated.

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

Сегодня впервые компилятор на КФе не захотел нормально обрабатывать метод eval, игнорируя тернарник в нем. Обидно =(

struct Node {
  Node *lp, *rp;
  int val;
  int eval() { return this ? val : INF; }
};
»
9 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

Сдал Fку через персистентное ДО, работает за O(Nlog2N + MlogN), но считаю это overkill'ом. Я прав?

P.S. Не могу придумать правда тест, на котором там достигается log^2, да и по памяти/времени на текущих рандомных тестах кажется, что это log

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

    Можно было точно без лишнего логарифма взять обычное персистентное ДО на минимум, изначально заполненное INF`ами, а номер версии — глубина, до которой все вершины добавлены в ДО.

    С быстрым вводом меньше 800мс пашет.

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

    Вроде можно за n*logn+m*log(n)^2 обычным деревом отрезков сдать.

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

    Написал дп, которое пытается построить худший случай, и оно всегда выдаёт не более N операций.

    Чтобы было понятно, о чём я говорю: у нас есть дп от поддерева (массив), размера высоты этого поддерева.

    Мы их сливаем по привычному правилу, меньшее к большему.

    Как известно, если бы размер дп был равен размеру поддерева, то слияние заняло бы как минимум O(nlogn).

    А здесь высота, и слияний O(n).

    Но я не могу это доказать (кроме как написать генератор худшего случая через дп).

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

who can share some hacks to show where people made mistakes?

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

How to solve D ???

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

    Here is my submission: 32585910.

    First, I took the prefix sums of all a[i] in the array I called day. I also saved which days a[i]=0 in the array check so I know which days the balance needs to greater than 0. Notice that the balance on day j is day[j].

    Since the balance on day j is day[j], we need to make sure that day[j] >= 0 n days that a[j] = 0. If day[j] < 0, we want to deposit money that morning. Since we want to add money for the minimum number of days, we want to add as much money as possible when we are depositing money. If we add x money to day i, the amount of money on days i...N all increase by x. Therefore, The maximum amount of money we can add on the morning of day i is D-( max(day[j] for j = i...N) ). To calculate max(day[j] for j = i...N), create an array mb where mb[i] is max(day[j] for j = i...N). Loop backwards to create mb. Now, if on day i a[i]=0 and day[i] < 0, we can deposit D-mb[i] that morning. We now need to store that days i...N have D-mb[i] more money. Create a variable add which stores how much money has been added in the mornings.

    If at any point day[i]+add > D, print -1 because the account has more than D burles. If a[i] = 0 and day[i]+add < 0, deposit D-(add+mb[i]) but deposit at least 0-(day[i]+add), otherwise the account will have negative balance. So add += max(D-(add+mb[i]), 0-(day[i]+add)).

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

Can someone explain me problem A in more detail??? I can't figure out my solution(((

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

for problem C, shouldn't DFS with connected components get me the correct answer? I am failing 5th test case. 32595477

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

i solved problem D using segment tree lp. what is the simplest way to solve D?

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

Must we wait till the end of hacking phase to know the rating change?

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

Codeforces give or take points in this contest?

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

thanks a lot for problem F's time limit

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

Pls, someone tell me, is it correct solution for D?

http://codeforces.me/contest/893/submission/32601001

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

How to solve problem F??

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

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

How to solve E ?

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

How to solve E ?

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

getting TLE in c++17 and clang++17 Diagnostics and accepted in c++14. How?

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

Round should be unrated. Very long queue

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

How to solve A?

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

    You can just simulate the game: have three boolean variables / array of 3 bools and then update them based on who wins.

    If the bool variable corresponding to the player who wins is false (e.g he could not have played in the first place), print -1 because such a win is impossible

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

Really nice problems!

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

For problem C, I have seen that (in hacking phase) many contestants have used dsu using two arrays — cost, parent. But my code shows memory limit exceeded on test 4 with 10^5 sized array — 32587358

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

I made the following observations on E. 1: the number of prime factors of x cant be more than 20. And there can be atmost 8. even when it is 8 it is > 1e6. So build a dp table for binomial co efficient. 2: In order to find the prime factors modify seive table to hold the largest prime factor dividing it. 3: Split x into prime factors. And count the number of walls. (Combination with repetition). and using binomial coefficient we can make C(y+w+1, y) choices ( here 1 is for the number '1'. since i can include it). But here i got stuck. since in these y factors different prime numbers can be different number of times in which i ve to use permutation with repetition (to arrange within them). But how to apply it here. And after that choose any 2, 4, 6,.. numbers in y numbers and again multiply them with the permutations (for choosing negative. ) here also i got stuck. Can someone plz help me

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

    Your logic is correct. For your last part, consider the binomial theorem expansion of (1+x)^n. Sum of all n choose k is 2^n.

    Now put x=-1. You will see that sum of all n choose odd k= sum of all n choose even k. Hence, the sum of n choose even k= 2^(n-1).

    Also, note that the sequence starts from 0 and not 2.

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

      Yes. it is correct for nC2 + nC4 + .. . But i can arrange within them. So it will be (n!/(rep1! * rep2!...)) * (nC2 + nC4 + ..). so how to calculate the (n! / rep!), rep1 = number of times prime factor 1 is repeating. rep2 is no of times factor 2 is repeating.... . for eg, suppose if i ve 2, 2, 3. then i can arrange them in 3!/2! = 3 ways(here n = 3, rep1 = 2, rep2 = 1) . so i ve to multiply that with the answer. here there is 2 times 2 hence i put 3!/2!. But when i choose y numbers, i dont know how mnay numbers repeat how many number of times. So how to solve that.

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

    There is a very simple idea in which you don't have to worry about repetitions -- Let's represent the given number x as it's product of prime factors. Observe that each prime factor is independent of other. So we can calculate the answer for each prime factor independently and multiply it with the final answer. The pseudo code will be something like this:

     res = 1
    for each primeFactor in x:
    c = number of times that primeFactor occurs in x.
    res *= numWays(c, y)
    res *= power(2, y - 1) //Now res is your final answer.

    Now the problem reduces to finding numWays(c, y) efficiently. Observe that we have c apples and we need to distribute them to y people such that a person might not get any apple. So the numWays is just ncr(c + y - 1, y - 1). So the final idea is:

     res = 1
    for each primeFactor in x:
    c = number of times that primeFactor occurs in x.
    res *= ncr(c + y - 1, y - 1)
    res *= power(2, y - 1) //Now res is your final answer.
    Hope it helps
»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone explain, how to solve F in detail ?

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

Can someone explain, how to solve F in detail ?

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

Perfectly matched problems for DIV2. Thanks to authors & testers:)

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

Will we see Div 2 ratings after hacking phase finishes?

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

Системное тестирование не нуждается. halyavin всех протестировал))) 132 взломов!!!

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

ratings?

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

No system testing?? The standing page says its the final standings, i thought hack tests will be added before final standings.

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

When we can see the new rate ?

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

When we can see the mew rate?

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

sorry i mean new rate

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

I think if educational rounds will be rated in the future too, I think a feature should be added, the system testing percentage one like normal rounds.

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

System test is too slow................................................

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

really nigga :| its still testing

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

What is the expected time when the main testing will end?

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

In Div 2 C (Rumors),I don't really understand why my first submission isn't working and second is working. I only changed how I set my data type (for example from long long, I switched to typedef long long ll). My first submission results in a wrong answer on test case 5. I am really curious what did I do wrong, so I can know for next time. I didn't change anything in algorithm.

My first submission:

http://codeforces.me/contest/893/submission/32631226

My second submission

http://codeforces.me/contest/893/submission/32631196

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

Editorial?

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

Hey MikeMirzayanov do you need my laptop? I guess it will help the system for judging.

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

When can i see my new rating?

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

System Testing is finally OVER !! How long will it take for rating changes to reflect? :D

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

If I had +65 rating in combined list, shouldn't I have more rating in only Div 2 list? Am I wrong?

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

I didn't understand the rating change fact. Before this contest i had a rating of 1510 and i became 74 (in division 2) and my rating increased by 104. There is another person who became 304 and his rating increased by 98 (his previous rating was 1530). Is it because this is an educational round and things are handled differently???

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

CF Predictor show +74 Rating and Got +8 . don't know how they calculate it .

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

Div 2 only,

Rank 55, previous = 1811, increase = + 125, new = 1936,

Rank 77, previous = 1795, increase= = + 24, new = 1819.

Also,

Rank 7, previous = 1891, increase = +193, new = 2084,

Rank 10, previous = 1757, increase = + 141, new = 1898,

Looks very odd in my opinion, especially the second one.

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

Is there anything wrong with rating changes? BledDest MikeMirzayanov

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

Isn't this weird!

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

Rank 612 — rating 1640 => -42 Rank 1771 — rating 1695 => -53

Why?

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

I was 1526 and finished 441st in the contest and my rating went down, IT WENT DOWN.. HOW AND WHY???

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

I don't think I will be joining rated educational rounds again , I will stick to regular rounds. Waiting for a day for rating change and systems tests + weird rating change (no thanks)

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

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

Round should be unrated because the problems were very easy

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

Just an assumption: Maybe while rating they considered only points i.e. number of questions solved. So all those who solved the same number of questions were ranked equally from rating point of view. I assume this seeing the anomaly in the comment section.

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

looks like the new rating is based on the number of problems you solved, not your standing on this contest. It is unfair to change the rating rule without announcement before the contest.

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

It's fixed, the ratings. Thank You.

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

Very Good contest, I like it, very very good. Make more contests PLZ.

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

Отличный был контест. Особенно, что он рейтинговый.

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

Good Contest

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

I noticed that the rating changes did not apply on the Rating page.

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

what the hell!!!!!!!!!!!!!

How you count the rating ???? which process it has changed????

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

    Dude your rating has increased by 101 points. Are you really that angry?

    I mean its all right to know how the rating changes work but you wayyy more angry than some of the other participants who've had their ratings decreased in spite of expecting an increase.

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

My rating increased by 6 and now it shows -11..why?