Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Question for Dwite#4 Problem 4
Index -> CompSci.ca, Contests -> DWITE
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
d310




PostPosted: Wed Jan 18, 2012 3:54 pm   Post subject: Question for Dwite#4 Problem 4

"At the beginning of a player?s turn, if the blocks form a ladder- a sequence of either non-increasing or non-decreasing heights- that player loses. "

How long of a sequence is needed for a ladder to be formed?
For example:
0 2 2 2 0 is a ladder.
Sponsor
Sponsor
Sponsor
sponsor
Cyril




PostPosted: Wed Jan 18, 2012 4:35 pm   Post subject: RE:Question for Dwite#4 Problem 4

No, "form a ladder" means "are a sequence of non-increasing or non-decreasing heights".

0 2 2 2 0 is not a ladder.
1 2 3 4 3 is not a ladder.

1 2 3 4 5 is a ladder.
5 4 3 2 1 is a ladder.
1 2 2 3 3 is a ladder
1 1 1 1 1 is a ladder.
Display posts from previous:   
   Index -> CompSci.ca, Contests -> DWITE
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: