1 / 1 / 0
Регистрация: 11.05.2009
Сообщений: 10
|
|
1 | |
Помогите перевести и понять условие задачи, пожалуйста21.10.2009, 21:25. Показов 1898. Ответов 18
Метки нет (Все метки)
Once, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and indeed, she gave birth to a nice son.
Unfortunately, as it used to happen in royal families, the son was a little retarded. After many years of study he was able just to add integer numbers and to compare whether the result is greater or less than a given integer number. In addition, the numbers had to be written in a sequence and he was able to sum just continuous subsequences of the sequence. The old king was very unhappy of his son. But he was ready to make everything to enable his son to govern the kingdom after his death. With regards to his son's skills he decided that every problem the king had to decide about had to be presented in a form of a finite sequence of integer numbers and the decision about it would be done by stating an integer constraint (i.e. an upper or lower limit) for the sum of that sequence. In this way there was at least some hope that his son would be able to make some decisions. After the old king died, the young king began to reign. But very soon, a lot of people became very unsatisfied with his decisions and decided to dethrone him. They tried to do it by proving that his decisions were wrong. Therefore some conspirators presented to the young king a set of problems that he had to decide about. The set of problems was in the form of subsequences (Si{Asi;Asi+1...Asi+ni}) of a sequence (S{A1;A2....An}) . The king thought a minute and then decided, i.e. he set for the sum (Asi+Asi+1+...+Asi+ni) of each subsequence Si an integer constraint ki (i.e. (Asi+Asi+1+...+Asi+ni < ki) or (Asi+Asi+1+...+Asi+ni > ki) resp.) and declared these constraints as his decisions. After a while he realized that some of his decisions were wrong. He could not revoke the declared constraints but trying to save himself he decided to fake the sequence that he was given. He ordered to his advisors to find such a sequence S that would satisfy the constraints he set. Help the advisors of the king and write a program that decides whether such a sequence exists or not. Input The input file consists of blocks of lines. Each block except the last corresponds to one set of problems and king's decisions about them. In the first line of the block there are integers n, and m where (n от 0 до 100) is length of the sequence S and (m от 0 до 100) is the number of subsequences Si. Next m lines contain particular decisions coded in the form of quadruples si, ni, oi, ki, where oi represents operator > (coded as gt) or operator < (coded as lt) respectively. The symbols si, ni and ki have the meaning described above. The last block consists of just one line containing 0. Output The output file contains the lines corresponding to the blocks in the input file. A line contains text successful conspiracy when such a sequence does not exist. Otherwise it contains text lamentable kingdom. There is no line in the output file corresponding to the last ``null'' block of the input file. Sample Input 4 2 1 2 gt 0 2 2 lt 2 1 2 1 0 gt 0 1 0 lt 0 0 Sample Output lamentable kingdom successful conspiracy
0
|
21.10.2009, 21:25 | |
Ответы с готовыми решениями:
18
Не могу понять условие задачи Не могу понять условие задачи Понять условие для задачи Понять условие олимпиадной задачи |
1 / 1 / 0
Регистрация: 11.05.2009
Сообщений: 10
|
|
22.10.2009, 15:20 [ТС] | 3 |
да уш ......
я думал тут реально люди хоть чтото знают ...
0
|
1 / 1 / 0
Регистрация: 11.05.2009
Сообщений: 10
|
|
22.10.2009, 18:47 [ТС] | 5 |
где ж эти знающие ?
тупо зафигачить текст в переводчик это извените меня много ума надо ...
0
|
1 / 1 / 0
Регистрация: 11.05.2009
Сообщений: 10
|
|
22.10.2009, 20:48 [ТС] | 7 |
если вы это называете переводом ... а как же 'понять' условие .
в подобных переводчиках получается полная чушь . я и сам наверное догадался бы запихнуть текст в транслэйт.ру . подразумевалось что на форуме есть программисты ... однако я ошибся . чтож буду искать помощи в другом месте .
0
|
Супер-модератор
8783 / 2536 / 144
Регистрация: 07.03.2007
Сообщений: 11,873
|
|
22.10.2009, 22:40 | 9 |
патолок, вам, походу, не программисты, а переводчики нужны
1
|
1 / 1 / 0
Регистрация: 11.05.2009
Сообщений: 10
|
|
23.10.2009, 15:00 [ТС] | 10 |
если программист не знает англ яз то он не программист . а это задание взято из архива международных олимпиад по программированию ....
0
|
1183 / 468 / 87
Регистрация: 23.06.2009
Сообщений: 6,390
|
|
23.10.2009, 15:04 | 11 |
а с чего вы взяли что я или VoodooMan не знаем английского?если есть переводчик,то можно и самим не переводить...это 21ый век,таким образом еще переводили до нашей эры,технолоигии развеваются,надо ими пользоваться а не попросту времени тратить...
0
|
4217 / 3412 / 396
Регистрация: 15.06.2009
Сообщений: 5,818
|
|
23.10.2009, 16:01 | 12 |
И зачем не знающему английского, следовательно - не программисту, задачи по программированию?
ИзвЕните, если что не так P.S. Ubi nihil vales ibi nihil velis
0
|
Супер-модератор
8783 / 2536 / 144
Регистрация: 07.03.2007
Сообщений: 11,873
|
|
24.10.2009, 01:29 | 14 |
Том Ардер,
Не по теме: Ubi nihil vales ibi nihil valis (гугль помог)
0
|
4217 / 3412 / 396
Регистрация: 15.06.2009
Сообщений: 5,818
|
|
24.10.2009, 02:20 | 15 |
Offtopic:
http://ru.wikiquote.org/wiki/%... 86%D1%8B#U * Ubi nihil vales, ibi nihil velis Дословный перевод: Где ты не имеешь силы, там ничего не желай http://www.hrono.info/religia/latina.html ex nihilo nihil fit - из ничего ничто не происходит (Меллис, 5 в. до н.э. Лукреций)
0
|
Супер-модератор
8783 / 2536 / 144
Регистрация: 07.03.2007
Сообщений: 11,873
|
|
24.10.2009, 02:22 | 16 |
Том Ардер,
Не по теме: обманул значит гугль)))
0
|
4217 / 3412 / 396
Регистрация: 15.06.2009
Сообщений: 5,818
|
|
24.10.2009, 03:15 | 17 |
Оффтопик:
Нет, вот с первой страницы гугля Латинские фразеологические обороты ex nihilo nihil fit - из ничего ничто не происходит (Меллис, 5 в. до н.э. Лукреций) ..... ubi nil vales, ibi nil velis - где ты ни на что не способен, ... www.hrono.info/religia/latina.html - Сохранено в кэше - Похожие
0
|
8384 / 3616 / 419
Регистрация: 03.07.2009
Сообщений: 10,709
|
|
24.10.2009, 10:26 | 19 |
МедведЪ, закрыл
1
|
24.10.2009, 10:26 | |
24.10.2009, 10:26 | |
Помогаю со студенческими работами здесь
19
Не могу понять условие задачи - 2 Не могу понять условие задачи Не могу понять условие задачи - 3 (Elixir) Не могу понять условие задачи - 5 (Elixir) Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |