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

Обсуждение задачи 1107. Складская задача

Can anybody help me with an idea for this problem?
Послано bleah 9 сен 2002 16:45

 If there whould be no cicles then a topological sort would do the
job but I can't figure out how to solve the problem ...
Re: Can anybody help me with an idea for this problem?
Послано Locomotive 9 янв 2003 00:46
>
>  If there whould be no cicles then a topological sort would do the
> job but I can't figure out how to solve the problem ...

look@ mine:


Var
  i,k,t               :word;
begin
  readln(i,k,t);
  writeln('YES');
  for i:=1 to k do
  begin
    readln(t);
    writeln(2-(t mod 2));
  end;
end.


!!!!
Re: Can anybody help me with an idea for this problem?
Послано TheDreamCatcher 13 дек 2010 09:11
Locomotive писал(a) 9 января 2003 00:46
>
>  If there whould be no cicles then a topological sort would do the
> job but I can't figure out how to solve the problem ...

look@ mine:


Var
  i,k,t               :word;
begin
  readln(i,k,t);
  writeln('YES');
  for i:=1 to k do
  begin
    readln(t);
    writeln(2-(t mod 2));
  end;
end.


!!!!

It's stupid text... get WA1 & Locomotive didn't get AC
Re: Can anybody help me with an idea for this problem?
Послано sbidujko 6 сен 2011 17:41
There is very simple idea how distribute all K sets to these M shops.It can to do in one line of code, very important that N<M! (Of course, answer YES always)

Edited by author 06.09.2011 17:53