📄 1177.cpp
字号:
#include<iostream>
using namespace std;
struct acmer{
char times[30];
int solve;
};
void main()
{
int n,one,two,three,m;
while(cin>>n>>one>>two>>three>>m){
if(n==0&&m==0&&one==0&&two==0&&three==0)
break;
acmer me[155];
for(int i=0;i<n;i++)
cin>>me[i].solve>>me[i].times;
int rank=1;
for(int i=0;i<n;i++)
if((me[i].solve>me[m-1].solve)||(me[i].solve==me[m-1].solve&&strcmp(me[i].times,me[m-1].times)<0))
rank++;
if(rank<=one)
cout<<"Accepted today? I've got a golden medal :)\n";
else if(rank<=one+two)
cout<<"Accepted today? I've got a silver medal :)\n";
else if(rank<=one+two+three)
cout<<"Accepted today? I've got a copper medal :)\n";
else
cout<<"Accepted today? I've got an honor mentioned :)\n";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -