Full Question + Playground Link Inside
Hey everyone ,
I’m currently stuck on this problem called NST Battle Ground from Newton School.
It’s a strategic bidding game involving adaptive moves over multiple rounds.
I haven’t been able to make any real progress yet.
If anyone can share a working solution in Python or explain the approach, I’d be super grateful!
Problem Description
NST Battle Ground
Time Limit: 2 sec
Memory Limit: 256000
League Background
Two branches of Newton School of Technology — Team Sonipat and Team Pune — compete in a strategic game of bidding to win tech resources.
Each round is turn-based, and teams adapt based on previous rounds.
Game Rules
- The match has R rounds.
- In each round:
- There are N tech resources up for grabs.
- Both teams receive E units of energy to distribute across these N resources.
- Energy may change each round but remains the same for both teams.
- Bids are made simultaneously and secretly.
Strategic Adaptation
- Round 1: Teams bid blindly (no information about the opponent).
- From Round 2 onward:
- Each team sees the opponent’s previous round bids.
- Then, both receive a new energy value
E
for that round.
Scoring System
For each resource:
- Win (higher bid): +3 points
- Draw (equal bid): +1 point each
- Lose (lower bid): 0 points
Bonus Points (per round):
- Win more resources than opponent → +3 × N points
- Equal number of wins → +N points each
- Fewer wins → 0 bonus
Objective
Your strategy must:
- First round: Output an array of N integers (bids) such that
sum(bids) ≤ E
- From second round onward:
- Read opponent’s last round bid (array of N integers)
- Read the new energy value
k
- Output your next bid array of N integers (sum ≤ k)
- Stop when
k = -1
(end of game)
Important Note:
Always print your bid before reading the next round’s input.
Failing to do so will result in 0 marks.
Sample Input
4
10
2 3 3 2
12
3 3 3 3
15
5 5 5 0
-1
Sample Output
3 5 2 0
2 10 0 0
2 1 0 12
Request
I would really appreciate any working solution or guidance on how to build an effective strategy for this problem. Thanks in advance!