#include <bits/stdc++.h> using namespace std; struct st{ int id; int score; bool operator <(st a){ if(score==a.score)return id<a.id; else return score<a.score; } }; int main(){ int n; while(cin>>n){ st a[n]; for(int i=0;i...