From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3cb31983495c2fde X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.135.106 with SMTP id pr10mr6184750pbb.3.1334940922069; Fri, 20 Apr 2012 09:55:22 -0700 (PDT) Path: r9ni78670pbh.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Will Newsgroups: comp.lang.ada Subject: Re: Ada95 Help 2D arrays Date: Fri, 20 Apr 2012 09:55:21 -0700 (PDT) Organization: http://groups.google.com Message-ID: <11440502.478.1334940921729.JavaMail.geo-discussion-forums@yndm3> References: <31137140.191.1334922395977.JavaMail.geo-discussion-forums@ynjb15> NNTP-Posting-Host: 134.240.94.59 Mime-Version: 1.0 X-Trace: posting.google.com 1334940921 23293 127.0.0.1 (20 Apr 2012 16:55:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 20 Apr 2012 16:55:21 +0000 (UTC) In-Reply-To: <31137140.191.1334922395977.JavaMail.geo-discussion-forums@ynjb15> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=134.240.94.59; posting-account=CZZpzgoAAAAoaHoNNp9zhY9EzQgEmxhU User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-04-20T09:55:21-07:00 List-Id: You are On Friday, April 20, 2012 7:46:35 AM UTC-4, Will wrote: > I really need help with the problem below... any ideas? I was thinking a= bout passing each row and column into their own arrays or something but I a= m not even sure how to go about doing that. Please send me your ideas if y= ou can help. Thanks again, >=20 > willmann817 >=20 >=20 > Many people across America participate in Superbowl pools. Your pool is r= un a little differently from most. Instead of buying individual squares fro= m a grid, you purchase a row and a column. After painstaking research, you = have assigned an integer score to each square representing the probability = of that event occurring. You want to buy the row and column with the maximu= m combined score, calculated by adding all the individual scores in that ro= w and column. >=20 > For example, consider the following grid: >=20 > 10 20 30 40 >=20 > 20 30 20 20 >=20 > 30 20 10 10 >=20 > 40 20 10 40 >=20 >=20 > Your best option is to choose the first row and the first column, giving = you a combined score of 190. >=20 >=20 > Write a function Best_Combined_Score(Grid) that takes an Int_Matrix and r= eturns the maximum combined score, as described above. You can assume that = the grid is square, and that it contains only positive integers. You are correct about Int_Matrix being defined already in another body and = spec file. And the intersection should only be counted once as you said. I= will see what I can do about the algorithm. Thanks a bunch -willmann817