#include <stdio.h> #include <string.h> #include <algorithm> #include <math.h> using namespace std; int m; struct node{ char name[100]; int time,acno; }p[100]; bool cmp(node a,node b){ if(a.acno==b.acno&&a.time==b.time) return (strcmp(b.name,a.name)>0); else if(a.acno==b.acno) return a.time<b.time; else return a.acno>b.acno; } int change(char tmp[]){ int sum,res=0,i,t=0,k,j; double cnt; int l=strlen(tmp); if(tmp[l-1]==')'){ cnt=0; for(i=l-2;tmp[i]!='(';--i){ k=1; for(j=0;j<cnt;++j) k*=10; t+= k * (tmp[i]-'0'); cnt=cnt+1; } tmp[i]='