FEU - East Asia College ACM Student Chapter
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» “Cochin builders: Symbol of Innovative Architecture”
Thu Jul 18, 2013 8:11 pm by shevsoe

» SPICE (Cobol IDE)
Mon May 06, 2013 5:36 pm by 200730059

» YMCA and Global Services
Thu Sep 01, 2011 2:35 pm by Rene Churchill

» useDelimeter
Thu Jun 23, 2011 11:02 am by ern_andrew

» The City of Cochin
Thu Jun 16, 2011 7:31 pm by GhosnBachelder

» Dropbox - HIGHLY RECOMMENDED AND EXTREMELY USEFUL
Mon Nov 08, 2010 1:30 am by arscariosus

» Anyone has watched The Social Network?
Sun Oct 24, 2010 4:09 pm by arscariosus

» LIFE and LOVE GURU
Sat Oct 09, 2010 1:42 am by kggc09

» Interested to be an Adhoc?
Fri Oct 08, 2010 2:47 pm by rmsalazar

April 2018
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Calendar Calendar


Programming Challege

Go down

Programming Challege

Post by scirtem on Tue Jul 20, 2010 1:17 am

Warm-up problem

Try it yourselves without the help of Larry Page and Sergey Brin!!!

Do not post your solution here...

PM me your solution!!!

----------------------------------------------------------------------------

Jolly Jumpers

A sequence of n > 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. For instance,

1 4 2 3

is a jolly jumper, because the absolutes differences are 3, 2, and 1 respectively. The definition implies that any sequence of a single integer is a jolly jumper. You are to write a program to determine whether or not each of a number of sequences is a jolly jumper.

Input

Each line of input contains an integer n <= 3000 followed by n integers representing the sequence.

Output

For each line of input, generate a line of output saying "Jolly" or "Not jolly".

Sample Input

4 1 4 2 3
5 1 4 2 -1 6

Sample Output

Jolly
Not jolly

_________________
Codename : scirtem
Name : Enrique Iraola Metra
Student No: 199810822
Course : BS - Computer and Information Science , Major in System and Software Engineering

Success will not lower its standard to us. We must raise our standard to success. - Rev. Randall R. McBride, Jr.

scirtem
Level 0

Posts : 4
Reputation : 0
Join date : 2010-07-08
Age : 36

View user profile

Back to top Go down

Re: Programming Challege

Post by angelie on Wed Jul 21, 2010 8:46 am

cyclops

_________________
Cortez, Ma. Aura Angelie P.
200810554
3rd Year
BS in Computer Science
Director for Logistics
AY 2010 - 2011
FEU - East Asia College
maapcortez@yahoo.com
avatar
angelie
Level 0

Posts : 25
Reputation : 0
Join date : 2010-07-07

View user profile

Back to top Go down

Re: Programming Challege

Post by arscariosus on Wed Jul 21, 2010 7:18 pm

Each line of input contains an integer n <= 3000 followed by n integers representing the sequence.

waaaa. hindi ko maintindihan. T_T ibig sabihin may array[3000] ?

basag ang comprehension ko dito T_T


Last edited by arscariosus on Wed Jul 21, 2010 11:35 pm; edited 3 times in total
avatar
arscariosus
Level 0

Posts : 82
Reputation : -1
Join date : 2010-07-07
Age : 29
Location : Philippines

View user profile http://skewedbutshrewd.wordpress.com/

Back to top Go down

Re: Programming Challege

Post by paulgarcia on Wed Jul 21, 2010 8:00 pm

imba! kahirap nmn nyan.

avatar
paulgarcia
Level 0

Posts : 2
Reputation : 0
Join date : 2010-07-21

View user profile

Back to top Go down

Re: Programming Challege

Post by paulgarcia on Wed Jul 21, 2010 8:01 pm

pang CS kc....^^
avatar
paulgarcia
Level 0

Posts : 2
Reputation : 0
Join date : 2010-07-21

View user profile

Back to top Go down

Re: Programming Challege

Post by Chyrl on Thu Jul 22, 2010 12:12 am

paulgarcia wrote:pang CS kc....^^
Whether your BSCS or not, trying to solve this will increase your logic thinking.
Remember, almost all computer related courses are basically full of logic...
avatar
Chyrl
Level 0

Posts : 16
Reputation : 0
Join date : 2010-07-12

View user profile

Back to top Go down

Re: Programming Challege

Post by Chyrl on Thu Jul 22, 2010 12:13 am

arscariosus wrote:
Each line of input contains an integer n <= 3000 followed by n integers representing the sequence.

waaaa. hindi ko maintindihan. T_T ibig sabihin may array[3000] ?

basag ang comprehension ko dito T_T

Try reading between the lines.
I might help you understand what is meant by n <= 3000.
avatar
Chyrl
Level 0

Posts : 16
Reputation : 0
Join date : 2010-07-12

View user profile

Back to top Go down

Re: Programming Challege

Post by rmsalazar on Thu Jul 22, 2010 7:18 am

david signature mo..XD

_________________
Romiazon M. Salazar
VP-Internal of FEU-EAC ACM
200810023

romiazonsalazar@gmail.com
avatar
rmsalazar
Level 1

Posts : 129
Reputation : 2
Join date : 2010-07-06
Age : 26

View user profile

Back to top Go down

Re: Programming Challege

Post by arscariosus on Thu Jul 22, 2010 7:20 pm

Chyrl wrote:
arscariosus wrote:
Each line of input contains an integer n <= 3000 followed by n integers representing the sequence.

waaaa. hindi ko maintindihan. T_T ibig sabihin may array[3000] ?

basag ang comprehension ko dito T_T

Try reading between the lines.
I might help you understand what is meant by n <= 3000.

Sir I think I get the first part about the absolute differences and the 1..n-1 range. But I might be wrong. Plus I can't comprehend this line. Hmm... Each line of input... Does that mean the program could accept multiple lines of input at a time? And a line that has a single integer in it is automatically a jolly jumper?
avatar
arscariosus
Level 0

Posts : 82
Reputation : -1
Join date : 2010-07-07
Age : 29
Location : Philippines

View user profile http://skewedbutshrewd.wordpress.com/

Back to top Go down

Re: Programming Challege

Post by Chyrl on Thu Jul 22, 2010 10:02 pm

arscariosus wrote:Does that mean the program could accept multiple lines of input at a time?
Maybe, it depends on the logic of your code.
Have you acquired to right output[n] for the given input[n], where n is the number of test cases?

_________________
David Paul E. Badiola
Director for Education
200810270
chyrl@live.com
avatar
Chyrl
Level 0

Posts : 16
Reputation : 0
Join date : 2010-07-12

View user profile

Back to top Go down

Re: Programming Challege

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum