While the world community of participants of programming contests is waiting with bated breath for the news about new date and place of the Final, we decided not to delay the next round and prepared some problems on the train from Petrozavodsk to Saratov. In preparation were involved Mike Mirzayanov, Artem Rakhov and Max Ivanov. Tasks were translated into English by Maria Belova.

Good luck!

Artem Rakhov and Codeforces team

EDIT: now available.

my code is correct and is giving correct output on my system....can the moderator please let me know...what is the prob ??

You can found tests and the results below your code.

a[s[s.size()-i-1]]++;

should be

a[s[s.size()-i-1]

-'a']++;After that I got AC.

I used hash-table for checking bad triples and my solution has O(NM) time.

O(n*m~~*~~).log(k)I use C++ set And AC 140ms,O(N*M*log K).Uses Hash is also OK.

Could you tell me your problem-solving process? I cannot solve thie problem, even if using a lot of time. Maybe I need to do more practice, what is the effective?

Thanks a lot!

Practice - yes. The more I solve the faster I find solution. But reading of algo books is good idea too.

For fast solving hard problems you must solving more and more problems a lot of time. I solve nonstandard problems from primary schools. And now I cannot solve some hard problems whatever.

I must do more and more practice to improve my problem solving ability, I hope to get a red name someday... maybe I need long time.

Please explain ur solution to Problem B : Fortune Telling.

I like ur solution to this problem.

Explanation:

1) The Result must be odd.

2) If Sum is odd - return it

3) Else if there was an odd element, find the least (m) of them and subtract from Sum - this is the answer

4) Else if there are no odd elements at all, Marina doesn't love Sasha. :-( Return 0.

I couldnot recognize the problem, so I proceeded in wrong way.

Yeah .. I did the same ...

Yo man!

I got +201 ratings.....

I rock! :P

I have a question, does contribution affect one's rating? (I know that this is kinda irrelevant to this blog entry, but I dunno how to ask questions, the site doesn't have something like "support@codeforces.com " or "Contact Us", sorry anywayz)

Thanks in advance