Sword Art Online
CodeChefOpen on judge ↗
You are playing an RPG and initially, you have $1000$ health points and $1000$ attack points. You are required to break into a fortress with $n$ guards, and each guard has an attack and health stat. You have grinded $5,000$ XP from previous levels. An XP can be used to either raise your health or attack by a unit. You must spend all your XP before starting this challenge. You fight with the gua
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