Tomorow , 11 april TCO 2015 Round1A will take place ,
http://tco15.topcoder.com/algorithm/schedule/
time-date :
good luck to all the participants !!!
ps : how do i register to it ? its the same like any regular srm?
# | User | Rating |
---|---|---|
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 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Tomorow , 11 april TCO 2015 Round1A will take place ,
http://tco15.topcoder.com/algorithm/schedule/
time-date :
good luck to all the participants !!!
ps : how do i register to it ? its the same like any regular srm?
Name |
---|
Yes, it runs exactly like an SRM. It's still a match, just not a single-round one :D
so registration starts five minutes before round, right?
RIP English; it should start 3 hours before and end 5 minutes before the round. I guess.
codeforces is unnecessary
You know what is unnecessary? Spam comments. (as in: comments that are unrelated to the topic of the blog post)
When spam appears, downvotes are necessary.
Does anyone know how exactly byes work this year? If I am among 250 top rated members, does it mean that I automatically advance to round 2 and I cannot take part in Round 1A?
If yes, will there be any parallel round?
Perhaps you'd better ask in this TC forum thread.
Can Division 2 competitors in TopCoder register for TCO 15?
Yes. It's for everyone.
Is it rated?
rated?
Yes it is.
I'm new to Topcoder. So, can anybody tell, how to hack here (is it similar to Codeforces)
Hacking round (Challenge phase) starts five minutes after coding phase and lasts 15 minutes.
I can't register. It said registration was by invitation only. Did anyone meet the same problem?
I did, yes. I just tried to register.
and me
You get a bye to Round 2, you don't need to participate in Round 1 ;)
http://apps.topcoder.com/forums/?module=Thread&threadID=852308&start=0&mc=7#2004386
Does anyone have problems with opening web-site (http://topcoder.com/tc) or arena? I can't enter. Thanks.
broadcast after the round:
Any positive score advances to round 2. Congratulations to all advancers!
lol ... even easier than gcj prelims. (I only solved 250. I don't feel that I should advance).
What is the solution for 1000?
Hall's theorem. Then just check every subset of one side of the graph.
So, the best overall way of how I could have solved it is by typing "bipartite graph perfect matching conditions" into Google. Hall's theorem comes up a lot on the first page.
I guess that's an important skill too: intuition about when to go to the library.
I converted the problem into something to do with the structural rank of the nxn matrix, then got stuck in that idea and fell asleep.
Yyyyy, man, Hall's theorem is the first thing one should learn after getting know what a "matching" is. It is absolutely basic theorem when dealing with matching and you dare to say that main difficulty was to google it >_>...
Judging by the voting pattern, my guess is you have 7 socks.
I think many people learn new stuff when they see a problem that uses it. I've probably solved more than hundred matching / flow problems but this is the first one that I used Hall's theorem, so I don't find this surprising at all..
Another keyword is a constricted set.
Any cool solutions for the first problem with bigger constraints?
If the range is long enough (10^10 is plenty), the answer is 10. Otherwise use brute force. This is an O(1) solution for the general case. Does that count as "cool"? :)
Oh okay, 10^20 is a lot. Instead you can construct all reachable sets of digits like this: go from the left to the right, remember the set of digits you already used, and whether you match the prefix of L so far, the prefix of R so far, or are already somewhere inbetween. (In the first two cases the set of digits you can use next is restricted.) Then do the less-brute force step in (2^10)^2 to find the best solution. (Disclaimer: I haven't tried actually implementing it.)
I've implemented your second approach during the contest, but with brute force instead of DP, but the idea is clear here. But DP doesn't seem to be cool :p
If the range is long enough (10^10 is plenty), the answer is 10. Otherwise use brute force.
What do you call "brute force" here? Is it fast enough? I am looking for solution which would work for some giant constraints, arbitrary numeral system, etc.
You kind of missed my first point. What I tried to say is that this problem is cool because all large instances are actually very easy, and you have to solve only the small ones. That is an unusual property.
If you skip that optimization and always run the solution I sketched in the second paragraph, its time complexity will be O(n2^b + 4^b), if L and R are n-digit numbers and we are solving the problem in base b. In particular, this is fast enough for huge numbers and base 10.
Actually you can do second part in O(2b * b) -- just push numbers to all submasks cutting bit by bit.
cannot prove it, but my thought is like this:
for each bitmask 0 ... 2^10-1 (representing digits) find the smallest number in [L, R] that has the corresponding digits. find next number with those digits (and that is not next_permutation) and check if it is in [L, R].
BTW, on 250, this solution also passed:
For each i in [L,R] and each j in [i+1,i+1000], ans = max(ans,shared_digits(i,j))
Even replacing 1000 with 100 still passes :P
Why 100, I tried with 9 in the contest. The logic was to swap last two digits and get all the matched characters. There are many flaws in that. Can you prove why 100 is sufficient?
Sorry, I cannot prove it. The main idea reason I thought it would work is for swapping the last two digits as you said (and catching a couple other things). 9 is only sufficient for swapping the last two digits if those digits are 45->54 though, like 37-73 requires a lot more.
Thanks.
Hey, can someone explain how the 250 point problem has to be done?
Here is my idea (passed)
first , given two numbers how can i find their similarity?
Assign to both number a list of 10 bits , (bit number i is one if the digit appears at least once in the given number otherwise its 0) ;
One can see that this list can be stored using an integer <2^10 using binary representation;
Now you just iterate from L to R and for each number you brute-force (using backtracking) any combination of its digits (one number can have at most 5 digits) and then you check whether the resulting bit-mask has appeared before in some past value.
How to solve 500?
Notice that if two tokens are ever on the same square, they will continue to be on the same square for the remaining turns, so a sufficient and necessary condition for two tokens to be on different squares after any of 1, 2, ..., K turns is for them to be on different squares after K turns.
Then, find, for each square s, where a token on that square would be after K turns. Call this square out(s). For a set a1, a2, ..., ai of squares such that out(ai) = s for all i, at most one of them can have a token, so multiply the final answer by i + 1. Do this for all s to finish.
One implementation detail is to find out(s) without doing a dfs of depth K ≤ 109. You can note that there must be a cycle after at most N turns. From here, either do something like K = min(K, N + 1) or do cycle detection (keep track of last_visited for each square).
Thanks!!
The last part can also be solved using the same principle for finding the lca of a tree. Pre calculate the distance between every power of 2 up to 2 ^ 30 and for each token its final position can be calculated in O(logN).