One test case is giving TLE, wrote this code with brute force approach. Is the code correct? and how should i optimize?
1 test case giving TLE
Output Format
The answer mod 10^9+7
add this
I don’t get it?
cout<<len%(1e9)+7;
?
One test case is giving TLE, wrote this code with brute force approach. Is the code correct? and how should i optimize?
Output Format
The answer mod 10^9+7
add this
I don’t get it?
cout<<len%(1e9)+7;
?