ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Kovrov IT > задача:


50371 - Modified Karnaugh-Map

Гость
• Вопросы к жюри (1)

Задачи сборника

• 50371 - Modified Karnaugh-Map
• 50382 - Parkside's Other Triangle
• 50413 - Valid Permutations
• 50406 - Draw Pattern 178
• 50861 - The largest Student Group
• 50418 - Student averages
• 50420 - Teachers Sightseeing
• 50384 - Permutations revisited
• 50841 - My grand-grand-grandfather

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
By Ardit Meti.

Modified Karnaugh-Map

Your professor wants you to find which value A,B,C or D changes in two different indexes. e.g. if he gives 11 and 10,

  • for 11: A=1; B=0; C=1; D=1;
  • for 10: A=1; B=0: C=1; D=0;
so you should print D.

Question:

  • You are given 2 numbers. You will give the result only if they are in same row or column, you can't pick 0 and 5 for example.
  • Also the numbers must be adjacent or border numbers, for ex. 4 and 6; 0 and 8. You can't have 0 and 12 or 0 and 3.
  • The indexes 0-15 are as shown in figure.

Question: Write a program that gets two numbers which are between 0 and 15. Then, your program finds which letter A,B,C or D is different or changes in those indexes.

Input specification
You will be two different numbers between 0 and 15.

Output specification
Show one letter (capital): which value (0 or 1) is different or changes in those indexes. If any of the two restrictions are violated print "ERROR"

 Sample Input I     Sample Input II   
 0 2
 5 15
 Sample Output I     Sample Output II   
 C

 ERROR


Для отправки решений необходимо выполнить вход.

www.contester.ru