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

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


SAME OR DIFFERENT

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

• Wonder primes
• Round numbers
• Sum less than N
• Perfect numbers
• Sum of N numbers
• How many digits?
• find the numbers
• Fibonacci Series
• SAME OR DIFFERENT
• Binary to decimal
• Decimal to binary
• How many divisors?
• Find the biggest 2
• Find the biggest 3
• Tower of Happiness
• Going to the Movies
• A to the power of B

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

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