Cypher Roulette
Здравейте, имам проблем със следната задача:
You will be given an integer N. On the next N lines, you will receive some strings.
The strings will be either:
sequences of random characters
or the command - "spin"
If they are normal random characters, you should append them to one another in the cypher string.
If the command "spin" is entered, every string entered after it should be appended at the start
of the cypher string, if the command "spin" is entered again after that, you should again begin to append
them at the end of the cypher string. And so, the append direction changes each time you enter the command
"spin".
If two equal strings are entered two consecutive times, the cypher resets - emptying the cypher string. This rule
also applies to the "spin" command.
Note: the "spin" commands do not count towards the N count.
Каквото и да напиша излиза както трябва,не виждам условие което да не съм спазил но judge ми дава 80/100. Знам, че има друга такава тема, но аз искам да разбера какде са пропуските в моето решение. Ето го и него:
http://pastebin.com/EP14ySM0