https://www.codechef.com/viewsolution/49451303
The logic in my code was basically to create a function which find the size of each box when the remainder is maximum , and then i created an array for the test values and just printed the sizes, im not able to figure out what the problem is
int A[N];
N can be as large as 10^8: c - Getting a stack overflow exception when declaring a large array - Stack Overflow
N
After editing the code its now exceeding the time limit
https://www.codechef.com/viewsolution/49455011
That’s because you’re creating and populating a (dynamic) array of size up to 10^8, up to 1000 times!
Probably best to just read this:
https://discuss.codechef.com/problems/MUFFINS3