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

Турниры > IMPC - 2013-2014 > задача:


14-05-60. 50371 - Modified Karnaugh-Map

IMPC - 2013-2014

Старт: 16.мар.2013 в 12:00:00
Финиш: 16.мар.2013 в 17:00:00
Турнир завершён!
• Турнирная таблица

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

Задачи турнира

• 14-05-10. 50723 - Tribonacci
• 14-05-20. 50677 - The Cottage
• 14-05-20. 50413 - Valid Permutations
• 14-05-30. 50688 - Epoka Furgon
• 14-05-30. 50706 - The most crowd...
• 14-05-40. 50689 - The biggest build...
• 14-05-50. 50414 - Traffic
• 14-05-50. 50421 - Repairing road s...
• 14-05-60. 50371 - Modified Kar...
• 14-05-70. 50477 - Character Pyramids
• 14-05-80. 50372 - Number Quadrup...
• 14-05-90. 50549 - k-Nearest Neigh...
• 14-05-95. 50479 - Bit Compressor
• 14-07-10. 50383 - Noisy Mornings
• 14-07-20. 50384 - Permutations revi...
• 14-07-30. 50385 - The 3n + 1 problem
• 14-07-50. 50367 - Bar Codes

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

Если у вас есть предложения или пожелания по работе 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