Добро пожаловать на 2014-2015 CT S02E11: Codeforces Trainings Season 2 Episode 11 (2011-2012 ACM-ICPC Latin American Regional Contest + Extended). Продолжительность тренировки — 5 часов. Тренировка открыта как для команд, так и для индивидуальных участников. После ее окончания вы можете дорешивать задачи тренировки или поучаствовать в ней виртуально, если не смогли принять участие одновременно со всеми. Пожалуйста, участвуйте в тренировке честно.
Так как это тренировка, то возможно набор задач будет расширен, если для значительного количества участников он окажется простым.
Условия задач будут на английском языке, ведь мы же готовимся к ACM-ICPC!
Удачи!
Will you or someone else answer the questions about the problems? Last gym I have a question but no one answer in the end...
thanks MikeMirzayanov for all contest in Gym :)
not able to download the problem statement
not able to download problems statement
is this contest open for all ?
Do you talk by yourself?
no actually i am not able to download the problem statement can you help me its my first GYM
screenshot will also be ok !!!
link for download
thank you very much dude
your welcome
tried to stop myself but it's "you're welcome".
How to solve D?
You have to create a trie for the portuguese words and a trie for the reversed spanish words, then, the number of words will be: (states of port trie-1) * (states of span trie-1)-(repeated words).
You can find the repeated words by travessing both tries.
I had a similar solution where I traversed the Portuguese trie, and if a node didn't have an edge for a letter C, then I added the number of Spanish suffixes starting with letter C to the answer (which can be easily computed by going through Spanish trie once). The logic is that all resulting words will be identified by their longest Portuguese prefix. The only exception are words that are actual prefixes of Portuguese words, but those are easy to deal with by making sure there is a Spanish word ending in its last letter.
How is problem J solved?
Hi,
I have succesfully solved with segment trees.Here's my source-code : http://pastebin.com/pszpyk2U
Best wishes.
Thank you for help.
How to solve the problems B and H?
To solve problem H you have to realize that for the condition to be held, the path must consist of bridges only. After you generate the graph of the bridges, the queries can be replaced by the question: Do S and T belong to the same component?
For B, rotate the pyramid so that the top is in (0,0) and rows become diagonals. Now if you took the ball at (i,j), you also need to take all balls in the rectangle from (0,0) to (i,j). Now the problem can be solved with simple DP that answers the question for rows starting from i, and columns up to j.
Sorry but I'm a bit sucked. Can you provide the dp state representation and transition? thanks
F in all tests in problem C doesn't exceed 100, what is very strange due to statement 105 border =)
UPD: Sorry, but that was lie. Code with assert(f < 100 * 1000) gave me RE2. The mistake was in bad-showed test.
http://mirror.codeforces.com/contest/475/submission/8883485
Why I got TLE on test 2 on problem A? I used O(n) solution.
http://mirror.codeforces.com/gym/100540/submission/8871278
Happened with us too.Use faster input method.