10038 - Jolly Jumpers
Moderator: Board moderators
Re: 10038 - Jolly Jumpers
It's still WA. . . .
http://ideone.com/nOw2Pd
http://ideone.com/nOw2Pd
Re: 10038 - Jolly Jumpers
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
Output

Input
Code: Select all
4 1 4 2 3
Code: Select all
Jolly
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 10038 - Jolly Jumpers
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
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
Input
Acc Output
Change line to
Code: Select all
1 2000
2 1999 1998
Code: Select all
Jolly
Jolly
Code: Select all
for (k = 1, i = 0; i < c - 1; i++)
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 10038 - Jolly Jumpers
Thanks!!! I GOT AC
I don't know how to thank you....


-
- New poster
- Posts: 10
- Joined: Sat Oct 11, 2014 2:47 pm
Re: 10038 - Jolly Jumpers
Can anyone help me understand why I'm not getting AC?
Edit: Nevermind I found the error. isProperSequence should have been called with n instead of n-1.
Code: Select all
// AC
Last edited by milesstevenson on Wed Oct 28, 2015 5:30 am, edited 1 time in total.
-
- New poster
- Posts: 5
- Joined: Thu Oct 16, 2014 8:15 am
-
- New poster
- Posts: 5
- Joined: Thu Oct 16, 2014 8:15 am
Re: 10038 - Jolly Jumpers
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;
}
Last edited by brianfry713 on Tue Oct 28, 2014 11:11 pm, edited 1 time in total.
Reason: Added code blocks
Reason: Added code blocks
-
- New poster
- Posts: 5
- Joined: Thu Oct 16, 2014 8:15 am
Re: 10038 - Jolly Jumpers
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
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.
Try to check input in this thread before posting. There are so many input in this thread to check your code.
Don't forget to remove your code after getting accepted.brianfry713 wrote:4 1 2 3 6 is Not jolly

A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 10038 - Jolly Jumpers
Someone please help!! why I get WA with my code?
lighted wrote:Try input in this thread before posting.m1m6 wrote:how !!Doesn't match sample I/O.
try these....
1 1
2 1 2
output :
Jolly
Jolly
Code: Select all
Thanks, I got AC :D
Last edited by stevesJ03 on Wed Nov 12, 2014 7:24 pm, edited 2 times in total.
Re: 10038 - Jolly Jumpers
Try input in this thread before posting.
m1m6 wrote:how !!Doesn't match sample I/O.
try these....
1 1
2 1 2
output :
Jolly
Jolly
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 10038 - Jolly Jumpers
Last edited by mpmohi on Sat Nov 22, 2014 10:16 pm, edited 1 time in total.
Re: 10038 - Jolly Jumpers
This is accepted code. 

A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 10038 - Jolly Jumpers
Tnx Lighted for your replylighted wrote:This is accepted code.

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