(Analysis by Nick Wu)

In this problem, we have the counts of how many participants are bronze, silver, gold, and platinum before a contest and how many are in each division after the contest, and we wish to count the number of participants who were promoted between each division.

Let's start by counting the number of participants who were promoted to platinum. The only way that someone can end up being promoted from gold to platinum is if they were not platinum before the contest, and then ended up in platinum after the contest. Therefore, the number of participants who were promoted from gold to platinum is simply the difference between the number of participants who were platinum before the contest and the number of participants who were platinum after the contest.

By similar logic, in order to have been promoted from silver to gold during the contest, a participant could not be in gold or platinum before the contest, but would appear in gold or platinum after the contest. Therefore, we count the number of participants who were in gold or platinum after the contest, and subtract the number of participants who were gold or platinum before the contest.

Lastly, to count the participants who were promoted from bronze to silver, we count the number of participants who were in silver, gold, or platinum after the contest, and subtract the number of participants who were in those divisions before the contest.

Here is my Java code demonstrating this.

import java.io.*;
import java.util.*;
public class promote {
public static void main(String[] args) throws IOException {
// initialize file I/O
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("promote.out")));

// read in counts for bronze
int bronzeBefore = Integer.parseInt(st.nextToken());
int bronzeAfter = Integer.parseInt(st.nextToken());

// read in counts for silver
int silverBefore = Integer.parseInt(st.nextToken());
int silverAfter = Integer.parseInt(st.nextToken());

// read in counts for gold
int goldBefore = Integer.parseInt(st.nextToken());
int goldAfter = Integer.parseInt(st.nextToken());

// read in counts for platinum
int platinumBefore = Integer.parseInt(st.nextToken());
int platinumAfter = Integer.parseInt(st.nextToken());

// do the computations
int goldToPlatinum = platinumAfter - platinumBefore;
int silverToGold = goldAfter - goldBefore + platinumAfter - platinumBefore;
int bronzeToSilver = silverAfter - silverBefore + goldAfter - goldBefore + platinumAfter - platinumBefore;