Комментарии

So proud.

tmw orz

Nice job!

+21

I am sorry but may you please explain why everyone writes your handle? :D

You can open PR with the tests :)

На fcspartakm → Codeforces Round #592 (Div. 2), 7 лет назад
+7

I have tried the diophantine equation but no luck. What a bad problem for C..

As far as I know, it will only show final standings. Maybe there is some website to view scoreboard in real-time?

На 3OOIQ → IZHO 2019 / Day 1, 8 лет назад
0

I believe standings will appear there soon: https://izho.kz/results/

+2

На whipppedcream → Koalas at IOI 2018, 8 лет назад
+18

Didn't your team also put kangoroos on some bags? :D

На gigabuffoon → IOI 2018 Scoreboard, 8 лет назад
+37

Is it down again?

На Um_nik → Codeforces Round #485 (div.1+div.2), 9 лет назад
-10

I think 'Collections.sort' is too slow to pass tests with big constraints.

IITU Open 2018 Spring

На gKseni → ICPC Финал 2018, 9 лет назад
0

There are no ups without falls..

Думаю в скором времени их можно будет сдавать в этой группе

Супер!

На tourist → Hello 2018, 9 лет назад
+7

Lovely scoring distribution

На Broken_Soul → Doubt in DP, 9 лет назад
0

Well, what if the value of n will be less than the value of k? Some of your dp[i] states will still be true.

На moejy0viiiiiiv → Any suggestions?, 9 лет назад
+45

Guys, it is a prank! :D

На RockyB → Started prepare to IOI, 9 лет назад
+31

Good luck, Zhan! I wish your dream come true!

На Lewin → Good Bye 2017, 9 лет назад
0

After educational round

На Lewin → Good Bye 2017, 9 лет назад
0

Good luck, everyone!

Difficulty is the same as Div2 problems

На Nickolas → Codeforces Round #455 (Div. 2) Editorial, 9 лет назад
+17

As always, solution for a problem is quite easy but why I can't come up with it..

Anyway, thanks for great problems!

На ironsoul → Комбинаторика, 9 лет назад
+10

n <= 16, len <= 8, a[i] <= 10

На NBAH → Codeforces Round #448(Div.2), 9 лет назад
+1

Well, it works in logN. So I think you both do not need to worry about TL

На NBAH → Codeforces Round #448(Div.2), 9 лет назад
0

Explanation from AdiZer0 : The number is perfect square if all prime degrees are even. So you can do dp with bitmask since there is only 19 primes until 70.

На NBAH → Codeforces Round #448(Div.2), 9 лет назад
0

Didn't know this fact, thanks)

На NBAH → Codeforces Round #448(Div.2), 9 лет назад
0

How to solve C?

На NBAH → Codeforces Round #448(Div.2), 9 лет назад
0

What is an idea behind your DP approach?

На Marco_L_T → Codeforces Round #447 (Div.2 Only), 9 лет назад
0

Same thing here..

На _Muhammad → How to improve my rating?, 9 лет назад
+1

It is difficult to hear these words again and again but you need more practice. Read this and this. Good luck!

Well, your graph should be like a chain. If it is, just start to restore a string from a top of this chain one by one.

Your resultant string can not contain similar letters. For example, if you have "aba" where 'a' appears two times, it is already impossible to construct a string where "aba" will be the most frequent string. Now, using this fact, let's build a graph on letters of our strings. If we have a string "curd", that means we need to create 3 edges {'c' -> 'u', 'u' -> 'r', 'r' -> 'd'}. If such directed graph does not contain loops, just restore strings and output them in lexicographical order

If there are cycles, answer is NO. Otherwise, restore all strings and output them in lexocgraphical order. 32280888

There are no ups without falls.

Здравствуйте, кажется регистрация не работает (при отправке заполненной формы). Или у меня одного так?

0

In problem Div2E we also should take in mind that if s[i] is a prefix of s[i + 1] and len(s[i]) != len(s[i + 1]) then it is impossible to get the correct capitalization of letters.

No, it is perfect O(logN) for each operation. Maybe you are confused by work of unordered_map that can make O(n) operations in worst case.

На NAflash → Tourist, 9 лет назад
+4

Real talk

I created the BFS algorithm by my own) It was required in the problem where fire was spreading in a maze) I coded about 200 lines of code :D

На feruz.atamuradov → O(NM), 9 лет назад
0

Well, it is the well-known problem and it could be solved using a DP approach. Follow this link to find the analysis of that possible solution.

Why is it enough to take only (l — 1) as the additional case?

You know you are a programming competitions addict if when you see word "tourist" somewhere you think about a CP Legend)

Oh, sorry, there is no question anymore, i found out a mistake, here is AC solution : 27416622

May you please find a mistake behind a logic of my approach for problem C : 27416588

На KAN → Playrix Codescapes Cup Problems Analysis, 10 лет назад
+8

What a beatiful solution for D )

Пусть dp[i][j] хранит количество способов так поменять знаки вопросов на префиксе длины i, что получается скобочное выражение с балансом j. Если не знаешь, что такое баланс, то поищи в гугле, там все объяснено. Тогда ответ будет храниться в dp[n][0]. Переходы такие: if (s[i] == '(') dp[i][j] = dp[i — 1][j — 1]. if (s[i] == ')') dp[i][j] = dp[i — 1][j + 1]. if (s[i] == '?') dp[i][j] = dp[i — 1][j — 1] + dp[i — 1][j + 1].

+5

Easy to see :DD

Давай посчитаем динамику:

dp[i][j][k] — ответ для i — коробок, где в данный момент осталось j красных и k синих шаров.

Тогда персчитывается вот таким образом:

Переберем двумя циклами числа x, y. x — означает количество красных шаров, которые мы положим в i-ю коробку, а y количество синих шаров, которые мы положим в i-ю коробку.

Тогда в состояние dp[i][j][k] мы приходим из состояния dp[i - 1][j + x][k + y].

Код:

Click

Первый тур http://ioi.solf.io/statements_ru.pdf Задачи второго тура в группе Acm in Kazakhstan на Codeforces

Вот еще: Go

На cwystc → NOIP2016, 10 лет назад
0

好運

Тоже ищу сокомандника равного уровня)

На allllekssssa → Two different submissions, 10 лет назад
+3

I thinked it means Knapsack Problem)

Because of collisions unordered_map works with complexity O(n) in worst case while worst case for simple map is O(logN)

Your submissions were skipped because someone has the same code as you. Did you use ideone.com or other online IDEs? If yes, many people had a chance to copy-paste your solution(cheaters)

Можно пожалуйста вопрос про D. Предположим мы ходим по графу и разукрашиваем его, допустим текущая вершина покрашена в цвет 1. Далее мы продолжаем его разукрашивать, и каким-то образом идем по ребру веса 1 в эту же вершину и цвет не совпадает, мы сразу выводим "NO". Но разве мы не можем пойти по какому-нибудь другому пути, где их цвета совпадут? Почему это работает ?

На Matjaz → The best Codeforces problems, 10 лет назад
-6

733C

Spoiler

Hmm, strange..

I got AC with the same idea, check this out

AC Code

На cgy4ever → Codeforces Round #290 Editorial, 10 лет назад
0

May you please explain this part of solution for D?

Spoiler

Why in worst case there is only 9 prime factors??!

На mahmoudbadawy → Codeforces Round #396 (Div. 2), 10 лет назад
0

Oooh. ok)

На mahmoudbadawy → Codeforces Round #396 (Div. 2), 10 лет назад
0

Hm. I think this test case is wrong because "220 275 330" are valid sides

На mahmoudbadawy → Codeforces Round #396 (Div. 2), 10 лет назад
0

I tried to find a hack test case for O(n ^ 3) and O(n ^ 2) solutions.. :D

На HellKitsune → Educational Codeforces Round 17, 10 лет назад
0

How to solve C?

На Kniaz → Разбор Codeforces Round #392 (Div. 2), 10 лет назад
+5

Кажется тут небольшая опечатка

Максимальное количество заданных вопросов одному ученику равно f(n, m), так как меньше всего раз спросят ученика сидящего на последнем ряду за последней партой.

Должно же быть Минимальное количество

На Kniaz → Codeforces Round #392 (Div. 2), 10 лет назад
+7

Absolutely agree) I think this type of problems is named as "constructive"

На Kniaz → Codeforces Round #392 (Div. 2), 10 лет назад
+1

Guys, what is a type of problem C today? Is it math or just implementation? I have difficulties with this kind of problems

На Kniaz → Codeforces Round #392 (Div. 2), 10 лет назад
+6

Good luck!)

gepardo уже прошел в заключительный этап по результатам первого тура)

UPD

По многочисленным просьбам было принято решение продлить короткий тур отборочного этапа на один день. Теперь стартовать виртуальное соревнование можно до 23:59:59 17 января.

На Kostroma → Codeforces Round 389 (Div.2) Editorial, 10 лет назад
0

Yes, and dp[i] = dp[i / 2] + dp[i / 2 + (i % 2)];

Hope this will help

На Hepic_Antony_Skarlatos → Looking for a team, 10 лет назад
+2

Also ready)

Сейчас здесь можно сдавать задачи с Жаутыковской олимпиады 2014 года

Эта задача была у нас на сетевой олимпиаде, остались только условия(

Solution from Marik

Let pref[i] be the maximum volume of liquid that we can get by doing some opreations on prefix i, the same for suf[i], but here we calculate maximum volume that we can get on suffix i.

Therefore,

pref[i] = v[i] + min(pref[i — 1], l[i])

suf[i] = v[i] + min(suf[i + 1], r[i])

Then iterate i from 1 to n and calculate this value:

ans = max(ans, suf[i] + pref[i] — v[i]).

Code: http://pastebin.com/rEQLM2zK

Не очень понимаю, почему формула именно такая, можете объяснить

На Slamur → Разбор Codeforces Round #388 (Div. 2), 10 лет назад
0

Можете пожалуйста пояснить вот эти слова из разбора для задачи D:

Click

Можете пожалуйста рассказать как решать С и Д на 100 баллов

Можешь пожалуйста скинуть код, если несложно

Можешь пожалуйста объяснить как она решается?

Можете пожалуйста рассказать как решается задача D

+11

Можно еще m.rbegin() -> first

На fivut → Задачи на трехмерное DP , 10 лет назад
0
На alpeshvas → TLE on testcase 9 in Road to cinema., 10 лет назад
0

It makes your input/output more faster. It is really important to use it when you read big data. For example, when number of elements in your array reaches 2e5)

На alpeshvas → TLE on testcase 9 in Road to cinema., 10 лет назад
+6

Your solution is right)

http://codeforces.me/contest/738/submission/22402437

I only added ios_base and it got 'Accepted' :DDDD

На ironsoul → Lazy propagation, 10 лет назад
0

Автокомментарий: текст был обновлен пользователем ironsoul (предыдущая версия, новая версия, сравнить).

На andrewzta → NEERC-2016 Site in Almaty, 10 лет назад
+24

Қош Келдіңіздер!) Добро пожаловать!)

На Mano → Min cost max flow, 10 лет назад
-8

“Code what you can, with what you have, where you are.”


P.S. Original quote: “Do what you can, with what you have, where you are.” -Theodore Roosevelt

Instead of Thousands Words : Passed Pretests

Something More Than Just Lines of Code