I was solving this problem on SPOJ
http://www.spoj.com/problems/STRSOCU/
I got a c++ code accepted but the same code written in java gives NZEC error
here is my java code
Why should this code give an NZEC error??
I was solving this problem on SPOJ
http://www.spoj.com/problems/STRSOCU/
I got a c++ code accepted but the same code written in java gives NZEC error
here is my java code
Why should this code give an NZEC error??
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 152 |
| 3 | Proof_by_QED | 146 |
| 3 | Um_nik | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
| Name |
|---|



Don't close
out.Still NZEC
Can't
to[p].get(c)benullon Line 45?updated the code
refresh the link
But you are still closing
out. UPD: Oh, I think I'm mistaken, spoj wouldn't allow you to closebf,outis ok.http://ideone.com/Oac4hQ
The latest thing after removing the closing of
out.and putting the condition but still.but it still gives NZEC
I think I've got it. The default stack size is too small for Java on spoj. See this thread: http://mirror.codeforces.com/blog/entry/166.
I thought at the first glance that this might be the problem but I needed to make sure that there are no other problems.
I think I may spend sometime later to simulate the recursion with a stack or do the thread thingy if I am going to accept it with java.
Thank you so much :D .
LOOOOL.
I got it accepted by the help of that blog entry.
I set the size of the stack by myself for a thread.
Thank you so much :D .
I didn't ever imagined that I can control the memory's Stack size in java.
LOL