[269 ]Counting Patterns ,TLE
Posted: Fri Feb 06, 2004 4:40 pm
I got TLE in this problem ,what's the algo for it,just only burte force?
Make sure that your algorithm is fantastic enough
I'm not sure how good you are at programming, but this question has a VERY VERY low submission count (70+) and only 16 people got it correct.. so unless you are really quite experienced at brute force, you shouldn't be too worried if you cannot solve it within time limit.zizi wrote:wat's smart burte force
Code: Select all
1 11
2 10
3 9
4 8
5 7
6 6
7 5
8 4
9 3
10 2
11 1
Code: Select all
1 3
3 0
2 2
3 3
3 4
4 3
Code: Select all
1
(0)
1
(0,0,0)
3
(0,0)
(1,-1)
(2,-2)
6
(0,0,0)
(1,0,-1)
(2,-1,-1)
(2,0,-2)
(3,-1,-2)
(3,0,-3)
9
(0,0,0)
(1,0,-1)
(2,-1,-1)
(2,0,-2)
(3,-1,-2)
(3,0,-3)
(4,-2,-2)
(4,-1,-3)
(4,0,-4)
30
(0,0,0,0)
(1,-1,1,-1)
(1,0,-1,0)
(1,0,0,-1)
(1,1,-1,-1)
(2,-2,2,-2)
(2,-1,0,-1)
(2,-1,1,-2)
(2,0,-2,0)
(2,0,-1,-1)
(2,0,0,-2)
(2,1,-2,-1)
(2,1,-1,-2)
(2,2,-2,-2)
(3,-3,3,-3)
(3,-2,1,-2)
(3,-2,2,-3)
(3,-1,-1,-1)
(3,-1,0,-2)
(3,-1,1,-3)
(3,0,-3,0)
(3,0,-2,-1)
(3,0,-1,-2)
(3,0,0,-3)
(3,1,-3,-1)
(3,1,-2,-2)
(3,1,-1,-3)
(3,2,-3,-2)
(3,2,-2,-3)
(3,3,-3,-3)
Code: Select all
5 5
5 4
7 3
3 7
8 3
Code: Select all
483
228
2281
20
13023
Code: Select all
(2, 0, -1, -1) --rule(a)--> (0, -1, -1, 2) --rule(b)--> (2, -1, -1, 0)