排序
#include<iostream>
#include<algorithm>
using namespace std;
struct stu{
string name,kemu;
int score;
};
int cmp(stu a,stu b){
return a.score>b.score;
}
int main()
{
int n;
cin>>n;
int m,k;
stu s[n];
for(int i=0;i<n;i++)cin>>s[i].name>>s[i].kemu>>s[i].score;
sort(s,s+n,cmp);
cin>>m>>k;
int f=0;
for(int i=0;i<n;i++){
if(s[i].score>=m && s[i].score<=k){
cout<<s[i].name<<" "<<s[i].kemu<<endl;
f=1;
}
}
if(!f)cout<<"NONE";
return 0;
}