101
0/304
Loading content...
A competition analytics service records individual point events in this table:
scores columns:
Data guarantee:
Task: For every row, compute the cumulative score for that gender from its earliest recorded day up to the current day.
Output requirements:
Supported submission environments:
scores:
| player_name | gender | day | score_points |
|-------------|--------|------------|--------------|
| Aron | F | 2020-01-01 | 17 |
| Alice | F | 2020-01-07 | 23 |
| Bajrang | M | 2020-01-07 | 7 |
| Khali | M | 2019-12-25 | 11 |
| Slaman | M | 2019-12-30 | 13 |
| Joe | M | 2019-12-31 | 3 |
| Jose | M | 2019-12-18 | 2 |
| Priya | F | 2019-12-31 | 23 |
| Priyanka | F | 2019-12-30 | 17 |[
{"gender":"F","day":"2019-12-30","total":17},
{"gender":"F","day":"2019-12-31","total":40},
{"gender":"F","day":"2020-01-01","total":57},
{"gender":"F","day":"2020-01-07","total":80},
{"gender":"M","day":"2019-12-18","total":2},
{"gender":"M","day":"2019-12-25","total":13},
{"gender":"M","day":"2019-12-30","total":26},
{"gender":"M","day":"2019-12-31","total":29},
{"gender":"M","day":"2020-01-07","total":36}
]Compute cumulative totals independently for F and M after sorting each gender by date.
scores:
| player_name | gender | day | score_points |
|-------------|--------|------------|--------------|
| Ana | F | 2023-04-02 | 5 |
| Bea | F | 2023-04-01 | 3 |
| Cara | F | 2023-04-05 | 7 |[
{"gender":"F","day":"2023-04-01","total":3},
{"gender":"F","day":"2023-04-02","total":8},
{"gender":"F","day":"2023-04-05","total":15}
]Only one gender is present, so the result is one chronological running sequence.
scores:
| player_name | gender | day | score_points |
|-------------|--------|------------|--------------|
| Max | M | 2022-08-03 | 10 |
| Mira | F | 2022-08-03 | 8 |
| Moe | M | 2022-08-04 | 0 |
| Faye | F | 2022-08-04 | 6 |[
{"gender":"F","day":"2022-08-03","total":8},
{"gender":"F","day":"2022-08-04","total":14},
{"gender":"M","day":"2022-08-03","total":10},
{"gender":"M","day":"2022-08-04","total":10}
]A zero score still contributes a valid row; cumulative totals remain non-decreasing when scores are non-negative.
Constraints