Долго не мог понять, в чём проблема. Не используйте вещественные типы, всё должно быть целочисленное, нельзя даже умножать период на 0.4 и 0.7, лучше домножить на 10. Может кому-то это поможет... What range have 1st step? For example, for MEDUIM (period == 500) is it [0..499] or [0..500] ? The same question for last step: [Tmax-perion, Tmax-1] or [Tmax-period,Tmax] ? And, output is defined incorrectly a bit: "In the first line output the number of “PERFECT” step-periods, ..." - any word about word "Perfect" in output. Follow the format, described in sample. Range is of couse [0;500) It's quite obvious. We have only three logical possibilities for that: [0;500] is ambiguous because it overlaps with [500;1000]. (0;500), [0;500) and (0;500] can be tested vs. input. Dance Level Bonus is 0 if Dance Points were negative at any stage during the game (even if final value is non-negative). It's not quite logical because first MISS/BOO ruins bonus for entire game, even if the rest was PERFECT. But that's it :) Зачем столько неясностей в условии оставлять, да ещё и, не скрывая этого, говорить "try both variants". А если не секрет, где здесь неясности? я их что-то не увидел... Неясность в правилах вычисления Dance Level Bonus, совершенно непонятно, в каком их порядке применять. И как оказалось этот порядок отнюдь не от первого к последнему. Неясность какой промежуток времени считать бит-периодом. Какие границы включать в бит-период, а какие нет? Кстати в условии сказано, "A period between two consecutive beats is called a beat-period", т.е. границы не включая, на самом деле это не так. Edited by author 31.08.2007 01:58 Statement + Sample give you clear undestanding of what you should do. At least, I accepted this problem during the contest... P.S. And Dance Level Bonus computing order is right - from first to last item. So, you should debug your program... Edited by author 31.08.2007 22:00 Я согласен с "Vedernikoff Sergey" по сэмплу можно все понять. Я сдал эту задачу и порядок у меня там не от первого к последнему. Сэмпл не дает ответа на "граничные" вопросы, там можно менять уловия и ответ будет правильным. Edited by author 31.08.2007 22:43 Кто то может понять сэпл, кто то нет. А кому то просто повезло и он правильно интерпретировал то, что можно интерпретировать по разному. ИМХО В условии все долно быть написанно так чтобы понять по другому просто было не возможно. I can give you source of my program. Order of processing of Dance Level Bonus there is from the first item to the last - and AC. So program that was written right according to the problem statement gets AC, and maybe other variants of wrong solutions get AC because of weak tests... Edited by author 01.09.2007 02:38 Ну дай, посмотрю в каком у тебя там порядке проверяются... Кстати по поводу границ никаких замечаний не было, поэтому как минимум один косяк в тексте по любому есть. Edited by author 04.09.2007 22:14 Edited by author 04.09.2007 22:14 Leave me your mail or send to sev [at] hotmail [dot] ru As you can see, I'm right... I couldn't image where my prog can get WA: [code deleted] Edited by moderator 09.05.2007 16:04 Ok, if you have WA10 just read carefully BOO gives you -4 Dance Points, MISS -5, with a little change my prog gets AC. Edited by author 09.05.2007 13:51 I got AC assuming that log is already sorted. Why can I get WA10, what are the special tests can be for this problem? Edited by author 24.04.2007 19:07 Don't you know why so few people solved this problem? Because of incorrect statement (at least, its russian version). Read: "4. Если нужная клавиша была нажата первым шагом в соответствующем степе, и с начала периода прошло менее 40% периода, то игрок получает «PERFECT», менее 70% — «GREAT», и не менее 70% — «GOOD»." But in tests player gets, for instance, PERFECT, if NOT MORE than 40% of time elapsed (but from the statement STRICTLY LESS). I got AC during the contest only after corecting my program (+4 :((() This is very bad - errors in statement in realisation problems :((( See line 25 of your code: inc (time); Why do you do this? That is why you need to change "less" to "less or equal". Edited by author 23.04.2007 18:16See line 25 of your code: inc (time); Why do you do this? That is why you need to change "less" to "less or equal". Fixed. Thanks :) Statements are correct. I've just AC'ed it, considering that statements are correct. Maybe you had some problems with float arithmetic? What happens if several of the dance point conditions are fulfilled? For example, the player misses on the first step, bringing the dance points<0, and then hitting the remaining steps perfectly, getting >=80% dance points (given that the song is long enough). Should he get an A or an E? In general, should the highest-scoring fulfilled condition be taken? Edited by author 21.04.2007 18:56 If you not sure exactly, try both variants :) |
|