When you make the array size..

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
User avatar
tmdrbs6584
Learning poster
Posts: 98
Joined: Sat Jan 21, 2006 12:45 pm
Location: Busan,Corea(Republic of)

When you make the array size..

Post by tmdrbs6584 » Sun Feb 12, 2006 11:19 am

When you make the array size make array size big
like
int a[100000];
or
int a[300][300];

misof
A great helper
Posts: 430
Joined: Wed Jun 09, 2004 1:31 pm

Post by misof » Sun Feb 12, 2006 11:41 am

I suppose that you are asking about the memory limit. If I recall correctly, the UVa judge uses a fixed 32 MB limit. As long as your array is global, it may be this big. Thus, this should be just fine:

Code: Select all

int myArray[7800000];

int main() {
  myArray[7654321] = 47;
  return 0;
}

Post Reply

Return to “C++”