Привет, Codeforces!
Отборочный этап чемпионата КРОК 2016 состоится в пятницу 18-го марта в 19:35 (московское время).
После нашего крайнего раунда, Yang Liu (desert97), Michael Kural (pi37) и я поняли, что мы еще не завязали с подготовкой раундов. Мы объединили усилия с Kevin Sun (ksun48) и Daniel Chiu (waterfalls) чтобы предложить еще один раунд для вас.
Этот раунд будет сразу для обоих дивизионов и будет состоять из 7 задач. Те из вас, кто прошел Квалификацию и зарегистрирован на Чемпионат примут участие в официальной редакции, остальные — в неофициальной (открытой для всех). Обе редакции будут рейтинговыми. Как всегда, вас ждет путешествие на тракторе в Бовинию с фермерско-алгоритмическими приключениями в компании фермера Джона, Бесси и ее лучшего друга Элси!
Перед стартом хочется поблагодарить GlebsHP за блестящую работу в роли координатора. Глеб, без тебя не было бы никакой надежды провести этот раунд! Так же наша благодарность MikeMirzayanov и всей команде Codeforces за создание клевых платформ Codeforces и Polygon. Наконец, мы безмерно благодарны abacadaea за помощь с идеями задач, а winger и AlexFetisov за прорешку раунда.
Формально, будут проведены два раунда на одном и том же комплекте задач (оба раунда рейтинговые):
- КРОК 2016 — Отборочный Раунд: для зарегистрированных на Чемпионат участников, кто прошел Квалификацию,
- КРОК 2016 — Отборочный Раунд (рейтинговая неофиц. редакция): для всех остальных.
Вы можете принять участие в Раунде официально, если на момент регистрации в нем вы зарегистрированы на Чемпионат и решили в Квалификации хотя бы одну задачу. Еще раз напомним, что независимо от формы участия, ваш рейтинг будет обновлен по результатам раунда. Единственная различие — в случае успешного выступления официальные лучшие 50 участников будут приглашены на Финал в Москву. Организация поездки (билеты, гостиница, виза и всё остальное) — это полностью забота финалистов. Участникам Финала КРОК-2016 будут покрыты транспортные расходы на сумму не более 10000 рублей (предполагается проезд обыкновенным купейным вагоном, либо, по согласованию, эконом-перелет самолетом). До 25-го марта необходимо будет подтвердить желание и возможность принять участие в Финале. Участники Финала будут бороться за призы:
- 1 место — 100000 рублей
- 2 местo — 70000 рублей
- 3 местo — 50000 рублей
Мы еще обновим пост информацией о разбалловке.
Надеемся, что вам понравятся задачи и наши коровоориентированные тексты. Удачи!
UPD3: Так как примерно 15 последних минут соревнования тестирующая система некорректно обрабатывала попытки по F в раунде "КРОК 2016 — Отборочный Раунд" (и это отдельная интересная история как так вышло), вы можете обжаловать ваше изменение рейтинга, если влияние этого инцидента на ваш результат велико. Если вы отсылали F в последние 15 минут и имеете веские аргументы почему некорректный вердикт (WA/RE на тесте 1) сильно повлиял на ваше место, то напишите MikeMirzayanov и ваше участие можно будет сделать нерейтинговым. Приносим извинения за эту накладку. Апелляцию надо написать до 02:59 20-го марта (московское время).
Hope for hard data structures!
Why am I getting so many downvotes? Does everyone else here just want math?
I guess it`s because of your quite egoistic message. Tastes differ, so you shouldnt write about things that are really loved by small piece of community. 5-10% wants hard data structures (about 40% hate it, so they downvote) and 99% wants nice problemset. P.S. hope you uderstood what i had wanted to say
Karma police, I see your work
I do hope too. Constructive-only problems are lame in most of cases.
Will ratings be updated differently for both editions ? Or final rating changes would be based on combined leader-board of both editions ?
I think it is unreasonable to rate differently for the two rounds.
Seems like they will rate differenly since there are two different contests. I agree that it is unreasonable, it is stupid to rate differently just for having opportunity to go finals or not!
Well, things like hacks and separate scoreboards mean that the contests are not the same. It's similar to the three versions of the 8VC finals.
Also yes problems should be sorted, why wouldn't they be?
I think it is not the same thing because in 8VC people seperated by their score at contest before, also there were different problemsets for each round.
MooooOOMOoOOOOMOoOOOoMOOoOooMOooOoOMOOooOOMOOoOoo
7 problems and 2 hours ? :(
Possibly not. We aren't sure about scoring or time yet. Please do not feel any angush over this! When the contest rolls around, we are sure that you will be amoosed by our puns.
You've got 10 hours before it begins and you can't provide the duration?
I'd really appreciate that info — it's hard to decide whether to compete or not without that information...
We expect that it will be 2 hours, maybe 2:30 hours if we decide the problems are on the hard side.
seems like problems are in easy side (?)
I think that there should be one contest and you should just select first 50 registered participants to go to the finals.
Oh thank god! A rated contest is here.
Btw, I registered, but I am unofficially participating. Will the round be rated for me then?
please read the blog post carefully once instead of asking so many questions and remaining confused all the time...this is not specifically for u.. for everybody in genereal...
I somehow missed this line, my bad :/
finally rated round.
В случае если кто-то из топ50 откажется от поездки на финал, будут ли приглашены дополнительные участники, занявшие последующие места?
Да.
lol now it becomes really messy !
the registration for IndiaHacks 2016 is started i registered in Div1 contest what would happen if i become Div2 in this contest ?
I postponed registration to IndiaHacks 2016 to make it clear.
nothing. thanks for reply and votes..
is there a way to submit my solution after the contest is finished ?
А если я в обоих зарегался, у меня рейтинг на x2 изменится?
I think the division of the contest in two is not a good idea.
Right now I can opt to register to either of the two contests. I could register to the Unofficial Round OR I could sign up to CROC Championship and then register to the Official Round, because I passed Qualifications. Basically, I can pick who I want to compete against. This isn't fair.
Couldn't you make a single contest and then filter (or just handpick) the top 50 participants that meet the requirements of participating in the Final Round?
Totally agree.
In the last minutes in the qualification round jqdai0815 re submitted a wrong code in first problem which passed the pretest so that fail and not be qualified and he now registered in the unofficially version of the Elimination round, while the official round has 7 LGM and many other great coders.
I do not mean that jqdai0815 can not compete well in the official version, we all know who jqdai0815 is, but I think is it not fair to have 2 separate versions of the contest and 2 separate standing which will make one of them easier than the other one, and become in the top 10 ( in the unofficially ) much easier than the official.
It's Too Difficu1t to FST.
I am wondering participating in which of the rounds will get him better rating change?
Hopefully I can handle these problems lol. Otherwise I guess I'll be dropping back to Newbie again.
Good luck
Могут ли авторы сказать, как они валят хеши в задаче С? Я выбирал не самые стандартные модули и не самые стандартные основания, но все равно большая часть валится на разных тестах. Я знаю методы подбора антитестов против конкретных параметров, но чтобы по случайным модулям валилось — вижу впервые. UPD: Не в тот пост, это про задачу С из квалификации.
Кажется, тут заслуга не авторов, а парадокса дней рождений. Вы используете единственный модуль порядка 109 на тесте, на котором у вас 105 различных ключей. Вероятность что какие-то два дадут коллизию очень приличная (больше, чем , например). Я даже как-то писал об этом развёрнутый комментарий: link.
согласен, для 100000 разных строк вероятность ОТСУТСТВИЯ коллизий: ( (2^32-1)/(2^32) ) ^ ( 100000^2 ) меньше 10%
Для 200000 разных строк вероятность ОТСУТСТВИЯ коллизий ( (2^32-1)/(2^32) ) ^ ( 200000^2 ) меньше 0,01%
I passed the qualification round
and now when I register for the Unofficial Edition I get a message :
please register to the official edition , but I don't want :3
why you don't make one contest ? :\
I think this is affecting the number of participants since only around 2500 people have registered so far in both rounds.
I passed the qualification round and I registered for the Unofficial Edition, no problem at all
may be because I registered for the official contest then canceled my registeration then tried to register for unofficial version
Seems like not much people are participating compare to other rounds,that means harder to climb rating Xp. But I will participate anyway. Hope this contest go well,nice and smooth for the round organizer and participants :)
will you merge the standings for calculate ratings ? or ratings will be calculated separately ?
My performance on Codeforces is getting worse:
I'm afraid today I can solve only 2 problems :((
But your rating was increasing except the last one :/ :/ :/
and his rank was decreasing except the last one :|
sometimes sequences are more complex than you think
I am hoping to see tourist surpass rating 4000.
Yes, I am hoping too)
I guess Codeforces should then think about adding another title named "tourist" :D
Legend says one day tourist will cause an integer overflow!
I sure hope I won't get a rating change smaller than -40! (that's an exclamation mark, not a factorial)
Спасибо за разбалловку!
not able to submit E
The best problemset I've seen on Codeforces during the last time.
Yes, many ways to solve a problem is a good stuff.
Thanks Zlobober! I'm glad you enjoyed our problems! :)
How is it I got WA on pretest #1 in problem F?
I did a custom invocation and the answer was OK. Does pretest 1 differ from the one in the statement?
Same problem, 16795467.
Got this response from jury:
" We're really sorry, somehow the system broke in the last 5 or so minutes. It is accidentally running your code on G instead of F. Gleb is busy right now with other issues and we can't do anything about it.
We really apologize. :("
Ok, then if my solution is indeed correct, they should run it on system test and I should get the score for the problem. The same for all contestants who submitted it and got WA on pretest #1.
Totally agree with you. I'm really surprised and frustrated about the fact that there wasn't some broadcast message about this problem — they clearly knew about it before I asked a question. That way me (and other people with the same problem) could at least spend last minutes doing something useful.
Phew, that doesn't make my solution incorrect (unless it gave correct answers on the pretests of G, which is negligible :D).
But for some people, they may be confused about the testing result and do useless things.
They missed one or more chances to check their codes on pretests, which may be helpful to fix some small bugs.
As for me, if the pretests ran well, I may be possible to fix "ans" to "(ans+mod)%mod" to avoid printing negative numbers. :(
For me — RE: 16795457
The same.
Please, read UPD3. I'm sorry about it, it's my fault.
Systest when?
It seems there are some problem with the problem F.
Brb, posting that picture of a button with "START SYSTEST" for tons of contribution.
3 WA's on 3rd question. Is ternary search the solution? Also for 4th question, finding longest acyclic path in a dag and binary search? Would this work?
For 3rd question, I used a sliding window for O(N) time. I'm not sure how ternary search would work.
For the fourth, I binary searched until the graph was a valid one (that there was a valid ordering of nodes), but I think the way I checked graphs might be wrong. I found the winner of the graph (node without any parents) and continuously found the next best rapper.
I got stuck on D for ~20 minutes because of a bug in my binary search T_T.
I think you can check if unique ordering appears by searching for a hamiliton graph on that DAG, which equals topo sort while you can never find more than one node to remove each time.
4-th: no binsearch. Longest path + review edges and stop when all edges on the path viewed
Seems like tourist is not going to get his 4k rating. UPD: He is. UPD2: He isn't. :(
You know, he's the master of last minute submissions
He is.
WA66 :(
How to do E?
Hint: if you want to count the numbers of distinct subsequences, you should make something like . Where is number of distinct subsequences ending with character c which came last to the end of string.
See the second accepted answer here http://stackoverflow.com/questions/5151483/how-to-find-the-number-of-distinct-subsequences-of-a-string
Now, in our case, we had to apply a simple greedy for filling the extra characters. At each step, we will put the character from the alphabet size k, which had occurred earliest (i.e. if last[c] denotes last occurrence of character c, then the character c with minimum(last[c]).
Do you pick the earliest character to minimise the loss from
dp[last[s[i]] - 1]
?Yes, yes. Precisely.
Thanks for the link. :)
You must be kidding...
Windows 10... You must be kidding...
Opera... You must be kidding...
"You must be kidding..." Yeah I must be kidding...
Thanks for sharing this screenshot. Through this I came to know about NBHEXT
Can robot rapping ordering competition be solved with dsu? :(
you can find who is the winner with dsu but i dont think u can solve the whole problem
Found the mistake. Gotta upsolve :)
I don't think so, because dsu assumes undirected edges, and the problem reduces to whether for a subset of the edges E, for each pair i, j of vertices either path exists i → j or j → i. The trouble with this of course, is a set of edges like , where dsu will conclude ok, but actually we don't know which if b or c is better.
I found the mistake. Gotta upsolve :)
I don't understand, why would the values in the two DSU values be the same for a graph where there exists an ordering? Do the values not depend on the way you break ties between two components with the same size when you merge them? And hence they could be different even for a series of matches which determine an ordering.
Yeah that's at least one of the mistakes :)
It can be solved with binary search+topological sort in NlogN.
You don't need binary search, actually -- once you sort the contestants with topological sort, the only edges you care about are edges between contestant number i and contestant number i+1 (in the ordered list). The number you should output is then the index of the last edge of this form.
my solution using longest path is just O(V+E) (for the problem's limits = O(V))
How did you do it without binary search ??
find longest path (O(V+E)) and then review all egdes (O(E)) until they construct the longest path I found
At the end of the match, I received a message saying that your solution has been hacked or resubmitted. It had killed me until I realized after refreshing page a lot of times that, not my solution, but the solution I was viewing was hacked or resubmitted.
Something weird just happened, i sent my F code. it was correct for first 2 test. But i got wrong answer in pretest 1. Are you guys sure there is a checker?
Yeah, the same thing happened to me. I think there's a problem there... I got correct answer in custom invocation too.
At first I got TLE in Test 6, so I decided to optimize and submit again, only to get WA on pretest 1. I was like " What the...?! ". Maybe they have to recheck that...
+1, same problem. Pretests can theoretically be different from samples, but why then don't we have minuses in the scoreboard?
Submissions that fail on pretest 1 are not counted in the scoreboard, right?
Yes
The same. Somebody should investigate it.
I think you forgot to delete blank line end of the output.
It has to be not necessary!
It is strange, but it seems like this problem appears only in the end of contest. Nobody passes this problem after 01:47.
They said that the problems appeared in the last minutes. My first submission 1:48:57.
Yes, I have read that. I left this comment before Gleb told us about their problems.
I submitted "cout << 5 << endl; cout << 16 << endl;" in 01:56:56, but this code get WA on pretest1....
Please, read UPD3. I'm sorry about it, it's my fault.
Давай tourist 4000+
i solved C with ternary search can someone propose an alternative approach ?
I applied sliding window and then binary search. I think I did some overkill with my bs as I did it two times for odd length and four times for even length, but wanted to be absolutely sure... Lets see what happens after the system testing .. an overkill or an overwaste :v
The key is just to try ALL possible farmer's positions and for each of them cows' positions are easy to compute with a window sliding along with farmer's position
I used binary search on covered range r. Then for each possible position i of the farmer in the array I checked if [i-r, i+r] could accommodate k cows and the farmer. With an array of sums it's possible to check each position in O(1).
How you used ternary search?
This is my approach-prefix sum of zeroes from left to right. Fill Closest_left_0_of_i array and Closest_right_0_of_i array, then use sliding window(or simply do an l=upper_bound() on zeroes array for each i where zeroes[i]>=k+1) to find the range [l,(r=i)] where they can fit, find midpoint of this range, and check the
min( max(|l-Closest_left_0_of_i[mid]|,|r-Closest_left_0_of_i[mid]|),max(|l-Closest_right_0_of_i[mid]|,|r-Closest_right_0_of_i[mid]|).
Take minimum over all i, and also for mid+1 in cases where l+r is odd.
ps: Formatting here is a little annoying. One can't simply get to a new line with return alone.
let "lf" be the left most room has been booked and "rh" right most and c the place of owner of cows.so the answer of problem( f(c) ) will be max( c — lf , rh — c).
next[i] means next 0 room for room i.(left to right)
first "lf" is the first 0 and "rh" is (k+1)th 0 and c is "lf" and do it until "rh" overflows:
so you can calculate the answer with O(N)
I almost wrote your described solution , but I'm not sure it pass SysTest. code
Isn't worst case complexity O(N^2)?
no! c , lf and rh iterate each element of array just once! and each turn lf and rh increase so it at worse 3*n that it's O(n)
The last two minutes were very intense... we got the only two "correct" submissions for the last problem during that short time. :P Anyway, this contest was a huge fail for me. :/
I have a query. If I submit a solution and it gets WA in pretest in test 2 and test 2 is included in samples. Will 100 points still be detected from my score?
Yes.
Thank you :)
In this case you get a 50 points penalty.
I was trying to hack this solution for problem 645C - Enduring Exodus
My hope was on "v.erase(v.begin(), v.begin() + 1);"
Is it true, that std::vector can erase first element faster than in O(size) time? Otherwise, I don't know why test
100000 50000
0000...000
didn't fail this solution... =(
Can anyone pls help?
It is similar to v.pop_front(), so it does`nt waste linear time
But std::vector doesn't have pop_front() method
Bet on
#define vector deque
magicTourist has now mastered the art of mind games! Again a last minute submission.
Пытался сделать взлом по задаче С, TL в условии 1с, в логе взлома написано — Time:1450, вердикт — Неудачная попытка взлома
В данный момент в условии ТЛ 2с.
About problem F, I think that all contestants who submitted a correct solution but got WA on Pretest 1 should get the score for the problem.
Please check who submitted the problem and got WA #1, then run those solution with full test case and see if they get correct answers within the time limit. If so, all that people should get score for the problem. It would be really unfair otherwise.
We are sorry but systesting will be delayed for a while. At the end of the contest we've noticed some technical issues that affected some participants. System testing and rating change is delayed until the full investigation of this case.
We decided to make the tomorrow round combined for both divisions, so you should be able to start to register.
We apologize for the inconvenience.
A similar thing happened a few months ago, where the checker was wrong for one single test case. It was then decided that said test case should be ignored, and all solutions that got correct answer in the remaining tests got Accepted in the end.
I think a similar course of action has to be taken here: All solutions submitted during the last 5 minutes should be run on Full Test Set for Problem F, and those who pass System Test should get the score for the problem. In case a user submitted many solutions with WA #1, I believe the first correct solution should be considered in order to minimize penalty.
I don't know if all this can be done, I'm not very familiar with Codeforces system inner working, but it would be great if you could do it. Let's hope for the best :)
Wrong answers on Pretest 1 don't count against your score anyways. =)
No, but some users might have submitted their last solution many minutes later because they got WA #1, when actually the first solution was indeed correct.
Oh yes, good call, you are right! I'm sure they'll take that into account.
Estimated time till start of system test?
this is exactly codeforces tradition; saying that but then not updating anything
Auto comment: topic has been updated by GlebsHP (previous revision, new revision, compare).
Pending system testing, same old story :3
this is the fourth time in a row for div1 as far as I remember
Can somebody explain me problem D? I had only O(N^2) idea and then i stucked.
Binary search on the number of edges and do toposort on it!
it's easier to do dp to find longest path and check if the length is N, instead of toposort
kingofnumbers You are saying that Hamiltonian path problem is easier than topological sorting :P
In a DAG it is :P
Oh, yes, true. My mistake. I thought of generalized versions.
Alternatively, do toposort on the final graph and see when the last edge was added that connected two vertices that were adjacent in the toposort.
i have done exactly this .. getting wa on pretest 6 tho.. could u have a look at my submssion once pls! http://ideone.com/sMWkUO
Binary search the answer.
binary search on answer. To check whether an answer is posible or not , just add those edges and see if a unique topological sort exists or not.
Actually it's possible to solve it without binary search.
Check if all matches give you unique answer. If not, print -1.
If order is unique, let's assume that robot with index a_0 is better than one with index a_1, which is better than one with index a_2 etc.
Create set {{a0, a1}, {a1, a2}, ....}
Iterate through all matches and erase current match from set (if present).
As soon as set is empty, we know the order.
I didn't use binary search. I did a topological sort and then checked the maximum value of edges among consecutive vertices in toposort. Values of edges are index of match.
My idea for D (couldnt implement it tho):
Add all edges in the graph, then check if only 1 vertex has in-degree 0 (lets call it source). If there is no source or there are multiple sources, answer is -1.
Else, find farthest vertex from source (lets call it sink) using dp. If the distance from source to sink is N-1 then print the greatest edge in the path, else print -1
Is this correct?
How are you finding k this way? You're basically checking if answer is not -1. Please explain, I think I misunderstood you.
If the answer is not -1 , you can reconstruct the path from source (robot with greatest strength) to sink (robot with smallest strength), and check the index of all edges in this path. The answer is the edge with greater index.
Got it! Since there can't be more than 1 edge with same u and v, and transitive property holds true, we can do this, because there can be at most one path with n-1 edges. Thank you for explaining :)
Finally solved it with topological ordering.
Could you please explain how to find the longest path from source to sink? It's not the first problem I couldn't solve because I can't think of a way to do it.
This will get TLE. I then used topologial ordering to solve this(queueing 0-indegree vertices in a loop, and removing these vertices from graph(obviously their edges will go too) ).
If you label the edges by their index, the value of k will be the greatest edge on the path with the most edges.
lol is solved D with binsearch + something like dijkstra or prim so it's O(nlog2n) not sure if it passes
"something like dijkstra or prim" should be topological sorting, I suppose.
yes u r right :)
То чувство, когда заметил #define int long long
If it was some problems with the system testing, does this round remain rated ?
What is wrong in this solution for problem D? I used binary search + topological sort. Verdict : Wrong answer on pretest 11. My Code
As I can see, your isDist returns true iff there are no cycles? E.g. consider test 4 3 1 2 1 3 1 4 It looks to me your code will not output -1 though it should.
My code give output "-1" and i think it's correct.In my isDist function when i'm doing topological sort,if i find more than 1 element in queue that means we can choose next element in more than one ways.So the topological sort must not be unique.So i return false.
I made 6 submissions by F and got 6 WA1. Now all my submissions are passed. Will you ignore my last 5 submissions?
UPD: Thanks, they are ignored.
I think, jury should system test all WA#1 submissions and select the first passed (if there are such submits :D) as the final result.
I agree. In that case there will be some participants who failed the problem (like muratt below). They will ask for unrated round.
Yes, despite of the time of the issue (1:47) it has a big influence to results. You would have been able to check/debug your code, challenge somebody or even solve another problem. I got WA#1 (now Pretests Passed) at 1:47:30 and wasted 12 minutes, while rng_58 solved E at 0:09... (however, unfortunately I'm not rng :D )
I think that about everyone who passed F will want rated round. Actually I think they will do what you said and ask for those who wants unrated round individually. On my mind it will be the best solution.
But another problem is that this round is the elimination round to the CROC finals. Anyway we should wait for the decision of the administration.
Is it possible to make the round unrated only for those affected by the problem?
I, for instance, failed problem F because of TLE, but I believe I still want the round to be rated because I did pretty good anyway.
I remember some such rounds. Let's wait for the decision of administration.
What if participant found a bug, that does not appear in pretests? And resubmitted his solution?
I think he means the first solution that passes system test
Passed system tests, not pretests.
Ok. Sorry. Didn't notice
Such way allows to fix all bugs or speed up with no penalty, which is not honest too. Anyway, seems like there is no way to solve this issue absolutely honest.
After F's judged again i got WA in pretest 5. I found a bug after ~10 sec after WA
Out of curiosity, what would your rank (approx.) be if it passed?
~35
So you (possibly) lost a place in the final round...
Yep :(
Or not. Since you failed a more valuable problem.
Now i feel better :D
Similar situation — my two WA#1's changed to TLE#7's; which can be trivially fixed by removing redundant "% mod" in the inner cycle. (actually, an interesting question why it takes 8 seconds on server — locally it was below 2 seconds even with this redundant mod (and "Run on server" functionality wasn't working in the last 5 minutes); does it mean that GCC compiler is actually GCC32?)
Yes, it is. Welcome to codeforces in 2016.
Solution for problem c: First precompute in o(n) for each place x "how many cows can I allocate if i own all places from 0 to x inclusive?" Now we have the capacity to ask in 0(1) how much cows I can allocate if I own places from any (a,b) just getting P[b]-P[a-1]. And to actually solve the problem we do a binary search "can I allocate cows making max distance to y?" We can answer this question in o(n). Test each position for the farmer's place and test if the amount of cows from the position -y to the position+y fits in k.
Solution for problem c:
First compute in o(n) for each room x "how many cows can I allocate if I occupy all places [0,x] inclusive?" store them as P[x]
Now we have the capacity to ask in 0(1) how many cows I can allocate if I own places from any [a,b] if we calculate P[b] - P[a - 1].
And to actually solve the problem we do a binary search can I allocate cows making max distance of y? We can answer this question in o(n). Test each position for the farmer's place (called W) checking if the amount of cows in the range [W - y, W + y] is higher or equal than k+1.
I am waiting for one day that contests come without delay :-"
What is the hack test for B? I solved it, buy I can't see some 'tricky' tests...
Answer doesn't fit in an int, that's how I was hacked.
Enable upsolving please!
Do you forget to give permission to see other's solutions after the contest? If not why is it so delayed? This was the case for the last contest as well.
дорешать задачи нельзя?
Забавная вещь. У меня С прошла претесты. Судя по вердиктам(ВА на претесте 10) в комнате, в этой задаче было не меньше 10 претестов. На систестах у меня С упала на тесте 10! Решение Это из-за того что у меня есть переменная j вне цикла и также есть переменная j в цикле for(;;)?
UPD: Оказывается тест 10 на систестах и претест 10 отличаются.
UPD2: Решено, там были баги в индексах.
Seriously man! You don't change ratings, you don't let us upsolve, just sitting here refreshing cause too fresh to go to sleep. Stop wasting my time
I know, right?! It's killing me waiting, just tell us something!
So jqdai0815 was able to solve all problems in just 1:24 , this guy is the next big thing.
It seems like the ratings are finally updated! tourist got Problem G wrong! Petr went up 181 points and jqdai0815 went up 137 points, while tourist's rating went up, however only 14 points. It would have been interesting to see if these would be different if jqdai0815 had competed in contest as tourist and Petr...
Я решил сделать рискованную попытку по задаче С, не доказав почему мое решение будет работать. Оно зашло. Помогите пожалуйста разобраться, почему это: http://codeforces.net/contest/645/submission/16800705 работает. Я ищу указателем, куда могу поставить вторую корову, а потом беру медиану между номером нуля первой коровой и нуля второй коровы и смотрю все нули, номер которых отличается не более чем на sqrt(n) от медианы.
Ну понятно, что это решение некорректно. Вокруг медианы не всегда будет оптимальный ответ. Тест, на котором это упадёт устроен например так:
'0'*49998 + '10' + '1'*499998 + '0'
Медиана в такой строке будет лежать около элемента 25000, блуждать вокруг неё нам не поможет. Конкретно ваше решение на этом тесте даёт неправильный ответ.
My submission got AC, but i found test, where my code failed
Problem : 645D - Robot Rapping Results Report
7 6
1 2
2 3
3 4
4 5
3 6
6 7
My output: 6
Right answer: -1
Code : 16818709
LOL, my solution(16818709) doesn't work on test:
3 2
1 2
1 3
My output : 2
Right answer : -1
WHAT???? HOW???
...very good tests...
Very poor test cases! Such solutions should not get AC! LOL ^_^
Serious question: does the final round have English problem statements?
Same question. This is what I found in the announcement page:
"The official language of the competition is Russian.".
But I think if there will also be a parallel round they will also have the statements in English.
No. I mean the official round. The availability of English statements in final round will affect my decision of going to Moscow or not.
It will be problem statements in English too. But I'd like to remind that your trip is completely on you (including visa, tickets, hotel booking and all other routine). For example, I do not think CROC can send you official invitation for visa, because it is formal process in Russia (including registration in special bureaucratic institution). In 2013 (or 2012?) rng_58 visited Finals and we were excited his visit. Hope to see foreigners on the Finals this year :-)