<br><br><div class="gmail_quote">On Sat, Sep 12, 2009 at 12:08 PM, Diego Souza <span dir="ltr">&lt;<a href="mailto:dsouza@bitforest.org">dsouza@bitforest.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I was trying to solve a simple problem in SPOJ, however, after two weeks<br>
trying almost everything I could think of, I was still getting<br>
WrongAnswer.<br>
<br>
Then I decided to do the same thing in C++ and I really got puzzled when<br>
I got ACcepted.<br>
<br>
I tried to understand what was different without success. I hope someone<br>
can tell me why spoj says the Haskell version is wrong:<br>
<br>
<a href="http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3583" target="_blank">http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3583</a> [Haskell,WA]<br>
<a href="http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3582" target="_blank">http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3582</a> [C++,AC]<br>
<br>
The problem I&#39;m talking about is this one:<br>
<a href="https://www.spoj.pl/problems/SBANK/" target="_blank">https://www.spoj.pl/problems/SBANK/</a></blockquote><div><br>Looks like the output should be sorted.  The C++ version does this with the iterator over map&lt;string, int&gt; implicitly.  I don&#39;t spot where your haskell version sorts the output.<br>
<br>There could be other problems, that&#39;s just what I can notice in 2 minutes of looking.<br><br>Good luck!<br><br>Jason<br></div></div>