[Haskell-cafe] why these two are not equivalent?

Jason Dagit dagit at codersbase.com
Sat Sep 12 15:55:15 EDT 2009

On Sat, Sep 12, 2009 at 12:46 PM, Jason Dagit <dagit at codersbase.com> wrote:

> On Sat, Sep 12, 2009 at 12:08 PM, Diego Souza <dsouza at bitforest.org>wrote:
>> Hi,
>> I was trying to solve a simple problem in SPOJ, however, after two weeks
>> trying almost everything I could think of, I was still getting
>> WrongAnswer.
>> Then I decided to do the same thing in C++ and I really got puzzled when
>> I got ACcepted.
>> I tried to understand what was different without success. I hope someone
>> can tell me why spoj says the Haskell version is wrong:
>> http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3583 [Haskell,WA]
>> http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3582 [C++,AC]
>> The problem I'm talking about is this one:
>> https://www.spoj.pl/problems/SBANK/
> Looks like the output should be sorted.  The C++ version does this with the
> iterator over map<string, int> implicitly.  I don't spot where your haskell
> version sorts the output.

I take that back.  I see how it sorts it now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090912/7eea819e/attachment-0001.html

More information about the Haskell-Cafe mailing list