№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Название |
---|
Spent >10 minutes starting my computer and opening arena while found out the registration period is just over. Much frustrated orz
That's why you should not use windows
True bro, windows sucks
used linux, but still missed it ;(
Honestly, I would be happier had the same happened to me :P
Huh, those were not easy tasks :P. 500 is very nice, so sad I was not able to come up with final piece during contest. Btw, isn't 1000 just easy LP? Can LP solution be not integral?
They can.
Great, so this is not another stupid LP problem, that's consoling :D.
Actually algorithm of integer LP is same, just substantially harder to implement :)
And definitely slower, so there is little chance it can get AC :P
:) Does anybody know the solution of 1000?
1000 can be solved with this very simple algorithm based on network flow.
Let numi be the number of opens(left parentheses) lying on the path from node i to root. depi be the number of edges of the path from node i to root. Then bali = 2numi - depi is the balance i.e. the number of opens substract the number of closes(right parentheses).
So for a restriction of path , we have:
balu = balv
balw - balu ≥ 0, for any node w that lies on the path from u to v.
Why? Because if is open, then is close. So we needn't care about the LCA.
Besides, obviously depu + depv must be even.
Thus, we've got two kinds of restrictions:
OK, now let's build a graph. We know the maximal flow is equal to the minimal cut, so we'll just talk about the cut. For any node in the tree, we make n new vertices, and connect the source to the first vertex, and connect the last one to the sink with capacity ∞, and connect adjacent vertices with capacity 0(actually we don't connect them, it's just for better-understanding), then, we have to cut one edge, if we cut the edge connecting the k-th vertex and the (k + 1)-th vertex, then we consider that num of the tree node is k.
So for each edge connecting one node and its father. num of the node mustn't be smaller than its father's and mustn't be bigger than its father's by more than 1. If costopen is smaller, then we add the cost of open to the answer, and if the node's num is equal to its father we have to pay costclose - costopen, otherwise we'll do the similar thing.
So how to deal with those restrictions? For example, if numu ≤ numv - Δ, for all k, if k - Δ ≥ 0 then add an edge from the (k + 1)-th node of v to the (k - Δ + 1)-th node of u, or if k - Δ < 0, then numv ≠ Δ, we can simply add an edge from the k-th node of v to the (k + 1)-th node of v. All these edge have a capacity of ∞.
Finally, add the minimal cut of this graph, which equals the maximal flow, to the answer.
If you can't see the formulas, this is the text:
Why? Because if is open, then y \rightarrow x is close. So we needn't care about the LCA.
Besides, obviously depu + depv must be even.
Thus, we've got two kinds of restrictions:
(num_v — num_u) \ge ceil(\frac{dep_u — dep_v}{2})
(num_v — num_u) = \frac{dep_u — dep_v}{2}
I can't get why Codeforces can't demostrate it properly :(
What was the idea behind Problem 300? I was able to code a solution with runtime O(A+B+C), but it was too slow.
First idea that you want to count number of non triangles, instead of triangles. It can be proven that if A ≥ B ≥ C and A ≤ B + C then this number is f(A) + f(B) + f(C) - f(A - B) - f(A - C) - f(B - C) where f(X) = 0 + 1 + ... + X(X - 1) / 2
For C = 1, B = 3, A = 3 we got:
f(3) + f(3) + f(1) — f(0) — f(2) — f(2) = 6 + 6 + 0 — 0 — 1 — 1 = 10 non triangles, but it is almost 1*3*3 = 9 combinations of al possible length values...
Something wrong..
f(3) = 3
f(3) = 0 + 1 + ... + 3*(3-1)/2 = 0 + 1 + 2 + ... + 3 = 6 =)) LOL
"First idea that you want to count number of non triangles, instead of triangles." Seriously, there are only 2 sentences. Please don't downvote someone who is trying to help because you are so impatient you can't read more than 1 sentence (speaking to everyone).
But in my case number of non-triangles is MORE than maximum possible number of triple of lengths )))
Okay a = 1, b = 3, c = 3. Number of triples = 1*3*3 = 9.
Number of impossible = 6 as you calculated.
9 — 6 = 3.
Correct answer is 3.
Number of impossible triples = 6+6-1-1=10 is MORE than 9, as I calculated.
Ok I understand. You think f(x) = triangular number x. Actually f(x) = sum of first x-1 triangular numbers. So f(0) = 0, f(1) = 0, f(2) = 1, f(3) = 4, f(4) = 10 etc.
So f(3) + f(3) + f(1) — f(2) — f(2) — f(0) = 4 + 4 + 0 — 1 — 1 — 0 = 6.
9 — 6 = 3
Thank you!
My maths definitely needs improvement
Can anyone provide me a proof/hint (intuitive/mathematical) for this?
Interpolation of
[0, 0, 1, 4]
isf(x)=x(x+1)(x-1)/6
Let A<=B<=C. My solution is O(C-B) and it passed system test in 1.8s :|
In practice session though :(
How to solve 500?
The challenge phase, I don't hate you anymore. (I got to top40 thanks to one challenge)
How to solve 500p.?
I was first before challenge phase and had no opportunity to get points (only other solution in my room was correct) :(
I read anta's code, so I am smart now and can tell how to solve 500 ;p.
1) Bag B is heaviest for permutation P if for every prefix of P there is no bag C which contains more gems from that prefix than B.
2) If bags are unique then heaviest bag is unique
For every bag B you can enumerate possible prefixes P can contain so that they do not violate B being heaviest and by subset dp you can count how many such permutations exist. Then you need to sum it over all B and check if that is equal to 16!.
My approach was to check 10000 random permutations. I don't have a rigorous proof, but it seems that probability of false-positive / one iteration is at most 50/51.
Look here!
http://artofproblemsolving.com/community/c6h1248018_number_of_side_triplets_satisfying_an_inequality
EDIT1: Looks like he indeed deleted the topic. I'm glad I took the screenshot!
Also a screenshot in case he deletes it.
http://prntscr.com/b8nulc
Yeah I made that. Didn't expect anyone to reply in contest. And exactly that happened..
EDIT: If you regularly use AoPS, you would know that replies start turing in at least a day from making the post..
EDIT2: Post was made in contest. Just around when 10 minutes or so of coding phase remaining.
EDIT3: Checked carefully. Post was made 12 minutes before end of coding phase
Why do you need replies on AoPS, you could have waited for the editorial :P
Because that is a pure maths problem. And there can be much better discussion on a math forum. Either way, Topcoder problems are seldom discussed anywhere.
Legit.
Why wouldn't you wait one more hour in order to create that AoPS topic after TCO round? :)
Yeah, seems unfair. Topcoder admins could remove me if that seems more fair. Anyway, if my intent would have been to cheat, I wouldn't have posted it under my usual handle..
It's bad to intend to cheat. It's forbidden to cheat. You did the latter one, unfortunately.
"Yes, I asked for help in the Internet during the contest. I didn't expect the answer though, so it's fine, right?"
:>
I am not sure how one would expect someone on a forum to be able to solve a problem in 12 minutes, post the solution, and then me to be able to read it, understand it, and then code it. I honestly just wanted to know the solution(and was also thinking of getting some contrib on AoPS). I don't know if there is some way I could prove my innocence. :/
P.S. Already had a lot of contrib-- on CF. Please don't down vote and understand my view point. :/
Whispering: I think you just wanted to get the solution idea for hacking purpose, which could lead you to qualify for next rounds.
I have nothing to say. I just applaud the ability of CF community to be completely biased against someone and not even think about this from someone else's perspective and de motivate them completely. If I really just wanted to cheat, why would I do so at the end of the contest. Using my own fucking handle. But this'll also probably just get down voted, so its no use trying to explain. I am just sorry about this. I won't do something like this again. Thats all I can say. :/
It's just really saddening for me. All of this happened because of my impatience. Lesson learned, be patient and wait for end of contest. I guess I was just frustrated of being unable to solve anything. Anything and everything I did do and will do in the future will simply be labeled as cheating. Even though I had no such intents. I feel really sad.
I think you are great for apologizing publicly, you get my upvote :)
That's one of the lamest excuses I have ever heard xD
Correct me if I'm wrong, but it sounds like you think it's OK to post a problem from an active contest to a problem solving forum? Isn't that explicitly disallowed? From the topcoder rulebook:
Collaborating in any way with anyone else (member or not) during a rated event is considered cheating. This includes discussing problem statements or solutions between the time that the coding phase begins and the time that the challenge phase ends.
No I do not. I am sorry if this comes of as cheating. It is actually a clear violation of rules, so I should rather just be disqualified. But I just wanted to be clear that I did not intend to cheat. Nor did I mean to break any rules. AoPS would never have replies in less than 24 hours unless topic is really hot.
Check out LayCurse's 300 point solution. How can you write something out like that and not make a mistake? The lines aren't even the same structure where you just paste and change variable names.
I start to like those rounds.
Round 2A — solved nothing, hacked nothing, rating goes 1395 -> 1398
Round 2B — solved nothing, hacked nothing, rating goes 1398 -> 1402
How more do I need to become red? :D
Solved nothing, hacked nothing, 2606->2456
I fear that limit of that sequence is below red :P.
Can confirm. 1793 -> 1679 over the last two rounds.
I'm also solved nothing, hacked nothing, 2091 -> 2153....
There's even no any submission in my room(in parallel round).
Seriously though, quality of problems aside, isn't it a bad contest if there is only differentiation between 122 contestants (of 734)?
I would say "YES, it is a bad contest". But sometimes it is difficult to estimate difficulty. :). So sometimes it happens :)
And the first problem A proved to be simple — it's just (as posted by Egor above):
f(A) + f(B) + f(C) - f(A - B) - f(A - C) - f(B - C) where f(X) = 0 + 1 + ... + X(X - 1) / 2
How much simpler can it be? :) It's intuitive :)
There are a lot of hard problems with simple solutions. Anyway, I'm not saying the 300 was a bad problem. Quality of problems aside, the last two contests have only differentiated between the top 10% of participants.
I agree — it was a good problem. And problem A should be submitted (doesn't mean solved) by at least 50-75% of participants. Didn't work out this time. Ok, last two times.
For a regular SRM round — yes problems were too hard. But the main purpose of the contest was to choose top 40 to advance, and 500 people with 0 is OK.
It is defnitely better than 150 people with 300 and 500 solved, and the question is who codes faster.
Good point. But it is a rated round as well.
Why is it necessary for the easy problem to determine the top 40? For instance, in last year's round 2, the medium problems determined who advanced. More than half the participants were able to solve the easy. Not trying to pick a fight or anything — I'm just wondering why the format is so different this year.
I would agree with this one. The easy problem should be a bit simpler so that people at least have more time to attempt other problems. That a lot of people either ended up with no problem submitted or spent half of their time solving the easy one makes the round less enjoyable in my opinion. By the way, using the easy problem to determine who will advance clearly increase the importance of challenge phase, which should be avoided due to the randomness of room division.
I agree with this completely. There are 3 problems per contest and in both rounds qualification was mostly decided on the easiest one, it's both frustrating for many participants and a waste of good quality hard problems.
I think a decent target would be something like:
250 ~= 300 accepted submissions 500 ~= 60 accepted submissions 1000 ~= 10 accepted submissions
with big bonus points if only one or two people get all three. This would generally imply that whoever qualifies either solved 250 + 500 with some speed or gambled on the 1000 and won.
But in any case, (~100, ~10, ~0) is ridiculous.
Какая же потрата этот ваш топкодер последнее время.