F[n] = number of ways to tile a 4-by-n grid
G[n] = number of ways to tile a 4-by-n grid with top-right and bottom-right
squares uncovered
H[n] = number of ways to tile a 4-by-n grid with bottom-right 2
squares uncovered
= number of ways to tile a 4-by-n grid with
http://groups.google.com/group/algogeeks/browse_thread/thread/c678b320891bbaa1/1646f2fe7d2c6879?hl=enlnk=gstq=Spoj+Domino+Tiling+#1646f2fe7d2c6879
http://groups.google.com/group/algogeeks/browse_thread/thread/c678b320891bbaa1/1646f2fe7d2c6879?hl=enlnk=gstq=Spoj+Domino+Tiling+#1646f2fe7d2c6879
by
that we all know we have to divide problem into smaller sub problems in dp
? but how u made those recurrences ?
On Sat, Apr 14, 2012 at 8:51 PM, shady sinv...@gmail.com wrote:
anyone ?
On Fri, Apr 13, 2012 at 12:09 PM, UTKARSH SRIVASTAV usrivastav...@gmail.com
wrote:
how to solve these type of problems http://www.spoj.pl/problems/GNY07H/
means how to approach this problem by dp.
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
Here i proposed an algorithm. correct me if i am wrong !!
int main()
{
int N; //number of boards
int W; // number of workers
int smax = 0;
cin N W;
int *A = new int[N];
for(int i=0;iN;i++){
cin A[i];
smax +=
Hi,
Can u please explain. I couldn't get what do u mean by after processing K
bundles?
I wrote following code (which is inefficient) which is goving correct result
for 140. But how to get the value 1400.
#includeiostream
using namespace std;
//#define MAX 0x7FFF
int main()
{
int weight[] =
process bundles one by one, as for 0-1 knapsack problem.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
DP[K][N] - minimal cost choosing N balls and after processing K bundles.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
Refer to the original problem here:
http://www.topcoder.com/stat?c=problem_statementpm=1166.
And the tutorial:
http://www.topcoder.com/tc?module=Staticd1=match_editorialsd2=tco03_online_rd_4
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
What does arr[i+1][j-1] signify ?
Can u give a pseudocode ?
On Nov 28, 1:17 pm, Yingjie Xu [EMAIL PROTECTED] wrote:
Using suffix tree, can be solved in O(n)...
On 11/28/07, John [EMAIL PROTECTED] wrote:
Algorithm for finding out the longest palindrome in a given string
using dynamic
It means that the position arr[i][j] (read str.substr(i,j)) is a
palindrome if the characters at positions i and j are equal
(str.charAt(i) == str.charAt(j)) and the word without the last
characters were a palindrome (arr[i-1][j-1]).
This is a bottom-up approach.
-- barata
On Nov 28, 6:02 am,
suppose arr[i][j] says if string from i to j is a palindrome
then arr[i][j] = (str[i]==str[j]) arr[i+1][j-1]
then answer = max (abs(i-j) such that arr[i][j] =1)
On Nov 28, 2007 12:49 AM, John [EMAIL PROTECTED] wrote:
Algorithm for finding out the longest palindrome in a given string
12 matches
Mail list logo