wip
Time Limit: 1 seconds
Memory Limit: 128 MB
Rating: 1000
Problem StatementI don’t know how but social credit system has made it into reality. Allow the user to input the name of the hero and their actions. At the end, output the supe and their social credit. All heroes start at $0$.
InputOn the first line, you are given two space-separated integers $N$ and $M$ $(1 \le N, M \le 10^6)$, the number of actions given in the input and the number of superheroes to track. On the next $N$ lines, you are given integers $A_i$ $(1 \le A_i \le M)$ and $S_i$ $(1 \le S_i \le 2 \cdot 10^8)$, $A_i$ being the ID of the superhero and $S_i$ being the change in social credit.
OutputOutput the answer on the first line (excluding units)
Sample CasesSample Output 1: 89Explanation
Note: the sample output given is not the answer.
SourcesKL Coding Cup 2022 > Problem 8 > Intermediate League
Submit | Back