#include <iostream> using namespace std; int main() { int n; cin >> n; int w[105],t; string color[105],tmp; for(int i = 0;i < n; i++) cin >> w[i] >> color[i]; for(int i = 0;i < n;i++){ int Max = w[i]; int Maxindex = i; ...