ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1530. Ones and Zeroes

Yosif Yosifov A hint ? [8] // Задача 1530. Ones and Zeroes 20 фев 2007 01:33
Can someone give me a little hint, please ?
KIRILL(ArcSTU) Re: A hint ? [7] // Задача 1530. Ones and Zeroes 20 фев 2007 01:44
make 2 sequences (s1 and s2) such that s1[i]+s2[i]<>2
Ivan Ivanov Re: A hint ? [6] // Задача 1530. Ones and Zeroes 20 фев 2007 12:28
My solution is based on a greedy approach.
Yosif Yosifov Re: A hint ? [5] // Задача 1530. Ones and Zeroes 21 фев 2007 02:38
Thank you both ! :-)
svr Re: A hint ? [4] // Задача 1530. Ones and Zeroes 21 фев 2007 09:04
I think that an algorithm has many special cases.
Main rool:to correct firstly s2[i] from 1 to 0 in
pair s1[i]=1 and s2[i]=1 diminishing B
but have pair 0, 0 in older position correcting it to 0, 1
for final increasing lexiographicly of B
Who can find all cases he solve the problem
svr Re: A hint ? [2] // Задача 1530. Ones and Zeroes 21 фев 2007 13:57
After getting AC i have counted 6 cases
next tests correspong each of cases
4
1011
0011

1011
0100

4
1010
0111

1011
0000

4
1011
0110

1100
0000

4
1111
0101

0000
0000

4
1010
0101
1011
0000

4
1011
0100

1100
0000

Edited by author 21.02.2007 13:58
Soul Reaver Re: A hint ? [1] // Задача 1530. Ones and Zeroes 20 мар 2007 01:04
My program successfully passed all of your test cases, but I still WA3... What can it be???
svr Re: A hint ? // Задача 1530. Ones and Zeroes 20 мар 2007 08:26
You are need in additional tests
Best if you will create them yourself
Denis Koshman Re: A hint ? // Задача 1530. Ones and Zeroes 14 июл 2008 01:47
I have only 3 cases
1) attempt to build a >b
2) attempt to build a+1 0
3) build 0 0