Цитата:
Сообщение от Nadir Zaitov
Так задачки были разные или поручено не разглашать эту задачку?
|
я так понял - разные. Например такая:
Цитата:
Mastermind is a game of two players. In the beginning, first player decides a secret key, which is a sequence (s1,s2,...sk) where 0 < si <= n, Then second player makes guesses in rounds, where each guess is of form (g1,g2, ...gk), and after each guess first player calculates the score for the guess. Score for a guess is equal to number of i's for which we have gi = si.
For example if the secret key is (4,2,5,3,1) and the guess is (1,2,3,7,1),then the score is 2, because
g2 = s2 and g5 = s5.
Given a sequence of guesses, and scores for each guess, your program must decide if there exists at least one secret key that generates those exact scores.
|
Вроде не сложно, но, к сожалению, в списке принимаемых ЯП нет паскаля. а на С я только портировать час буду )
Или, тестовая - аналог ханойских башень, но с задаваемым к-вом колышков (3<= K<=5) и дисков (1<= N<=8)