vepifanov's blog

By vepifanov2 months ago, In Russian

Финал Facebook Hacker Cup 2012. В основном виды прилегающей местности.

Фото здесь.

Read more »

 
 
 
 
  • Vote: I like it  
  • +26
  • Vote: I do not like it  

By vepifanov8 months ago, In Russian

Финал TopCoder Open в Голливуде (Флорида, США) 25 - 29 сентября 2011 года.


Фото здесь.

Read more »

 
 
 
 
  • Vote: I like it  
  • +20
  • Vote: I do not like it  

By vepifanov8 months ago, In Russian

Финал Russian Code Cup в Москве 17-18 сентября 2011 года.

Фото здесь.

Read more »

 
 
 
 
  • Vote: I like it  
  • +62
  • Vote: I do not like it  

By vepifanov9 months ago, In Russian

Поездка сборной команды Поволжья на финал Google Code Jam 2011 в Токио.


Тексты здесь, здесь.
Фото здесь.


Read more »

 
 
 
 
  • Vote: I like it  
  • +33
  • Vote: I do not like it  

By vepifanov13 months ago, In Russian
 
 
 
 
  • Vote: I like it  
  • +64
  • Vote: I do not like it  

By vepifanov19 months ago, translation, In English

A. Towers
The total number of towers is equal to number of different numbers in this set. To get the maximum height of the tower, it was possible to calculate for each length the number of bars with this length, and from these numbers is to choose the maximum.

B. Computer Game
Constraints in the problem allows us to solve it this way: we keep the current number of health from the boss, and current summary damage from used scrolls per second. At the next step, we choose which scrolls we can use in the current second. Of all these, we find the scroll, which causes the most damage, and apply it. If at some point we could not use any of the scrolls, and the current damage in one second does not exceed regeneration, we deduce that there are no answers. Otherwise, continue to iterate the algorithm until the number hit points will be nonnegative.

C. Old Berland Language
One of the easiest to understand solutions of this problem is as follows: sort the words in ascending order of length, while remembering their positions in the source list. We will consistently build our set, starting with the short strings: strings of length one can only be strings "0" and "1". If the number of words of length one in a set are more than two, hence there are no answers. Add the desired number of strings of length one to answer, and remove it from the current list. Then look at the string of length two: each of the remaining strings of length one can be extended in two ways (having added to each of these symbols 0 and 1). Add the desired number of strings of length two in our answer, and then increase the length of the remaining strings by one. Continue this process, until we get all words from the input set. You can see that if at some moment the number of allowable words exceeded the number of remaining, the extra words can be ignored and solution takes O (N * the maximum length of input set) time.

D. Lesson Timetable

This problem is solved by dynamic programming:

state of dynamics will be a pair of numbers - the number of current room and number of groups which have first lesson in the room with a number not exceeding the current and for which the second room is not defined yet. For each state check all possible number of groups for which the second lesson will be held in the current classroom. When you add an answer from the new state, it must be multiplied by the corresponding binomial coefficients (the number of ways to select groups which have the first lesson in next room - Xi + 1, and the number of ways to select groups which have the second lesson
in the current classroom).

 

E. Trial for Chief

First, we construct the following graph: each cell we associate a vertex of the same color as the cell itself. Between neighboring cells hold an edge of weight 0, if the cells share the same color and weight of 1, if different. Now, for each cell count the shortest distance from it to the most distant black cell (denoted by D). It is easy to see that we can construct a sequence of D + 1 repainting leads to the desired coloring:

  • The first step of color all the cells at a distance less than or equal to D in black color
  • At the second step color all the cells at a distance less than or equal to D - 1 in white
  • Etc.

Of all the cells, choose the one for which this distance is minimal, and this distance increased by one will be the answer to the problem.

Read more »

 
 
 
 
  • Vote: I like it  
  • +32
  • Vote: I do not like it  

By vepifanov19 months ago, translation, In English
Good evening!

Today I am the author of problems. I'm studying in Nizhny Novgorod State University (2 year, Mechanics and Mathematics). I want to thank the staff codeforces for assistance in preparing the contest, and, personally, Artem Rakhov and Maria Belova (for translations of problems into English). Also special thanks to Alexei Shmelev (NNSU) for writing alternative solutions.

P.S. Unfortunately, this round could be in error to register a team. For teams participating in this round will be counted "out of competition", ie, rating of participants does not change. If you register a team by mistake, you can unregister and register in person.

UPD: After the contest start, it will be available PDF-versions of the statements:
UPD: The contest is over, congratulate Ivan Popelyshev, who won this round. He was the only one who has successfully solved all five problems.

Link to results.


UPD: Tutorials are available.

Regards,
Vladislav Yepifanov.
Прослушать
На латинице

Read more »

 
 
 
 
  • Vote: I like it  
  • +79
  • Vote: I do not like it