1 / 4
Sep 2011

I was wondering what is the maximum array size allowed in SPOJ.

Apart from a memory limitation(if any) imposed by SPOJ, does C restrict the memory size?

Also I believe reading an element from the following two arrays is always same(doesnt depend on array size) ??
arr[100] and arr[1000000].

  • created

    Sep '11
  • last reply

    Sep '11
  • 3

    replies

  • 900

    views

  • 3

    users

Maximum amount of memory allowed on spoj = 256MB( stack + heap and stack < heap).
256MB = 268435456 Bytes, so u can calculate yourself the maximum limit on array size of a particular type.

Thanks a lot. So a int array can have size upto 60 million and long long int can have 30 million. smile

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 13 5d

Want to read more? Browse other topics in C and C++ or view latest topics.