Unable to pass subtask1

All the parameters are passed but 1st subtask is not cleared here is the link of my solution , please help

https://www.codechef.com/viewsolution/39078895

This link

bro its not showing your solution

1 Like

This is my solution take help from it as I cannot see your solution

https://www.codechef.com/viewsolution/38375320

https://www.codechef.com/viewsolution/39078895

Try to change memory allocation to :
long long * ptr = (long long *)malloc(sizeof(long long)*days);