### decoder_1671's blog

By decoder_1671, history, 6 months ago,

I am not willing to write this blog because in many previous blogs i was flooded with downvotes but i will write because I need a help(I also do not have a friend which is proficient in java to whom i can discuss) from fellow coders in debugging which i am not able to find from last 2 hrs and 10 submission with 7RTE AND 24 AC every time.

I even use LONG , sort array of pairs even in equal case on the basis of index..still not able to figure out the reason of failure.

EVERY TIME I GOT RTE ON FOLLOWING TC- 16,17,18,20,21,22,25

HELP IS HIGHLY APPRECIATED.

• -25

By decoder_1671, history, 8 months ago,

I HAD TRIED THIS QUESTION MANY TIMES STILL I GOT TIME LIMIT EXCEEDED ON TEST 18 EVERY TIME . I EVEN USED FEN WICK TREE WHICH IS REQUIRED TO OPTIMISED IN THIS QUESTION . TO THE BEST OF MY KNOWLEDGE I AM DOING GOOD STILL NOT ABLE TO DEBUG IT . PLZ SOMEONE HELP .

THE PROBLEM NAME IS — STRING REVERSAL (1430E)

THNX IN ADVANCE :))

UPDATED:DONE NOW ..SO NOW U CAN IGNORE IT ALSO

• -25

By decoder_1671, history, 10 months ago,

https://codeforces.com/contest/16/submission/91776859

plz see this link ..i really need help . I know it seems quite lengthy but it is my template which is use in very code .. my main code is just of 8-10 lines ..

PROBLEM : 16C , MONITOR

• -55

By decoder_1671, history, 13 months ago,

help in triple sort question from code chef long challenge of may 2020

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

plz tell why i am getting tle?

question is:https://www.codechef.com/MAY20B/problems/TRPLSRT

• -6

By decoder_1671, history, 14 months ago,

import java.util.*; public class Main { public static int max(int[] arr, int start , int end) { int max = Integer.MIN_VALUE;

for( int i = start ; i<= end ; i++)
{
if(arr[i] > max)
{
max = arr[i];
}

}

return max;
}

public static void main(String[] args)
{
Scanner scn = new Scanner(System.in);

int t = scn.nextInt();

for( int j = 1; j<= t ; j++ )
{
int n = scn.nextInt() ;
int[] arr = new int[n];

for(int i= 0; i < n  ; i++)
{

arr[i] = scn.nextInt();

}

int start = 0 ;
int end ;
long sum = 0 ;

for( int i = 1 ; i < n ; i++)
{
long x = arr[start]*arr[i] ;
if(x < 0)
{
end = i-1 ;

sum = sum + max(arr,start ,end) ;

start = i ;
}

}

end = n-1 ;
sum = sum +  max(arr,start ,end) ;

System.out.println(sum) ;
}
}

}