The following pseudocode is executed using the Olympics dataset. At the end of execution, which statements are correct?
```
P = {}
while (Table 1 has more rows) {
Read the first row X in Table 1
P = updateMedalCounts(P, X.Sport, X.Medal)
Move X to Table 2
}
n = doSomething(P)
Procedure updateMedalCounts(Q, Sport, Medal)
if (isKey(Q, Sport)) {
Q[Sport][Medal] = Q[Sport][Medal] + 1
}
else {
Q[Sport] = {"Gold": 0, "Silver": 0, "Bronze": 0}
Q[Sport][Medal] = 1
}
return(Q)
End updateMedalCounts
Procedure doSomething(R)
max = 0
for each sport in keys(R) {
if (R[sport]["Gold"] > max) {
max = R[sport]["Gold"]
}
}
return(max)
End doSomething
```