| ||||||||||
| 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 | |||||||||
why wa?help me!thanks!!sample data no problem.#include<iostream>
#include<string>
using namespace std;
int main()
{
int n;
cin>>n;
while(n-->0)
{
int i,m,M[1000],j=0;
cin>>m;
char ch[1000];
for(i=0;i<m;i++)
{
cin>>ch;
M[i]=strlen(ch);
}
for(i=1;i<m;i++)
{
if(M[j]<M[i])
j=i;
}
cout<<j+1<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator