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 |
Re:为什么老是WA啊!高手帮Me看看啊!3x!In Reply To:为什么老是WA啊!高手帮Me看看啊!3x! Posted by:caizhicong0503 at 2007-05-03 16:22:37 > #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); > } > } 和你相同的思想,但是TEL。郁闷…… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator