tag:blogger.com,1999:blog-29632375.post8511296262051284470..comments2021-08-29T09:36:04.049-07:00Comments on vexorian's blog: Codeforces round #113 div2 (unofficial)Unknownnoreply@blogger.comBlogger6125tag:blogger.com,1999:blog-29632375.post-58555987469664213102012-03-24T17:21:25.489-07:002012-03-24T17:21:25.489-07:00Haha, no problem ^^Haha, no problem ^^Brunonoreply@blogger.comtag:blogger.com,1999:blog-29632375.post-32329569423646697012012-03-24T17:05:46.696-07:002012-03-24T17:05:46.696-07:00Oh sorry for not replying before. I didn't not...Oh sorry for not replying before. I didn't notice the notification. Not like I would have done much to help as I haven't solved the problem yet.vexoriannoreply@blogger.comtag:blogger.com,1999:blog-29632375.post-7827146887806843322012-03-24T17:01:40.903-07:002012-03-24T17:01:40.903-07:00Found the bug! It happens on the operation x>&g...Found the bug! It happens on the operation x>>y, if y is big it uses only the first 5 bits, so something like 100000 (base 2) wont make x equal 0!Brunonoreply@blogger.comtag:blogger.com,1999:blog-29632375.post-64011710516074061842012-03-24T07:06:26.701-07:002012-03-24T07:06:26.701-07:00You are right :)
Hey, could you help me on the pr...You are right :)<br /><br />Hey, could you help me on the problem D? I read at the editorial that is a dp problem (it only says that actually). So I tried the following dp:<br /><br />You have the current person and a mask that represents if the 2 sizes of shoes that this person can use are available (costumers are sorted by shoe size), so it will be a dp[10⁵][4] table.<br /><br />That is giving WA, maybe my approach is wrong? Here is my submission: http://codeforces.com/contest/166/submission/1400293<br /><br />Some said that it is solvable with greedy+matching, but it should lead to TLE, and some got ACC because the test cases are weak..<br /><br />Thank you!Brunonoreply@blogger.comtag:blogger.com,1999:blog-29632375.post-11658109391895156792012-03-23T12:31:49.740-07:002012-03-23T12:31:49.740-07:00Not sure which is really simpler. The solution tha...Not sure which is really simpler. The solution that just needs you to paste your matrix power code. Or that dp solution. Anyway, you can actually adapt that dp solution to have a 8*log(length) solution (2x2 matrix) as opposed to the 256*log(length) solution (4x4 matrix).vexorianhttp://vexorian.myopenid.com/noreply@blogger.comtag:blogger.com,1999:blog-29632375.post-4891085099055956312012-03-23T11:56:21.142-07:002012-03-23T11:56:21.142-07:00Hi, for problem E there is a simpler dp to solve i...Hi, for problem E there is a simpler dp to solve it:<br /><br />dp[0][i] = dp[1][i-1]*3<br />dp[1][i] = dp[0][i] + dp[1][i-1]*2<br /><br />Its like 'how many paths there are with lenght i ending at D (dp[0][i])' and 'how many paths there are with lenght i ending anywhere else but D (dp[1][i])'.Brunonoreply@blogger.com