Hi all,
I'm trying to solve the problem [1] through backtracking, but it is timing out. Does anyone have ideas for solving it? I couldn't devise a dynamic programming solution.
Random thoughts:
- A minimal cover S is a subset of vertices such that all other vertex not in S are adjacent to someone ...
Search found 4 matches
- Tue Sep 14, 2010 2:22 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11825 - Hackers' Crackdown
- Replies: 5
- Views: 5024
- Thu Dec 27, 2007 8:48 pm
- Forum: Bugs and suggestions
- Topic: Cannot logout?
- Replies: 2
- Views: 2101
- Fri Jul 20, 2007 2:21 am
- Forum: Volume 101 (10100-10199)
- Topic: 10190 - Divide, But Not Quite Conquer!
- Replies: 105
- Views: 39093
I'm confused when we have a sequence of length 1.
When n = 1 and any m, shouldn't we print :
This sequence does not violate any rule, because k = 1:
1) a[1] = 1 and 1 < i <= 1. since there's no such i, that's ok.
2) 1 <= i < 1 the same as above.
3) a[1], also ok.
But I was getting wa when assuming this...
Could someone explain me?
Code: Select all
1
1) a[1] = 1 and 1 < i <= 1. since there's no such i, that's ok.
2) 1 <= i < 1 the same as above.
3) a[1], also ok.
But I was getting wa when assuming this...
Could someone explain me?
- Mon Feb 26, 2007 4:39 am
- Forum: Volume 7 (700-799)
- Topic: 743 - The MTM Machine
- Replies: 12
- Views: 9068
Yeah, I think
should output
Rule 3 says you have to do Y2Y, and Y is a product from a number X. So the recursion is necessary.
If rule 2 required recursion, I think it should state something like this:
2X produces Y where X produces Y.
Code: Select all
2222
Code: Select all
222
If rule 2 required recursion, I think it should state something like this:
2X produces Y where X produces Y.