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

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

wow i got AC with less than 10line prog!!!!!
Послано Locomotive 9 янв 2003 00:45
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
But this means that bad tests because it's wrong solution. I don't understand why you got accepted!!!
Послано Yuriy Frolov (ufrolov@ukr.net) 9 янв 2003 03:31
> 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
Re: But this means that bad tests because it's wrong solution. I don't understand why you got accepted!!!
Послано Locomotive 9 янв 2003 19:53
WHy?
what you think wrong?
tell me a test case with answers u think it is.
Aidin_n7
use this (+)
Послано Yuriy Frolov (ufrolov@ukr.net) 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
I'm sorry. But this (+)!
Послано Yuriy Frolov (ufrolov@ukr.net) 9 янв 2003 23:21
3 2 2
3 1 2 3
3 1 2 3
SO what will be wrong?
Послано Locomotive 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)
You are right!!!I think that 1 2 3 and 1 2 3 are similar.Thanks for conversation.
Послано Yuriy Frolov (ufrolov@ukr.net) 10 янв 2003 14:38
Hey Aidin_n7!! Who is Nah_ni?
Послано Илья Гофман (Ilya Gofman) 10 янв 2003 18:36
Is it your girlfriend?
Re: Hey Aidin_n7!! Who is Nah_ni?
Послано Locomotive 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
You Are Welcome
Послано Locomotive 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
Re: use this (+)
Послано liufeng 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
If you yet want to see test on wich this program fails
Послано Agh 15 фев 2003 00:28
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
you mistake indeed! and don`t understand what does "similar" means
Послано Locomotive 3 июн 2003 21:19
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
Re: you mistake indeed! and don`t understand what does "similar" means
Послано Stinger 4 июн 2003 11:19
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
Re: you mistake indeed! and don`t understand what does "similar" means
Послано Vlad Ionescu 7 июн 2003 18:27
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...
Re: you mistake indeed! and don`t understand what does "similar" means
Послано ChenXiXing(SCAU) 20 апр 2004 15:36
the host is so clever ,you use the bug of this problem.there are not the same is good.only two shop is ok
Re: you mistake indeed! and don`t understand what does "similar" means
Послано Igor Dex 18 май 2004 00:51
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.