I am solving this problem. It desires a memory limit of 50000bytes . So if I allocate a 2D array of int of size 1000 X 1000 , shouldn't it exceed the memory bounds ?
PS : I saw this solution to the problem and the programmer has allocated a 2D array of size m X m . And if m is equal to 1000, then I think the memory bound will be exceeded. But codechef has accepted his solution.
Is there a faulty mechanism of codechef compiler or am I missing something?
From the site:
Source Limit: 50000 Bytes
This limit applies to the size of your source code, not to the amount of memory the program allocates. The two are completely unrelated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With