Give me a competitive programming problems that I can't solve. (My skill is cracking,…
- User
Give me a competitive programming problems that I can't solve. (My skill is cracking, you need to ensure it is possible to solve)(No hint or solution, problem only)
Assistant
Sure, here's a competitive programming problem that should be challenging but solvable:
Problem: "The Maximum Subarray Sum with Constraints"
Problem Statement:
You are given an array
AofNintegers. You need to find the maximum sum of a contiguous subarray such that the subarray does not contain any two consecutive elements that are both negative.Input:
- The first line contains an integer
N(1 ≤ N ≤ 10^5), the number of elements in the array. - The second line contains
NintegersA[1], A[2], ..., A[N](each integer is in the range [-10^9, 10^9]).
- The first line contains an integer
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.