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

Разделы > Неотсортированные > задача:


SAME OR DIFFERENT

Задачи раздела

• Coins
• Primes
• Providers
• A to the power of B
• A Palace with Many Columns
• X to the power of Y
• A+B
• T-shirts
• SAME OR DIFFERENT
• GCF
• REVERSE ORDER OF WORDS
• Factorial
• Maximum
• Name-Surname
• Decimal to binary
• Heap
• Herons

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

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

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

Title

Description:

 

Chessboard is the type of board used in the game of chess, and consists of 64 squares (eight rows and eight columns) arranged in two alternating colors (black and white). The columns are labeled by the letters a to h from left to right, and the rows by the number 1 to 8 from down to up.

 

Your task is to determine whether the two coordinates are same color or not.

 

Input:

 

The first line on the input contains a number T(1<T<100). A next each T line contains two coordinates of chessboard.

 

Output:

 

Your output should contain T lines. In each line write “SAME” if the correspondent coordinates are same, otherwise write “DIFFERENT”.

 

Sample input:

 

3

d2 g7

a1 c2

f3 c6

 

 

Sample output:

 

SAME

DIFFERENT

SAME

 

 

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

www.contester.ru