Search found 5 matches

Thu Jan 25, 2007 11:30 am
Forum: Volume 2 (200-299)
Topic: 210 - Concurrency Simulator
Replies: 16
Views: 5104

210 - Concurrency Simulator

Hi, I tried this problem today but got WA. I thought I implemented the rules of concurrency simulation described well, and I've already searched this forum for help / tricky parts as well as test datas generated by others. But I still can't find my problem is. I think it works well. So would you ple...
Mon Jan 01, 2007 2:53 pm
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 20522
i didn't find anything wrong in the base case of solve(k) Matrix solve(int k) { if(k==1) return m; Matrix ret=solve(k/2); Matrix pow=power(m,k/2); Matrix tmp=add(ret,mul(pow,ret)); if(k%2==1) { Matrix tt=mul(pow,pow); Matrix newpow=mul(tt,m); Matrix ans=add(tmp,newpow); return ans; } return tmp; } ...
Mon Jan 01, 2007 10:55 am
Forum: Volume 111 (11100-11199)
Topic: 11153 - Museums
Replies: 16
Views: 9567
Can you give me some further hint on this problem? I first thought to use the dynamic programming method that is similar to that in the Hamilton Path which runs in O(2^n*n^2) time but then found one can past a node several times... my searching + optimization got TLE.... wondering what is the correc...
Mon Jan 01, 2007 8:57 am
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 20522
Problem solved...so careless in the base case of solve(k).
Mon Jan 01, 2007 8:30 am
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 20522

11149 Power of Matrix WA

code removed because of getting accepted