| ||||||||||
| 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 | |||||||||
//1968 不难的题怎么一直错啊...哪们GG帮帮我..//1968 不难的题怎么一直错啊...哪们GG帮帮我..
int main()
{
int n_book,n_sch,s_sch;
int page[3000];
while(cin>>n_sch>>s_sch>>n_book)
{
for(int i=0;i<n_book;i++)
cin>>page[i];
sort(page,page+n_book);
int temp=n_book%n_sch;
int LIP=n_book/n_sch;
int UIP;
if(temp==0)
UIP=LIP;
else
UIP=LIP+1;
int count=0;
for(int i=0;i<s_sch;i++)
if(i<temp)
count+=UIP;
else
count+=LIP;
cout<<page[count]<<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