You are registered for the 2008 TopCoder(R) Open Algorithm Competition.

Прям неделя регистраций получается. На прошлом чемпионате я оттупил, но получил майку. Интересно, что будет в этот раз.. Квалификация 5/9/12 февраля. Осталось недолго %) Квалификация - 1650 участников, проходит 550 лучших.

З.Ы. Зачастил я с дневниками что-то..  

Комментарии (11)

jkm 31. января, 2008.г.  
 0 0
wad, и как задачка? :)
jkm 30. января, 2008.г.  
 0 0
Problem Statement

     Musical notes are are given the following 12 names, in ascending order:

    A, A#, B, C, C#, D, D#, E, F, F#, G, G#

The names repeat for higher and lower notes, so the note one step higher than "G#" is "A" and the note 5 steps lower than "B" is "F#". Notes that are a multiple of 12 steps apart have the same name, and for our purposes we will consider them equivalent.

Guitars have a number of strings, and each string is tuned to sound one of the 12 notes. The note each string sounds is called its "open" note. Underneath the strings are frets, numbered starting at 1, which are used to change the note a string sounds. If you press a string against the i-th fret with your finger, the note will be i steps higher than the string's open note. (i.e., if you press a string tuned to "C#" against the 3rd fret, it will sound the note "E").

Chords are sets of notes played at the same time. To play a chord on a guitar, each string must sound one of the notes in the chord, and each note in the chord must be played on at least one string.

There can be many ways to play the same chord. We measure the difficulty of one way to play a chord as the amount you must stretch your fingers to reach the required frets. Calculate this as the lowest fret used subtracted from the highest fret used, plus 1. Only consider the strings which are pressed against frets -- the strings that are not pressed against frets (and, thus, sound their open note) do not affect the difficultly of a chord. If a chord can be played without using any frets at all, its difficulty is zero.

You are given a String[] strings, each element of which is the open note of one string on the guitar, and a String[] chord, each element of which is one note in a chord. Return the lowest possible difficulty value necessary to play that chord.

  
Definition
     Class: GuitarChords
Method: stretch
Parameters: String[], String[]
Returns: int
Method signature: int stretch(String[] strings, String[] chord)
(be sure your method is public)

    

  
Constraints
- strings and chord will each contain between 1 and 6 elements, inclusive.
- chord will not contain more elements than strings.
- Each element of strings and chord will be one of the 12 note names given in the problem statement.
- chord will not contain any duplicate elements.
wad (56) 30. января, 2008.г.  
 0 0
да любое, просто для общего представления, какого уровня задания.
jkm 30. января, 2008.г.  
 0 0
там 3 по сложности, да ещё деление на дивизионы.. сейчас выложу с последнего СРМ третье задание второго дивизиона.
wad (56) 30. января, 2008.г.  
 0 0
а образец задания можно посмотреть? из алгоритмов конечно.
jkm 30. января, 2008.г.  
 0 0
Там 4 доступных языка. Выбирай любой. Причём задания можно решать на разных языках.
BOPOH (48) 30. января, 2008.г.  
 0 0
пока что я видел тока .NET и Java. C/C++ ok
jkm 30. января, 2008.г.  
 0 0
ВОРОН, их Арена - на джаве. Решать же задачи можно но ней же, а так же на C++, C# и VB.NET.
jkm 30. января, 2008.г.  
 0 0
Соревнования. Так есть адские кодеры. Каждые месяц проходят SRM (Single Round Match). А это именно что-то вроде чемпионата. Эт я только про Algorithm Competition. Подробнее - http://www.topcoder.com/tc?module=Static&d1=tournaments&d2=tco08&d3=about. Заинтересует форма проведения - расскажу.
BOPOH (48) 30. января, 2008.г.  
 0 0
не не. там где Java - нет меня
Виртулис (34) 30. января, 2008.г.  
 0 0
Чо за хрень-то такая? :)
Похожие записи

jkm