Привет, Codeforces!
12 октября 2015 года в 12:00 MSK состоится очередной раунд Codeforces #325 для участников из первого и второго дивизионов. Обратите внимание на необычное время начала раунда!
Этот раунд проводится по задачам Регионального этапа всероссийской командной олимпиады школьников по программированию 2015, который пройдет в то же время в городе Саратове. Пожелаем школьным командам удачи на соревновании!
Набор задач школьной олимпиады немного отличается от задач, которые будут предложены вам на раунде. В том числе в комплекте задач на школьную присутствуют задачи, которых нет в раунде и наоборот. Поэтому не стоит пугаться того, что мы предложили школьникам слишком сложные задачи :-)
Процесс подготовки задач был интересным: мы много раз переделывали условия, переписывали решения, добавляли тесты, изменяли ограничения, даже успели поменять полностью готовую задачу (пришлось останавливать конвейер типографии, который уже печатал условия :-)). Поблагодарим всех кто готовил, помогал готовить задачи, вычитывал условия, писал перекрестные решения: Адилбек adedalic Далабаев, Роман Roms Глазов, Владимир vovuh Петров, Олег Oleg_Smirnov Смирнов, Алексей Perforator Рипинен, Максим Neon Мещеряков, Илья IlyaLos Лось, Виталий gridnevvvit Гриднев, Данил danilka.pro Сагунов, Александр fcspartakm Фролов, Павел HolkinPV Холкин, Игорь Igor_Kudryashov Кудряшов, Елена elena Рогачева, Дмитрий Nerevar Матов, Виталий kuviman Кудасов. Председателем жюри олимпиады является Михаил MikeMirzayanov Мирзаянов (также автором некоторых задач из комплекта). Я же (Эдвард Edvard Давтян) готовил некоторые задачи и координировал работу авторов. Вот такая большая команда авторов получилась (надеюсь я никого не забыл)!
Также, конечно, поблагодарим Максима Ахмедова (Zlobober), Того-Чьё-Имя-Пока-Нельзя-Называть (если не ошибаюсь он/она прямо сейчас пишет дополнительные решения по задачам раунда) за помощь в подготовке задач, Марию Белову (Delinur) за перевод условий на английский язык и снова Михаила Мирзаянова (MikeMirzayanov) за замечательные системы Codeforces и Polygon.
Участникам будет предложено шесть задач и два часа на их решение. Разбалловка будет объявлена незадолго до начала раунда. Всем высокого рейтинга! Good luck and have fun!
P.S.: Также хочется пожелать удачи участникам четвертьфинала чемпионата мира по программированию южного региона, который пройдет в эту среду.
По техническим причинам раунд перенесен на 10 минут
UPD: По задаче Subway roller в наборе тестов присутствовали тесты с поездами длины 1. В данный момент проводится обсуждение того, насколько сильно это повлияло на результаты раунда. Приносим извинения всем участникам, которых затронула эта проблема. В скором времени будет сделано объявление о принятом решении.
UPD2: При подготовке задачи Subway Roller у одного из авторов было ошибочное понимание условия. Из-за этого валидатор допускал существование поездов длины 1, а так же присутствовали тесты с поездами длины 1. Жюри приняло решение, что если участник посылал в течении контеста верное решение, то оно должно быть ему зачтено. Для этого у каждого участника было выбрано первое отправленное решение, проходящее итоговый тестсет (если таковое решение имелось), а остальные решения были пропущены. Так же баллы за все взломы во время соревнования остались без изменения, включая ситуацию, когда взломанное решение считается правильным на новом тестсете (в этом случае взломщик получает свой балл, а решение участника считается полным). Контест будет признан рейтинговым, однако если вы считаете, что данная проблема сильно повлияла на ваш результат, напишите мне в течении 24 часов и мы рассмотрим возможность сделать его нерейтинговым лично для вас.
UPD3: Разбор задач
Точно региональный тур? Оо
Он же обычно в январе-феврале
Региональный тур школьной командной олимпиады
Ой, спросонья туплю( Сорри
почему нет этого контеста на основной странице сайта и e-mail оповещениях?
Мне приходило оповещение
What a large team! Maybe it is the largest team for a contest in CF up to now. Isn't it?
LARGE team = LARGE amount of troubles?
Perhaps they are still busy discussing now? Just wait is OK~
acm/icpc rules or codeforces rules?
.
Why can't I see this post on my homepage?
Only before the contest 1 hour,we can see it on the homepage.So strange.
Because it's not there :))
gridnevvvit плохие контесты не делает)))
We should expect quality problems, since so many people are involved in the preparation.
.
Score distribution ?
Why delayed again?
where is the scoring distribution ?!
scoring
seriously what is the reason behind cf round delays!?
I think it is related to the sudden massive requests. They prepare slave servers based on the number of initial massive requests and they will be ready after the delay.
what is this? 10 mints delay again :v
It wouldn't be a normal codeforces round if there is no delay :)
the contest start at a special time and we have delay 10 min -_-
I'd be 10 mins late if that didn't happen :p
i will be 10 min late because this happened :D
its time to revolution of delays . 2 hours !
Почему страница отправки взломов не работает?
Только у меня так?
Браузер Firefox 41.0.1 (Windows).
Ghostery и Adblock отключен. Кеш чистил, перелогинивался. ЧЯДНТ???
Adobe Flash player?
Shockwave Flash 19.0 r0, я же решения видел.
You should update Adobe Flash Player...
Бесите. Раз. Два.
Уж молчу о том, что на самом кф уже были очень похожие задачи про это дерево.
Все вам не нравится!
Белорусы более терпеливые, привыкай
Pleople like me.
Hope, that this thing will not be in system tests...
No need to worry. It will because popular hacks are included to systests
В задаче F(div. 2) должно заходить решение на основе meet-in-the-middle? А то мое затлешилось(
У меня зашло в претесты после оптимизаций константы...
Тут уж зависит от того, как подбирать лучший вариант и как хранить остальные.
so lucky contest for me )) -_- #rank666 #C hacked ...
C kills me today -_- how to solve C?
Just model everything in O(n^2).
I think that this round should be unrated for div 2.
I was trying to specify a valid input in task B: 1
1
In output specification there was no constraint that the 2 routes must be different (it was mentioned in the task only, but output specification is more important). And I was getting invalid input message.
Well you cannot make the whole contest unrated just because you did not read the problem statement properly. WTH
The output specification will mention what to print, not the whole problem statement.
How can you solve the problem if not by printing what are you supposed to print? I think that the task B should be judged correctly without this information about 2 different routes but there was no explanation during the whole contest. Besides valid hack input was considered invalid.
It was clearly given n>=2.
The Sample Input Tests show you exactly what you need to print.
Sample test(s) input 4 1 2 3 3 2 1 3 2 2 3 output 12
Did you not see this ?
1 1 is not valid.
2 ≤ n ≤ 50
The last sentence of the statement says :
The boy would get bored if he had to walk the same way again, so he wants the way home to be different from the way to the store in at least one crossing.
Read carefully next time, it's your fault.
I have no idea what goes wrong in my code for C. I wrote a checker for it and ran it on large stresstests, but it seems to work... yet, pretest 8.
For the record, it's based on finding a correct pair of final states of both players using something like extended Euclid, then simulating backwards. The only bugs I have in mind are overflows and flipping A/B, but I thought I should've taken care of it.
:)
Oh, reversing.
Could you describe your solution in more details? At first glance, for me it looked like simulating backwards, because I have seen similar problems, but it seemed to me that this is not a good approach here and it turned out that we can simulate it forward by using geometrical approach.
However, whatever the simplest solution is, this problem seemed pretty hard to me, I'm kinda surprised that 92 people have solved it. Maybe I am missing something easy?
You're missing that this is well-known problem. Here
The link is not working
Sorry, fixed.
I found it pretty hard, too.
I made a DP for x, y ≤ 100, found all the final pairs from which it's possible to make such (x, y) (of course, coprime, since two independent vectors will never give two collinear vectors) and noticed that there are exactly two such pairs, which give only one possible decomposition (let's call then (a1, b1) and (a2, b2); a1 + a2 = x, b1 + b2 = y).
Then, I used my magical intuition, looked at a screen full of numbers and noticed that aky - bkx = ± 1 (one sign for k = 0, the other for k = 1). ...because.
Then, I noticed that adding one pair (a, b) to another (c, d) keeps the value ad - bc (cross product, basically) invariant: a(b + d) - b(a + c) = ab + ad - ba - bc = ad - bc. But that's not actually necessary (and a known identity for cross products).
If I have this decomposition, reconstructing the game is easy — it's always just subtracting the smaller pair from the larger one and can be sped up with modulos, just like GCD.
There's just one thing to watch out for: we may reconstruct the game in such a way that the final cross product is - 1 — Alice starts with an apple. Which of the letters A,B we write depends on this.
Задачи были лучшие.... Но время не хватило :))
Implementation, implementation, implementation.
You destroyed the contest by swaping C with D...
Div 1 or Div 2 ?
Div1
Just missed by few seconds for submitting working exponential solution for prob e.I hope my solution turned out to be WRONG when I will run on all test cases after system testing..otherwise I will regret whole day that I was not able to solve prob
Look like the constraint checker for hacking of Div 1B is wrong. My friend used the test below and had 3 successful hacks:
Although in the statement: "Each train consists of two or more neighbouring cells in some row of the field."
I spent the last ~20 minutes trying to code something that pass this case, and I failed -_- I have to read the statements more :'(
Yes, it also seems pretest 3 had trains of length 1. I couldn't pass it for half the contest..when I couldn't find bug in my solution I tried allowing such trains and it worked.
Sounds like the contest has to be unrated. Apparently, I only passed due to randomly adding a lucky condition.
My solution fails the above test with trains of length 1, but passed all pretests.
Huh, how is it possible to use this condition in any way?
Checking that ith and i+2nd columns are free in given row
So, the conclusion is "checking ith and i+2nd cols are free is OK because this case is invalid" ?
yeah, I use whole rest time to find bug in these problem. I hope it to be unrated.
Answer should be NO for this testcase, right? My solution prints YES, I am failing system test :(.
This test is incorrect.
The test is wrong, it should not be in system test.
And it should not have been allowed in a hack.
What was purpose of prob a and b...to test programming skills or English knowledge :)
В div.1 F O(n2dΣ)?
Very interesting problems!
Because of onsite competition, you will not be able to view other's submissions and test details for ~1 hour. Sorry for inconvenience.
===
По причине официальной олимпиады, около часа будут недоступны просмотр решений и тестов. Приносим извинения за неудобства.
What about systests?
Will we be able to submit our solutions and will the scoreboard be updated in the meanwhile?
А системное тестирование сейчас будет?
What time it will start system testing? It passed 1 hour and 2 minute. I'm still waiting.
Rekt by long long again. I'm so dumb ;_;
I feel pretty silly. The constraints for 2D looked so small that I didn't even think about whether a naive recursive solution would time out. Next time, next time...
Pending system testing.............?
still w8ing for system test !!!!
Oh man, I feel so dumb T_T!, I spent a lot of time implementing a DP Overkill solution for div2B, and then I realized it was easier than that :(
= = ..So do I :(
MikeMirzayanov Sir already said the reason for the late System testing. So keep waiting and Be patience
The struggle is real, fellow doge.
Почему сделали такие слабые претесты? :'(
Да ну, у меня вон А div2 упала сначала на крайнем тесте "1 1", а потом упала на крайнем тесте "1 0", который вообще есть в сэмплах. Хорошие тесты.
I´m so sleeping right now!!! ggg I hate starting in "unusual time"! Hurry up please :)
why does the system test still not get started now? is there any technical reasons?
MikeMirzayanov Sir already said the reason for the late System testing. So keep waiting and Be patience
Because of onsite competition, you will not be able to view other's submissions and test details for ~1 hour. Sorry for inconvenience.
I highly suggest that all English problem statements should be read by someone who didn't know the problem before. That is a very easy way to prevent things like this (which are pretty severe of course):
Btw of course lack of word "equal" is most important thing here, but even I am not able to produce sentence which is that bad as second one.
I understood that the numbers are equal, because in this context if the numbers are even between them it means that the numbers are equal. I think it's proper english.
But 'even' has a very clear mathematical meaning already. If anything, the incorrect interpretation is more valid than the intended interpretation.
Lol, I didn't even notice that possibility. It has some sense, but I assigned that "even" to "even after completing" not to "attitude" xD. I thought that this sentence completely lacks any meaning, even wrong one :P. And yes, what rnsiehemt said is also valid.
Well, I'm a bit sad I only have to read this now. First, I interpreted the 'even' as: "The total attitude for each character is even (i.e. not odd; divisible by 2)." This didn't work with the samples, so I decided it meant: "The attitude of each character is TOWARDS the hero, i.e., positive (or maybe non-negative, wasn't sure of that)."
Most of the time these English errors aren't really a problem, but in this case, there are (at least) two other possible interpretations that make at least some sense. Also, the samples shouldn't be necessary to understand the problem, unless the problem explicitly refers to them.
I had the same interpretation! All attitudes to be positive.
what a wonderful contest,but my rating is still falling...
How to solve Div 2 D??
It is alike tetris: You have to put bricks of shape I, L (or reversed L), with height of 3, and every brick you should put on the top of previous brick, and of course your first brick you should put on the top of 's'. Goals is to reach top of "tunnel", and restriction is that you can't put brick in place where background has any letter.
The-One-Who-Must-Not-Be-Named = Lord Voldemort ??? :O :S
I have been waiting for one hour in nervous. Could systests be quicker?
why still waiting for system test? what is happening?
I spent last 20 minutes of competition looking for one error due to "Wrong answer on pretest 3" ... now I´m guessing "this is the reason"!!!
I really beg that the data about trains of length one could be canceled. After all,the problem says that length>=2.
But some people waste time on this problem.So I hope this contest will be unrated.
No No No DONT DO THAT. Its not fair for everyone else who worked so hard.
I think it's better to be unrated.
Agree.
Both rated and unrated are OK, I don't like "partly unrated".
Why don't you?
Agree.
Rated is okay:-),but it's to slow......
Skip the one who are hacked in problem B by the illegal test?
It would be overkill to not rate the whole competition because of this issue. Yes, some people may have wasted time which would create some noise in the end results, but I think the signal (from a signal processing perspective) would still be very strong. This would at least apply to Div 2 where this was problem D.
I have spent my whole evening waiting for the system test hungry and nervous :(
If this contest started at 0:30 as usual and get a problem like this...
Oh I can't stand it >.<
В задаче про поезда: "затем все поезда дважды одновременно перемещаются на одну клетку влево". Разве это не решает вопрос с поездами единичной длины? Или же авторское решение было не верно?
Не решает. Например, возможны решения, позволяющие проходить "насквозь" поезда длины 1 или как-нибудь ещё эксплуатирующие этот факт. По факту они верные, но на (пре-)тестах с поездами длины 1 будут падать.
Я хотел показать своим комментарием что поезда дважды сдвигаются на одну клетку влево. Не сразу на две клетки. В этом случае насквозь никак не пройти.
Возможно, кто-то в своём решении опирался на тот факт, что длина поездов хотя бы два и получил неправильный ответ на претесте, в котором был поезд длины один. Дальше он не нашёл ошибку в своём решении до конца контеста (потому что её и не было). А если бы не было некорректного теста, он дошёл бы до следующего претеста и там получил бы TL и обнаружил, что его решение в определённых случаях зацикливаиется, исправил это и сдал задачу.
Или он просто получил неправильный ответ на претесте и весь контест пытался найти ошибку, которой не было, а вместо этого мог бы решать другие задачи.
А такие претесты были? Если нет, то можно просто пофиксить тесты, откатить взломы и влияние на результаты контеста будет минимальное.
Если у нас есть несоответствие условия задачи и претестов по одной из самых решаемых задач контеста, то влияние на результаты никак не могут быть минимальны.
Я вообще-то написал именно про случай, когда несоответствия в претестах не было.
Казалось бы, если не было таких претестов, то просто фиксим тесты и перетестируем. Взломы-то корректно валидировались, надеюсь. Так что, наверное, всё-таки были такие претесты.
Но ведь в условии не было сказано о том, что поездов длины 1 быть не может. В таком случае не учитывание таких поездов нужно считать ошибкой. Или же участник должен был уточнить условие у жюри.
В условие было написано, что поездов длины 1 не может быть.
Да, не заметил такого в условии. Думал проблемы в другом.
Div2F's time limit is so strict :(
:D
Lol.!! Hahaha :D
contest is rated or unrated nothing matter to me . But as some people has issue with some problems its better to arrange a complementary contest very soon :D As its Regional time everywhere , everyone should be happy to participate more contest :)
btw am i the only one who have trouble to understand the problem statement clearly :( . Hope for a better translation next time .
yeah the statements were not clear and u had to read the problem 3 4 times to understand it
Yes, statements were bad today.
Am I the only one who misinterpreted B?
With regards to this statement: "First, the hero moves one cell to the right, then one square up or down, or stays idle."
I interpreted it as: either moving right and down, moving right and up, or staying still. Apparently it passes given pretests but not pretest 4.
That is rough. I had not considered that interpretation, but I can see how you could be misled. For me the use of 'First,' clarified the meaning, because this indicates there are at least two steps to a move, while under your interpretation there is only one step (of two possible). But I commiserate!
To be rated or not to be this is problem !
Does anyone have any predictions for the start of system test?
Давно уже не было времени написать контест, а тут наконец-то нашел. Грустно вышло. В начале CF упал, потом отложили на 10 минут, что заставило меня понервничать. Теперь, вот, системное тестирование никак не запустят.
Четно говоря, по-моему, ситуация крайне скверная вышла. На любой вариант всегда найдется свой недовольный. Кто-то жаждет рейтинга, кто-то жаждет справедливости за потраченное время и нервы, а кто-то просто хочет увидеть результаты и пойти, наконец, покушать и отдохнуть. Надеюсь, что организаторы смогут выйти достойно из этой ситуации, по-минимуму ущемив интересы каждого.
Всем мира!
А что мешает пойти покушать и отдохнуть без окончательных результатах? Никакие вероисповедания, насколько мне известно, это не запрещают. Или СП уже можно отнести к средствам вызывающим зависимость?
Consider those people as out of competition who got wrong answer in that problem for train length 1
this idea kinda sucks :)
Agree... what if you solved all the problems except D, or if you have a high rating in the contest even without solving problem D.
I must go to sleep now,but system test doesn't start,so I can't wait for it today.
You might wake up before it starts
Also the explanation of sample test in div2 problem d was wrong initially so i don't think rating this round will be fair for someone who wasted his whole time reading the problem statement again and again.
Also I had pp ABCDE in div.2, but I also want it unrated. Cause if not, there will be a godlike people called yuts will be nearly driving me mad!
This round should be unrated for several reasons:
4th is the best reason.
Sorry for 4.
but glad to know that im not the only one who was troubled by the statements...
Only the forth reason is your thinking I guess. -v-
I think this round should be rated.
All the problems & test for everyone is equal..
If your solution can not deal with the train of size 1, your solution may not good enough~~
This suck ... you simple make your code assuming that trains with size 1 are not in the input.
If solution fails, then you spent a lot of time looking for some mysterious error in your solution before you can imagine that limits are wrong and none one noted it during preparation.
UPD: I thinks that contest should be rated for DIV2 contestants, after removing cases for DIV2-D problem which should not be used originally. I guess that all solutions accepted will remains the same.
" If your solution can not deal with the train of size 1, your solution may not good enough~~ "
Different standpoint between pure ACMer and worked people.
Statement: "Program should read two integers up to 1e9 and print their sum."
Your program: "int a, b; scanf(a, b); printf(a + b);"
Verdict: WA for test "1e500 1e500". Your program was not good enough and doesn't deal with big integers.
"may not" in my statement.
I'm just kidding. Why you are so serious..
So we may not like your sense of humor.
can anyone tell me why a naive memorized recursion solution for Div2 D / Div1 B will TLE?
it wont
If you handle all the cases properly it won't get tle.
I have to go to sleep now,and I hope I can see "Finished" tomorrow morning.
Please, rated or not, just run system tests.... this delay kill me....
Same here!
well well well :D RIP System Test -_-
мне кажется, когда команда не может проводить одновременно официальный раунд и зеркало, то лучше этого не делать, не говоря уже про составление задач с никому непонятными тестами и условиями
I want this is round unrating. Because this is round unluckly. Because Problem A My solution wrong answer.
Not all of that you want come true.
What is happening? When will the system testing be done?
when will the solutions be judged ?? it's already 3 hrs since the contest has ended...
How to solve Div 1 C?
http://codeforces.net/blog/entry/20898
Dont know if my solution is right, but i ran a brute force for small input and observed a pattern in the output based on which i observed the following
Also, if the gcd of A and B is greater than 1, then its Impossible.
I think rating is not very important.
What is important is to test yourself and compare with others.
After The Second Revolution of Colors and Titles, now we got the First revolution of delay in system test... :)
Тут такое дело... Во время контеста было написано, что все претесты для задачи номер D пройдены. Сейчас же, пишет, что не прошло претест, опять же, номер 8
Мы обновили тесты и сделали претесты полностью равными тестам. Потом перетестировали все попытки. Это позволило для каждого участника выбрать первую попытку, которая проходит тесты (т.е. прохождение претестов == прохождению тестов). Как сайд-эффект возможно, что до систестов у вас было "Претесты пройдены", а стало "Неправильный ответ на претест X", но это просто обозначает, что ваше решение бы упало и на основном наборе тестов.
What happened to tests in Div2 D? They changed the pretests !!!(I had pretests passed before, now wrong answer on pretest 4). I think that this is something unjust because if I had seen the WA4 I might have corrected my solution! I know that with this my program would have failed the system tests (or maybe not because that means changed tests, who knows what it would have been), but still — changing the pretests after the competition ends?
The same here. But I guess it's some mistake. Let's say these added tests are normal tests, not pretests. Then everything is ok, right? So it's only a matter of naming.
I think they are running pretest with train of size 1. This is not fair as it is clearly mentioned in the problem statement that train size can be 2 or more. Either rejudge this problem or cancel it.
Nothing reveals that they are testing size 1...
I am assuming that because my code didn't handle train size 1 case.
They are probably trying to detect how much the messed up pretests affected the whole competition to make a decision. Don't worry about those pretests, just wait for systest.
We updated tests and made pretests to be equal to tests. After it we rejudged all attempts and chosen the first passed pretests (that means system tests because they became equal). This trick helped to accept all submissions which are correct. As a side-effect you can see now "Wrong answer on pretest X" rather than before system tests you saw "Pretests passed". It means that your solution anyway would fail on system tests.
!!
Run for the hills!!!
было ли что-нибудь подобное за всю историю codeforces? на моей памяти так самый худший контест
Меня задача Е div2 устроила. Остальное не важно.
I got pretests passed during the contest for Div 1 B, but now it says that I failed pretest 8. So did the pretests change or something?
Atlast the systest !!! :|
Is there any change on pretest 8 on problem B div 1?
My code went WA and I think it's little unfair to regrade the pretest after the end of the contest, x(
Why the problem D which I passed the pretest before but I got a "Wrong on pretest 4" in the system test?
Testcases in contest were incorrect, so they were replaced.
so will it be unrated contest?
I hope no
Me too !!
I got a good rank after a long time. Now I'm sure this round will be unrated :P
So good problemset, so sad trouble..
In my opinion, the problems themselves were very good, but some of the statements required more scrutiny.
Also, yay — after two failed GCJs, one failed FBHCup and who-knows-how-many failed CF rounds — I didn't trip on 64-bit integers.
You code in C++. Why then you can't use #define int long long to prevent int overflows?
Because this is (in my opinion) not good style. Also, what if you want to define a potentially very large int vector? (Such that 4x as much would exceed the memory limit)
I had MLE only 2-3 times in total, and none of them was on the contest. They were because of algo, not because of the macro. Also, it's way too easy to get tripped with int overflow.
It's better to improve skill, rather than using hacks to hide your imperfection.
Btw, I can guarantee you that I have used > 1/2 memory limit of problems dozens of time, which would lead to MLE if I use #define int long long
Hacks? Oh, really? Competitive programming is about algorithms, not about paying attention to everything (and this "skill" can't be improved, I suppose).
Of course this skill can be improved. It is just 1 amongst dozens of stupid things that can make you fail stupidly, e.g. wrong array bounds, mixup variable names, forgot to memset... Train yourself to pay more attention will solve everything.
Actually, I avoided int overflow trap two times during last 4 contests, so it could be two another fails instead of wins. It's a large trap comparing with other ones. May be, I'm too old, but my attention is my greatest weakness(and, therefore, implementation, I like math problems) and I did not found it improved last two years.
"Next time be more careful" is worst conclusion ever you can draw from problem failed because of a bug. Better question is "What can I do to prevent this in future, so that I don't have to worry about this anymore?". I have created habits which prevent me from failing a problem for every particular reason you mentioned :).
And btw I am a huge fan of #define int long long and I can confirm that it saved me definitely much more times than it caused any harm.
Agree. So, I am trying to prevent bugs, and the best way is to don't allow the bug appear technically. For example, use long long macro or insert sync with stdio in your code template.
No, it's not as simple as what you put "next time be more careful". I believe in "training yourself in most difficult conditions, so you can become perfect". And IMO making yourself believe that you don't have to worry about basic stuff will just slowly make you lose the level of attention needed.
Of course, my belief is probably biased because I was trained by people who could write hundreds lines of code without any bug thanks to perfect attention & other people who could find bugs with just reading code (i.e. no printing stuff / debugger).
I simply don't believe that it could be trained, at least simply by writing more and more programs. Across 6 years of my experience in CP I managed to make less bugs, but that is because my programming skills improved a lot and I think my attention didn't improve at all.
Yeah, it can't be trained simply by writing more code, so we have tricks & habits for attention too :)
http://www.youtube.com/watch?v=Ahg6qcgoay4
That's the problem. People's attention is limited(especially mine) and majority of people just can't focus on big amount of things. I think, you and your trainers are among the minority. What you advice to do for all other people? Find a mistake and abandon to correct it forever? Such approach never will lead to perfection. I like to feel proud because of fast creative elegant solutions, not because of paying attention to tricky moments. I suppose, the majority of competitive programmers are the same. If you are going to play on attention you can find a lot of another games or sports.
I'm glad that this has sparked a constructive debate on approaches.
Honestly, I wasn't trying to say that all approaches other than mine are "wrong". I just find the presumption that whenever I write "int" I could as well have written "long long" to be wrong — exactly for the reasons I_love_Hoang_Yen given — and that's why I would never write that as part of a fixed template.
I even used to take the "more hacky" approach myself early on. Now I'm less of a competitive programmer, more like a computer scientist who likes to keep his algorithmic skills somewhat polished. :)
Interesting. I think my attention / focus on coding has been improving along competitions. In fact, once I told myself that I'll pay more attention to what I'm writing and not just think that whatever I write is going to pass, because it can lead to a lot of penalty during ACM-style contests, and I think it worked.
I've noticed that I have less trouble competing with a lot of activity around me than before after competing more often in such conditions (also, after generally competing more often). It's really that I pay more attention to what I'm doing and not to what joke someone around me is telling or how my place on the scoreboard could be changing.
I'd say it varies from person to person; some people may have an easier time training meta-thinking than others. And it definitely depends on what one's actually tried.
It's not a hack at all because everyone can use that even in ACM
Because of time and memory.
Long longs are much more fat and much more slow to process.
I have used this macro for a long time with C++. But then I decided to use C# and I wrote special "longificator" that substitutes all ints with longs int C# program. I had not problems with time and memory because of it with C++ and even with C#.
What's wrong with div 2C? Quite a lot of people(including me) got WA on main test 12... :|
I failed on that test because I didn't really remove the patients from the queue, resulting in that v_i decreases faster than it should. I fixed it by checking if the patient has been removed from the queue.
Did you use 64-bit integers (long longs) to store intermediate values?
No :| was that the reason?
Probably — the sum of all loudness levels could exceed the range of 32-bit integers.
That too. But you also did not remove children not from the beginning of the queue.
I have hacked 8 solutions which were not removing kids from the queue but tripped on 32-bit overflow myself :) Arghhh :)
Stupid me: noticed the possible overflow but decided to keep using
long
and bound the confidence decrease.However, I forgot the
+1
...You should remove patients from the queue when they cry, because then the crying from the cabinet can affect someone behind him, which was not affected before his removal.
Div1D was a nice problem! Thank you for these interesting problems.
What?? This contest will be rated?? Really?
Wow, the slower goes systesting, the faster goes the rating change!
in div 2 pC it says vi, di, pi (1 ≤ vi, di, pi ≤ 10^6)
whats the problem when i use int to store these numbers?
the problem is when u add 4000 numbers each up to 10^6 which is 4e9
The next time I compete, I'm going to get +4 rating.
The Volatility has reduced a lot. In a way a good thing as well. We wont loose our hard earned rating by a few bad performances.
first two-digit rank for me!
Why are there only 9 people mentioned as writers of this contest and not all 16? :D
It's crazy that I got a 'pretests passed' for Div2D during the contest and now what I see is that WA on pretest 4.
Anyone having the same problem?
MikeMirzayanov explained it.
Div 2. Problems A and D solved using regexes: A — 13557081, D — 13577562 (shorter version 13577591)
any editorial ?
Could someone give me D div 2 test 3 third testcase fully, I just can't understand what's wrong with my code, thanks in advance
Test on 2 3 0 ... s.. ... 3 3 AAA sBB CCC
And fix :3
I am happy to see that my relative movement is succeed in Div2.D .I just make the hero 3 steps/second ,and judge during the move:D
I wonder what the usage about the number of trains. = =
Link for editorial is invalid, it should be http://codeforces.net/blog/entry/20898 rather than http://codeforces.net/blog/entry/blog/entry/20898.
Fixed. Thanks.
¸NICE ROUND!!!!!!!!!!!!!!! VERY NICE PROBLEMS
I think alongside the contest, there should be another way to judge a person's ability or rating, not by the number the acmer accepted, but the number of hard problems the acmer accepted, or the average difficulties, one friend of mine is the best coder I ever see, he is not a quickhand, but he can always solve the hardest problem of a contest, his id is Los_Angelos_Laycurse ,you can checkout the problems he solved. for example http://codeforces.net/gym/100725/attachments Problem J, and his solve it.13485846
nice problems
Really nice Div1 E! Haven't solve it during the contest and figure out what's wrong in my solution now. Wait to submit it.Oops, WA on #5.Got it right finally.Just found I post these at a wrong post, LOL.