ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1617. Flat Spots

What about 4-th test?Please help.Here is source:
Posted by Search 31 Mar 2008 22:05
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int i,n,a[155],k=0;
    cin>>n;
    for(i=0;i<n;i++)
        cin>>a[i];
    sort(a,a+n+1);
for(i=0;i<n;i++)
if(a[i]==a[i+3])
k++;
cout<<k;
    return 0;
}
*
Posted by Брэнд 1 Apr 2008 00:05
5
600
600
600
600
600
Re: *
Posted by Search 1 Apr 2008 20:04
Thank you!!!
Re: *
Posted by LLIRIK 3 Apr 2008 22:59
Брэнд wrote 1 April 2008 00:05
5
600
600
600
600
600
what is the answer for this test?
my programm writes 1
isn't it right??
It's obviously correct (-)
Posted by Orlangur [KNU] 4 Apr 2008 04:05
Re: *
Posted by tolia 7 Mar 2009 18:40

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int i,n,a[155],k=0;
cin>>n;
for(i=0;i<n;i++)
cin>>a[i];
sort(a,a+n+1);
for(i=0;i<n;i++)
if(a[i]==a[i+3])
k++;
cout<<k;
return 0;
}
Re: *
Posted by Rashid Gaziyev 26 Oct 2010 11:00
Thanks I got AC
Re: *
Posted by Adhambek 26 May 2013 09:48
look at my test ....   use your program
10
600
600
600
600
600
600
600
600
600
600
I think your answer is 7... But true answer is 2!

Edited by author 26.05.2013 09:50
Re: *
Posted by Ivan Metelev 4 Dec 2014 17:01
Sorry, but true answer is 1, on my opinion
No subject
Posted by Ivan Metelev 4 Dec 2014 17:01

Edited by author 04.12.2014 17:01

Edited by author 04.12.2014 17:02