Need Help with "NST Battle Ground" Strategy Game Problem

Full Question + Playground Link Inside

Hey everyone :wave:,

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!


:memo: Problem Description

:crossed_swords: NST Battle Ground

Time Limit: 2 sec
Memory Limit: 256000


:trophy: 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.


:crossed_swords: 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.

:repeat: 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.

:chart_with_upwards_trend: 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

:dart: Objective

Your strategy must:

  1. First round: Output an array of N integers (bids) such that sum(bids) ≤ E
  2. 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)
  3. Stop when k = -1 (end of game)

:rotating_light: Important Note:
Always print your bid before reading the next round’s input.
Failing to do so will result in 0 marks.


:test_tube: Sample Input

4
10
2 3 3 2
12
3 3 3 3
15
5 5 5 0
-1


:white_check_mark: Sample Output

3 5 2 0
2 10 0 0
2 1 0 12


:pray: Request

I would really appreciate any working solution or guidance on how to build an effective strategy for this problem. Thanks in advance!

1 Like