12583 - Memory Overflow
Moderator: Board moderators
12583 - Memory Overflow
thanks lighted got AC.
Last edited by sampad74 on Tue Aug 05, 2014 6:25 am, edited 1 time in total.
Re: UVa-12583 Memory Overflow
If you have two same people in array b then your program will increase variable c several times.
You can change it to
You can change it to
Code: Select all
int ok;
for(ok = j = 0; j < m; j++)
{
if(b[j]== a[k])
{
ok=1;
}
}
if (ok) c++;
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 12583 - Memory Overflow
On this problem when I used std::map, I ended up with TL. I had to use another data structure instead.
I've uploaded test cases I found useful during testing / debugging on uDebug.
I've uploaded test cases I found useful during testing / debugging on uDebug.
-
- Experienced poster
- Posts: 122
- Joined: Tue Apr 16, 2002 10:07 am
Re: 12583 - Memory Overflow
I have used stl map too but got AC in 0.000 second.
Probably a small bug in your program.. (?)
Probably a small bug in your program.. (?)