You are not logged in. Please login at www.codechef.com to post your questions!

×

SPOJ CODEM5 - Problem5 , DP

Hi, I am trying to solve CODEM5 - Problem5, it is a tutorial problem. I am getting SIGSEGV . Please Help

My Solution to problem --

http://ideone.com/VhYdPv

Problem Link --

http://www.spoj.com/problems/CODEM5/

asked 23 Jun '15, 01:18

drathi5's gravatar image

3★drathi5
40310
accept rate: 6%


Check the while loop condition

col>0 && row>=0

when row = 0

if( subset[row-1][col]==true && row>0)         
         row--;

subset[row-1] = subset[-1]

link

answered 23 Jun '15, 17:53

drj_reddy's gravatar image

3★drj_reddy
176110
accept rate: 8%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×18
×3

question asked: 23 Jun '15, 01:18

question was seen: 3,511 times

last updated: 23 Jun '15, 17:53