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

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


XOR

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

• Letter
• Odd or Even
• Short name
• Shymbulak
• Sultan's game
• Sum of digits
• Train
• Word Break
• XOR
• sravnenie
• №1 Практикалык иш. Вариант 1
• №1 Практикалык иш. Вариант 10
• №1 Практикалык иш. Вариант 11
• №1 Практикалык иш. Вариант 12
• №1 Практикалык иш. Вариант 13
• №1 Практикалык иш. Вариант 14
• №1 Практикалык иш. Вариант 15

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

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

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

xor

You are given numbers N, x and a sequence of N numbers. Find the largest possible interval of conse-

quently following elements, such that "xor"of these elements is not less than x. I.e., more formally, nd

such i and k that

ai  X ai+1  X … X  ai+k 1 >= x, 1 <= i >= i + k - 1 <= N,

and k is largest possible positive number.

It's guaranteed that for each test from the testset such an interval exists.

We remind you that xor() operation is applied to numbers in binary representation, so that for each

pair of bits the following is true:

0 X 0 = 0

0 X 1 = 1

1 X 0 = 1

1 X 1 = 0

The result of this operation doesn't depend on the order of operands ab = ba. Moreover (a(ab)) = b.

In Pascal this operation is represented as xor. In C/C++/Java as ^.

Input

The rst line of input contains N (1  N  250 000) and x (0  x  1 000 000 000). The second line of

input contains N non-negative numbers not exceeding 109.

Output

The rst line of output must contain two numbers: i and k. In case of many solutions output the one with

the smallest i.

Examples

c.in c.out

4 6

6 1 2 4

2 3

Note

In 40% testcases N  35 000.

In 80% testcases N  100 000.

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

www.contester.ru