Learn DSADSAContests
coding75 logo
LeetCode POTDPOTDSheets
coding75 Pro
coding75 logo
Dashboard
Learn DSA
Course RoadmapFlow
DSA Topic TreeNew 🚀
Contest SolutionsPractice
Practice Sheets
MasterclassesLive 👨🏻‍💻

coding75 ProPRO

Live Classes & Placement Guidance

coding75 logo

The premier developer platform for mastering Data Structures & Algorithms, exploring contest editorials, building ATS-ready resumes, and accelerating your tech career.

Connect & Community

DSA & Contests

  • Learn DSA
  • Contest Solutions
  • LeetCode POTDDaily
  • Practice Sheets
  • MasterclassesSoon

Interview Prep

  • Portfolio Projects
  • CS Fundamentals
  • System DesignSoon
  • Interview ExperiencesSoon
  • Mock InterviewsSoon

Career & Pro

  • Jobs & Internships
  • Resume BuilderATS
  • coding75 Pro
  • Submit Feedback
© 2026coding75•crackDSA™•Maa Lalita Edtech Private Limited. All Rights Reserved.
Privacy PolicyTerms & ConditionsContact Support
Registered Office: Kanpur 208021•Regional Office: Indiranagar, Bangalore, 560008
Maa Lalita Edtech Private Limited
Contests/CodeChef/Starters 130/Updating A
Prev
CodeChefCodeChef
5 Star
Starters 130

Updating A

ArrayMath
Loading...
Solve on CodeChef

Problem Statement

Official algorithmic problem description and constraints.

Open on CodeChef

Alice and Bob have an array of A of N elements, and will play a game on it


That is, Alice must choose some subarray, delete it, and insert the absolute value of its sum in its place.

Bob will do the same, but insert just the sum (and not its absolute value).


Alice wants to maximize the value of the final element, while Bob wants to minimize it.

If both Alice and Bob make their moves optimally, what will the value of the final element be?

Solutions & Walkthrough

Detailed video explanations, mathematical intuition, and clean C++ implementation code.

Connecting secure classroom stream...
Back to Starters 130
Previous Problem