eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

XYZX 2009

XYZX 2009

Ежегодное соревнование по программированию XYZX известно своими необычными условиями задач. Технический координатор соревнования, известный как Снусмумрик, преднамеренно в условиях задач оставляет некоторую вольность толкования, чтобы участники соревнования сами догадались про упущенные условия из приведенных в условии тестовых данных, из предисловия задачи или эпиграфа, или даже что-то додумали сами. Эта особенность проявилась также и в последнем XYZX-2009 соревновании. Миша принимает участие в Четвертьфинале Енисейска, и он снова столкнулся с той же проблемой: почему его полностью правильная программа не проходит пробные тесты. Условея задачи на английском языке. Ему также известно, что ложным в условии является только одно предложение. Более того, ему известны правила по которым можно восстановить изначальное условие, которое автор имел в виду. Это очень просто: слово "not" может быть вставлено в тексте после одного из слов "can", "may", "must", "should"; слово "no" может быть вставлено после фраз "is", "are". Слова "not" и "no" должны вставлятся в точности как пишутся: "Not", "nO" и другие варианты запрещены. Остальные упомянутые слова не являются чувствительными к регистру, поэтому Вы можете вставить "not" после "Can", или вставить "no" после "ARE". Если после "is" или "are", куда Вы вставляете "no", присутствует любой артикль ("a" или "the"), то артикль следует убрать. Misha wants to get the list of all the possible reasons that his program doesn't work on the sample tests. A reason here is a sentence where a negation can be applied. Remember that no two negations can be applied simultaneously, neither in one sentence nor in different sentences. \InputFile The input file contains the text of the problem statement containing latin letters, single spaces and dots. Every sentence has a dot at the end (which is not considered the part of the last word). Words are separated with a single space. There is no space before any dot. There is exactly one space after each dot unless that dot follows the last sentence; in that case, the dot is followed by a newline, and then the input file ends. When inserting a word "not" or "no" after some word, you must first insert a single space, then the corresponding word immediately. The size of the input file doesn't exceed 1024 bytes. \OutputFile The output file must first contain an integer \textit{k} on a line by itself --- the number of ways the problem statement can be understood differently. Then \textit{k} lines must follow. Each line should contain one sentence from the initial text with exactly one negation applied. You must list all the possibilities (the lines are wrapped in the sample output just for better visibility; you must output one sentence per line). All the variants of negation must go in the natural order: all the negations that can be inserted in the first sentence, then all the negations that can be inserted in the second sentence, etc. Inside one sentence, first goes the negation that is applied after the first word (if applicable), then the one that is applied after the second word, etc. You must not change the case of the letters in the words that you copy from the initial sentences. Your words must still be separated with single spaces, and the same rules apply to the dots at the ends of the sentences, as they do for the input sentences.
Лимит времени 2 секунды
Лимит использования памяти 256 MiB
Входные данные #1
There is a field with label K on the field. There is a field with label G on the field. You must intersect the rectangle with each of the given rectangles separately. Two different particles can annihilate each other in case of collision. There must be a blank line after each test case output. Two different ways to insert a symbol into the expression are considered the same if the resulting expressions viewed as strings are equal. Misha can find out whether this problem statement can be understood correctly at all.
Выходные данные #1
9
There is no field with label K on the field.
There is no field with label G on the field.
You must not intersect the rectangle with each of the given rectangles separately.
Two different particles can not annihilate each other in case of collision.
There must not be a blank line after each test case output.
Two different ways to insert a symbol into the expression are no considered the same if the resulting expressions viewed as strings are equal.
Two different ways to insert a symbol into the expression are considered the same if the resulting expressions viewed as strings are no equal.
Misha can not find out whether this problem statement can be understood correctly at all.
Misha can find out whether this problem statement can not be understood correctly at all.
Автор Пётр Митричев
Источник Зимняя школа, Харьков 2011, День 8