Remember the Future

You are an alien living in the future. You can move through one time dimension to another time dimen…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

@hjr265 please check submission no 356456.
I think there is some malformed inputs or something like that in tests that causing me RE.

Not this time :slight_smile:

I have updated the input specification to clarify something which is possibly the cause of RE for you.

#include <stdio.h>

int main()
{
int t,n,ara[1001],i,temp,j,max,h=1;
scanf(“%d”,&t);
while(t–){
scanf(“%d”,&n);
for(i=0;i<n;i++){
scanf(“%d”,&temp);
if(temp<0) ara[i]=temp*(-1);
else ara[i]=temp;
}
for(i=0,max=ara[0];i<n;i++){
for(j=i;j<n;j++){
if(ara[i]<ara[j]) break;
}
if(j==n){
max=ara[i];
break;
}
}
printf(“Case %d: %d\n”,h,max);
h++;

}
return 0;
}
//Cant seem to find whats wrong in my code
//WA in test case 2