代码:
#includeusing namespace std;#define ll long long#define ls rt<<1,l,m#define rs rt<<1|1,m+1,r#define pb push_back#define mem(a,b) memset((a),(b),sizeof(a))const int INF=0x3f3f3f3f;const int N=105;struct lesson{ string s; int v; operator < (const lesson &t) const { return v>t.v; }}a[N];map mp;int main(){ ios::sync_with_stdio(false); cin.tie(0); int t; cin>>t; while(t--) { mp.clear(); int n; cin>>n; for(int i=0;i >a[i].s>>a[i].v; sort(a,a+n); int ans=0; for(int i=0;i