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

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

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.

1-use pairity
2-always yes (m>=2)

Aidin_n7
> 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.
>
> 1-use pairity
> 2-always yes (m>=2)
>
> Aidin_n7
WHy?
what you think wrong?
tell me a test case with answers u think it is.
Aidin_n7
Yuriy Frolov (ufrolov@ukr.net) use this (+) [1] // Задача 1107. Складская задача 9 янв 2003 22:09
For example this test on which your programe give wrong answer.
3 3 2
3 1 2 3
2 1 2
1 1 3
liufeng Re: use this (+) // Задача 1107. Складская задача 26 янв 2003 10:04
no
the m should be larger than n
this test is wrong!!


> For example this test on which your programe give wrong answer.
> 3 3 2
> 3 1 2 3
> 2 1 2
> 1 1 3
Yuriy Frolov (ufrolov@ukr.net) I'm sorry. But this (+)! [3] // Задача 1107. Складская задача 9 янв 2003 23:21
3 2 2
3 1 2 3
3 1 2 3
Locomotive SO what will be wrong? [2] // Задача 1107. Складская задача 10 янв 2003 09:07
> 3 2 2
> 3 1 2 3
> 3 1 2 3
~~~~~~~~~~~~~~~~~~~~
that testcase in my program gives:
YES
1
1

*** both of sets goes to first shop
*** and nothing will go to the second (as in program said: It is
possible not to send any set to one or more shops.[3line before input
in program])

*** and also 1 2 3 (first set) and (1 2 3) second set is different
and and and !!!

*** Employees of this warehouse made k different [!!!] sets of theese
goods. [line 2 of program]

~~~~~~~~~~~~~~~~~~~~~
thanks for your conversation Dear yuriy... (thanks from Aydin in Iran)
Locomotive You Are Welcome // Задача 1107. Складская задача 11 янв 2003 21:05
> You are welcome dear
Wish to have nice time...
and also i wish we help eachother to succeed in ratings ;)
Thanks again my First Frined in acm.timus.ru
Aidin_n7@hotmail.com
Илья Гофман (Ilya Gofman) Hey Aidin_n7!! Who is Nah_ni? [1] // Задача 1107. Складская задача 10 янв 2003 18:36
Is it your girlfriend?
Locomotive Re: Hey Aidin_n7!! Who is Nah_ni? // Задача 1107. Складская задача 11 янв 2003 18:46
> Is it your girlfriend?
Yes, she is who gives me help by her loves to solve this programs.
I Really love her because she is best girl i have ever seen.
Aidin_n7
5 2 6
4 1 2 3 4
4 1 5 4 3

Your answer:
YES
2
2

but this sets are similar (see task description) so they couldn't be
in one shop
Problem says:

We'll say that two sets are "similar" if one of them is obtained by
deleting one good form the second set or by replacing one good to
another.

ok?

notice that OR is XOR in mentioned sentence!
more clear:
only deleting (deleting one good form the second set)
OR
Only replacing (replacing one good to another.)

by this meaning you can`t delete and replace in same time

So:

4 1 2 3 4
4 1 5 4 3

Are not similar
because you can`t make one of them from the other one by just 1 work
you need to
1: delete 2 from first set
2: insert 5 in second set

and It`s 2 work not 1 work...
then these are not similar

Best Regards
Aidin_n7
Problem also says:
E.g. Set "1 2 3 4" is similar to sets "3 2 1", "1 2 5 3 4", "1 2 3 4
2" and "1 5 4 3"
So sets "1 2 3 4" and "1 5 4 3" are similar !!!

And in Polar's test

5 2 6
4 1 2 3 4
4 1 5 4 3

(n=5)<(m=6) and (k=2) (which satisfies problem's limitations
101>m>n>0 & k<=50000)
and string "4 1 2 3 4" defines a set consisting of 4 elements "1 2 3
4"
(but not a set "4 1 2 3 4" consisting of 5 elements).
On all fours, "4 1 5 4 3" defines a set consisting of 4 elements "1 5
4 3"
(but not a set "4 1 5 4 3" consisting of 5 elements).
Therefore, this test is absolutely correct    :)

Stinger
I agree with Stinger. However this solution gets accepted (though it
distributes sets 1 and 2 - 1 3 5 6 4 and 1 3 5 6 3 -from the example
at the same shop, and they seem simillar to me). So either the tests
used are very bad, or the problem text is unclear...
the host is so clever ,you use the bug of this problem.there are not the same is good.only two shop is ok
The description of the problem is definately unclear.

For example "...or by replacing one good to
another."

What is replacing ???

1. We can get a good for replacing in the warehouse or
2. Replacing is when we take a good from one set and put it into another one. Then the sets 1 2 3 and 1 2 3 7 7 are the same, because we can get 7 from the second set and put it into the first set. We'll have 1 2 3 7 and 1 2 3 7.