Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 546c44e

Browse files
Update 3640.Trionic-Array-II.cpp
1 parent 1747c72 commit 546c44e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎Others/3640.Trionic-Array-II/3640.Trionic-Array-II.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class Solution {
2828
int x = arr[i].first, y = arr[i].second;
2929
if (x-1<0) continue;
3030
if (y+1>=n) continue;
31+
if(nums[x-1]>=nums[x]) continue;
32+
if(nums[y+1]<=nums[y]) continue;
3133

3234
ll sum = nums[x-1];
3335
ll maxSum1 = nums[x-1];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /