전략: 1. 투포인터 알고리즘을 사용하여 푼다. 코드: #include using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N, M; cin>>N>>M; int arr[N]; for(int i= 0; i>arr[i]; } int l =0, r= 0, sum= 0, result = 0; while(l=M){ sum-=arr[l]; l++; } else if(r>=N){ break; } else{ sum+= arr[r]; r++; } } cout