Page 29 of 30

Re: 10038 - Jolly Jumpers

Posted: Tue Oct 07, 2014 8:30 pm
by bgcsaif
It's still WA. . . .
http://ideone.com/nOw2Pd

Re: 10038 - Jolly Jumpers

Posted: Wed Oct 08, 2014 9:43 am
by lighted
Your updated code doesn't match sample I/O. Try to check all input in this thread, there are enough input data to get accepted. :)
Input

Code: Select all

4 1 4 2 3
Output

Code: Select all

Jolly

Re: 10038 - Jolly Jumpers

Posted: Wed Oct 08, 2014 12:21 pm
by bgcsaif
Oops! I left some points unchanged.
I am simply tempered with this problem. Can you check it again please? Here is my new codes.
http://ideone.com/M842Yl

Re: 10038 - Jolly Jumpers

Posted: Wed Oct 08, 2014 12:54 pm
by lighted
Input

Code: Select all

1 2000
2 1999 1998
Acc Output

Code: Select all

Jolly
Jolly
Change line to

Code: Select all

for (k = 1, i = 0; i < c - 1; i++)

Re: 10038 - Jolly Jumpers

Posted: Sun Oct 12, 2014 9:06 pm
by bgcsaif
Thanks!!! I GOT AC :-) :-) I don't know how to thank you....

Re: 10038 - Jolly Jumpers

Posted: Mon Oct 13, 2014 12:10 am
by milesstevenson
Can anyone help me understand why I'm not getting AC?

Code: Select all

// AC
Edit: Nevermind I found the error. isProperSequence should have been called with n instead of n-1.

Posted: Sat Oct 25, 2014 6:49 pm
by mousumi5570
.

Re: 10038 - Jolly Jumpers

Posted: Sat Oct 25, 2014 6:50 pm
by mousumi5570
why WA?someone help plz......

Code: Select all

#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAX 3002
int main()
{
   
    int a,b,flag =1;
    int A[MAX];
    while(cin>>a)
    {
        for(int i=1;i<=a;i++)
        {
            scanf("%d",&A[i]);
        }
        for(int i=1;i<a;i++)
        {
            b=abs(A[i]-A[i+1]);
            {
                if(b<1 ||b>a-1)
                {

                    flag=0;

                }
            }

        }
        if(flag==1) printf("Jolly\n");
        if(flag==0) printf("Not jolly\n");

    }
    return 0;
}

Re: 10038 - Jolly Jumpers

Posted: Sat Oct 25, 2014 7:04 pm
by mousumi5570
why WA?someone help plz.........

Code: Select all

#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAX 3002
int main()
{
    
    int a,b;
    int A[MAX];
    while(cin>>a)
    {
        int flag =1;
        for(int i=1;i<=a;i++)
        {
            scanf("%d",&A[i]);
        }
        for(int i=1;i<a;i++)
        {
            b=abs(A[i]-A[i+1]);
            {
                if(b<1 ||b>a-1)
                {

                    flag=0;

                }
            }

        }
        if(flag==1) printf("Jolly\n");
        if(flag==0) printf("Not jolly\n");

    }
    return 0;
}

Re: 10038 - Jolly Jumpers

Posted: Sun Oct 26, 2014 11:01 am
by lighted
Don't post several times. Please delete your unnecessary posts. Use code tags.

Try to check input in this thread before posting. There are so many input in this thread to check your code.
brianfry713 wrote:4 1 2 3 6 is Not jolly
Don't forget to remove your code after getting accepted. 8)

Re: 10038 - Jolly Jumpers

Posted: Tue Nov 11, 2014 6:54 pm
by stevesJ03
Someone please help!! why I get WA with my code?
lighted wrote:Try input in this thread before posting.
m1m6 wrote:
Doesn't match sample I/O.
how !!

try these....
1 1
2 1 2

output :
Jolly
Jolly

Code: Select all

Thanks, I got AC :D 

Re: 10038 - Jolly Jumpers

Posted: Wed Nov 12, 2014 6:41 am
by lighted
Try input in this thread before posting.
m1m6 wrote:
Doesn't match sample I/O.
how !!

try these....
1 1
2 1 2

output :
Jolly
Jolly

Re: 10038 - Jolly Jumpers

Posted: Fri Nov 21, 2014 10:04 pm
by mpmohi
Hi, I am getting WA in 10038 again and again :oops:
Here's my code

Code: Select all

Accepted at last 


Re: 10038 - Jolly Jumpers

Posted: Sat Nov 22, 2014 4:02 pm
by lighted
This is accepted code. :D

Re: 10038 - Jolly Jumpers

Posted: Sat Nov 22, 2014 10:15 pm
by mpmohi
lighted wrote:This is accepted code. :D
Tnx Lighted for your reply :)

But this same code gave me wa several time and now it is accepted without a single change :o