| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么老是WA啊!高手帮Me看看啊!3x!#include<iostream>
#include<map.h>
using namespace std;
map<string,int> Score;
string p[10001];
int main()
{
int N;
scanf("%d\n",&N);
for(int i=0;i<N;++i){
getline(cin,p[i]);
Score[p[i]]=0;
}
int M;
scanf("%d\n",&M);
while(M--){
int mark;
string S;
for(int i=0;i<N;++i){
scanf("%d",&mark);
getchar();
getline(cin,S);
Score[S]=mark;
}
int n=1;
for(int i=0;i<N;++i)
if(Score[p[i]]>Score["Li Ming"]) n++;
printf("%d\n",n);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator