Game time
CodeChefOpen on judge ↗
Alice and Bob are playing a game today which consist of $N$ pieces. Each piece has $2$ faces, $A$ and $B$. You are given the points of each piece and their initial configuration, i.e. whether $A$ is facing up or $B$ is facing up The points won by Alice is sum of points on the pieces which have $A$ facing up. Similarly, Bob wins sum of points on pieces which have $B$ facing up. Bob is a cheater
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start