Note: The contest was moved to Sunday in order to avoid collision with TCO Russia.
AtCoder Grand Contest 004 will be held on Sunday (time). The writer is sugim48.
Let's discuss problems after the contest.
№ | Пользователь | Рейтинг |
---|---|---|
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 |
Note: The contest was moved to Sunday in order to avoid collision with TCO Russia.
AtCoder Grand Contest 004 will be held on Sunday (time). The writer is sugim48.
Let's discuss problems after the contest.
Название |
---|
I just notice that the start time will be exactly same with TCO Russia Regional: http://tco16.topcoder.com/regional-events/tco16-russia/
That means Petr (and other people include myself) may not be able to participate.
Thank you for the information, the contest was rescheduled.
Thanks for moving! I will still be unable to participate since I will be on a plane from St Petersburg at the new time, but it should enable most of the other TCO event participants to take part.
Auto comment: topic has been updated by rng_58 (previous revision, new revision, compare).
Reminder that the Contest starts in < 5 hrs.
How to solve F (both for tree and not)?
Uploaded the editorial.
F looks very hard but after a single observation it looks much easier.
Did other people miss the condition N-1 <= M <= N in the problem? Then the problem goes from impossible (in general graph case) to almost exactly the same as the small subtask.
enot got 2200 in F while others got only 1500. Is this a bug?
1500 is partial point for the tree case.
Oh, I didn't notice that F has partial point Orz
http://pastebin.com/pWvL9CzW
Problem B. Fails for test cases 13 onwards. Please provide test cases where this fails.
Your answer is 32.
The right answer is 24:
thank you very much. :D
wow, no AC submissions D:
can anybody point out what i did wrong in these codes?
A: https://ideone.com/LaCRZi if even, we can divide them into equal parts, else the answer is minimum of a*b, a*c, b*c (i derived this formula)
B: https://ideone.com/L5wdSL
first find the slime tht has minimum energy to catch (call the energy mn), basically all other slimes can be catched with either a[i], or mn+x, then just sum the numbers
C: https://ideone.com/whuoRY
BFS, backtrack, then mark all used path nodes visited, BFS again...
if((a[0]%2==0)||(a[0]%2==0)||(a[0]%2==0))
The above line from your code for A doesn't look right, does it?
And why would your B and C solutions work? The logic is wrong in both.
oh damn, initially the variables were a,b,c. but converted them to arrays to sort easier... the fault is in me, cannot beleive i did not notice it even tho i code is short...
i get what i did wrong in B, but can i have countercase for C?
Btw. learn to stress-test your solution (run it on many random tests to find a counter test).
rng_58, can you please increase the stack size for Java? And probably also for Scala and Kotlin.
It is supposed to be 256MB (see stack limit section), do you think it works properly?
I guess it doesn't work, because my solution gets a runtime error in D unless I set the stack size manually to 16 Mb using the following:
Looks like mmaxio also had problems with the stack size during the contest.
BTW, another problem I faced with D is that my O(n) Java solution gets TLE, although it is almost identical to the accepted one by mmaxio... Considering that I use a pretty fast input reader, any ideas what is wrong with it?
In the editorial of B:
"if K = 2 and you need a slime of color 3, there are 3 ways to get it"
Why isn't just capturing a slime of color 3 a way? We can capture it without shifting anything! The editorial and problem statement isn't clear to me. Can someone please explain?
I didn't understand the editorial of B either...
Can anyone use an example to explain? Thanks a lot.
Here we consider a case where we cast exactly K magics. Of course it is possible to just captuer a slime of color 3, and this case is covered by K = 0.
Consider that you shift exactly 2 times. For slime i,
If you want to capture it directly, capture it after you shift 2 times.
If you want to get it from slime(i-1), capture slime(i-1) after you shift 1 times.
If you want to get it from slime(i-2), capture slime(i-2) before any shift.
If you fix the number of times you make a shift, the cost of shift is fixed. Therefore you only need to consider which kind of slime should you catch to get a slime of color i.
Hi!
Does someone have an idea why this is wrong on A ? http://pastebin.com/n5eZuxUq I spent 1h trying to figure out lol
I am not sure about the unsigned long long type but I don't see why it would be a problem
Thanks.
You are declaring A B C as integers and then multiplying them before casting them to unsigned long longs. ex: 999999999 999999999 999999999, your code prints out 808348673 while the answer should be 999999998000000001.
Try this: http://ideone.com/oDtVeg.
Thanks !
oh god 1h for that -_-
Btw, when you're solving a small problem that doesn't need the best performance you could also declare everything as int and add
At the begging of your code so that you don't have to deal with casting and all that.
Can anybody give example why greedy aproach doesn't work in D? I sorted all vertices by heights and then updated those vertices with depth more than K and updated children corresponding to the vertex..Link to my solution
Try test
8 2 1 1 2 3 3 3 3 3
Answer 1
Awesome! I just could not see that happening!! Thanks a lot!!!!