Блог пользователя adedalic

Автор adedalic, 9 лет назад, перевод, По-русски

Привет, Codeforces!

Рад пригласить вас на Codeforces Round #421, который состоится 27 Июня, 2017 в 17:35 MSK.

Да, это мой первый раунд, и да, очередной раунд от фиолетового.

Хочу поблагодарить KAN за огромную помощь в подготовке, danilka.pro за помощь на начальных стадиях и тестирование, Belonogov, WHITE2302, hloya_ygrt, Perforator за тестирование задач, а также MikeMirzayanov за Codeforces и Polygon.

Как обычно, участникам обоих дивизионов предлагается 5 задач и 2 часа на их решение. Разбалловка будет объявлена ближе к раунду.

Good Luck and Have Fun!

UPD1: Разбалловка стандартная для обоих дивизионов: 500-1000-1500-2000-2500

Мы работаем над проблемой в задаче A первого дивизиона. Мы опубликуем решение позже.

Из-за проблемы с задачей A, к сожалению, раунд нерейтинговый. Подробнее.

Несмотря на все проблемы Рабор должен быть, поэтому он здесь.

Теги 421
  • Проголосовать: нравится
  • +43
  • Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

offtop

Когда результаты отбора на Сазанку?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -121 Проголосовать: не нравится

Is it rated?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -51 Проголосовать: не нравится

We should thank KAN for his help in the last 10 rounds at least =D =D

Thank you so much :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +48 Проголосовать: не нравится

Hope for short statements like the blog <3

»
9 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится -76 Проголосовать: не нравится

Hope for short statements too. <3 Good luck for all.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -77 Проголосовать: не нравится

Hope for short statements like the blog <3 *3

»
9 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится -26 Проголосовать: не нравится

I think ImAliWithTheWAs is very lucky because his feedback still positive. I hope you good luck in contest my friends <3 .

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -13 Проголосовать: не нравится

anime?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -26 Проголосовать: не нравится

Everyone still wonders: Is it rated?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

lord saves CF servers today, just submitted a solution and it's a 2 page long queue.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

Round 420 is also "rated"...

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

i hope this time problems does not have any bugs good luck every one :D

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -28 Проголосовать: не нравится

**The Rain Of Downvotes :P **

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -35 Проголосовать: не нравится

Hope we can have a better exam environment and problem statement :P

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -35 Проголосовать: не нравится

When you come to increase your contribution but gets downvotes instead.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -12 Проголосовать: не нравится

Hope for better performance of the server..

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -9 Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +133 Проголосовать: не нравится
  1. Take a lot of screenshoots just in case.
  2. Take part in the round.
»
9 лет назад, скрыть # |
Rev. 4  
Проголосовать: нравится +9 Проголосовать: не нравится

A lot of of solutions in the status page got Denial of judgement :( !

Is the issue in the site ?

BTW, its the same solution but a lot of people try it to know why it got Denial of judgement.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -24 Проголосовать: не нравится

The comment is hidden because of too negative feedback, click here to view it

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -29 Проголосовать: не нравится

F**k CF servers just before the contests :/

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +48 Проголосовать: не нравится

Make a wish for Akagi with 200 rating.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

Is my English weak?i have read 20minutes still cannot understand what the problemC want to tell me。

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится

Пиши контест говорили они, будет весело говорили они.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +157 Проголосовать: не нравится

My story since past few contests:
1. Eagerly wait for contest to begin.
2. Contest starts. Open problems.
3. All problems long af, difficult to understand.
4. Lose interest, order dinner, watch BBT, eat.
Is it only me or others too that have this feeling?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

*Rushes to the contest scoreboard upon reaches home

*Realizes how few people managed to solve Div1AB even though they appears to be totally solvable to me

*Feels bad about missing a chance to climb a lot of rank

*Realizes there are only 218 participants.

Whining asides, I wonder why so few people are participating the div1 round even though the time is completely fine, not to mention uni students are having a summer break.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

So this is a contest consists of only purely mathematical problems, it's fresh!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Writed solution for Div2B. TLE 7 test. Too much math. Even don't want debug it... Just want to know: is it bruteforce with ternary search?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It was bad idea to solve d before solving b. Hope my rating won't fall much.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Is div2C/div1A just a stupid case analysis, or is there an elegant solution?

  • »
    »
    9 лет назад, скрыть # ^ |
    Rev. 7  
    Проголосовать: нравится +4 Проголосовать: не нравится

    Actually stupid case analysis is necessary as far as I understood.

    You can divide cases with b >= a and a > b, and again, r-l+1 >= period and r-l+1 < period where period = 2*(b+a)

    Consider these cases a = 4, b = 2 : abcd,dd,abef,ff repeats in optimal answer, and a = 2, b = 2 : ab,bb,ac,cc repeats in optimal answer. In the first case, if the query interval is equal to or longer than the period, then answer is clearly 2*a-b, and in the latter case, it's a+1. If the length of query is shorter than the period, then we can just loop over the string which contains only one period.

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I solved it by checking the length of the interval, and if the interval is small (say R-L <= 100) then I brute-force the solution with simulation, and if the interval is bigger, I just calculate the worst case and print that.

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Case analysis and modulo?

    For instance when b < a, I was thinking maybe the first 2*a+b characters can be repeated. Knowing this we can iterate from min(L%n, R%n) to max(L%n, R%n) where n=2*a+b. But I don't know if this is correct. :(

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    No need for case analysis actually. I used bruteforce to compute first 12 * (a + b) characters (random constant) and then, if r - l was long enough — print number of different characters in string, otherwise modulo l with length of the pattern and count distinct characters in substring of right size.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +62 Проголосовать: не нравится

How to solve Div. 1 A C D E? :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone give idea of Div2B ?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve Div2 D?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anybody tell my I was failing on pretest 6? My code — https://pastebin.com/R09b5YRN

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve Div 2D?

  • »
    »
    9 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится 0 Проголосовать: не нравится

    I tried but failed. Maybe try to use prefix sums? Here's my code:

    Solution
  • »
    »
    9 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    Given a[], foreach a[i] — i > 0 push (a[i] — i + t) where t is the current time into a heap, for each iteration, update the value that has been newly pushed to the front, plus one for each element which is not in the heap, minus one for each elemnet which is not in the heap, pop elements from the heap if time = a[i] — i + t, as now a[i] — i should be >= 0.

    Edit: It appears that O(nlogn) is not good enough, to achieve O(n), use prefix sum as others mention to store the updates instead of using a heap. The idea remains simular.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

How to solve Div2 C?

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I greedily generated string upto 2*(a+b) length such that Mr. B always choose the last character from the generated string so far. Ex — If the string so far is "abcde" then Mr. B will form string "eeee..." and merge it to the original string i.e "abcdeeee...". After generating the string I mapped the value of 'l' to smaller string by taking mod with (a+b). http://codeforces.me/contest/820/submission/28096854

  • »
    »
    9 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится 0 Проголосовать: не нравится

    I didn't solve the problem at contest time, but I think that the first thing to do here is to split the problem in two cases:

    if r — l + 1 >= 2 * (a + b)

    in this case the person A is going to put a different letters for sure, since there is at least a segment of a letters in which person A is going to put his different letters. Since person B should play optimally then he's going to put the same letter and it should be one of the letters from the first A segment. but since there are 2 segments for A, then A cannot put the same letters as in the first segment since B already put one letter and A look for a suffix of at least 1.

    So, in this case the solution is a + 1

    else

    simulation, starting from l to r starting with the letters from A or B depending on l % (a+b)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

How to solve div2C ??

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How tp solve Div2 C and D ?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I must be the only one solving Div2 Problem B by constructing a regular n convex polygon, and using binary search to find the answer :P Totally forget things about circles

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

is Div2C just about implementation?

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +550 Проголосовать: не нравится

Problem A is a pile of bullshit.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

IMO, problem D (div 2) was pretty cool. Shifting the sequence is equivalent to subtracting/adding one from each element in the answer. There's actually an easy way to do this.

Code

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Could you explain your solution a little more.

    • »
      »
      »
      9 лет назад, скрыть # ^ |
       
      Проголосовать: нравится +1 Проголосовать: не нравится

      Assume we are shifting to the left instead of the right (that's how I did it in my code, you can easily switch between the two).

      An important observation is that, when moving from one cyclic shift to the next, you have to consider for each i from 1 to n, if p[i] < i. If p[i] < i, then it will contribute -1 to the answer for next cyclic shift. Otherwise, it will contribute 1. This is because every i will decrease.

      Now, we just need to find where p[i] becomes >= i using multiset/priority_queue, and handle the case where the frontmost element gets shifted to the back.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится

Div2C Maybe I didnt understand statements, but why in samples computer moves first?

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

That moment when you know your solution won't pass system test.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Too mach math problem and I don't like it. I only solve the div2 A D. I even forget The Law of Cosines to solve problem B

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Нормально ли, что решение в Div1 B за NlogN получает TL? даже рукописный декарт не помог.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +341 Проголосовать: не нравится

I know solutions to BCDE but not A. I kinda think swapping A and E makes a better round.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I couldn't make it till the end of contest but here's my implementation of E, finds solution for all possible cases and I checked the answers so I think it works.

http://ideone.com/zzLnUp

You can understand the solution from the code.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

What's the intended complexity for Div 1 C? Is something like per test supposed to pass where ω(n) is the number of distinct prime factors of n and is the number of divisors of n?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Thought div1 B can be solved in , wrote a bug, fixed and submitted at 01:59:33, and found Time limit exceeded on pretest 10 :(

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -37 Проголосовать: не нравится

thank you adedalic for your efforts to make this round. but let's face it : your problems sucks ... it's even worse than robinyu problems in round 419.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

This is why you never forget int/int doesn't magically turn into double.

Thanks, C++.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

That moment that div1 E solution looks simpler than div1 A lol.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

That moment when you get popups for announcements 35 minutes after contest end xD

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

I think this contest was more math contest, than programming contest.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Stupid question, Can Div.2 D be solved with ternary search???

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

wrote O(NlogN) solution with std::multiset for Div2D 28098060
time limit exceeded on pretest 7
started coding discretization + Fenwick tree
contest was over
waitted for system testing
submitted and accepted 28098915

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +93 Проголосовать: не нравится

 1:59:59 stupid long double :3

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -13 Проголосовать: не нравится

The worst problem for C div.2 :|

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Can someone explain the answer of testcase #24 of Div2 C? Input: 6 1 654321100 654321115 Answer Given: 11

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -13 Проголосовать: не нравится

Sorry, adedalic, but problems were awful (IMHO).

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thank you for this contest adedalic, i enjoyed solving problem B even that i do not like geometry problem but this one was worth thinking on it and really good problem.

Also i enjoyed trying problem D even that i had overflow that i didn't pay attention to and still stuck in pretest 7.

thank you again and waiting for editorials.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Misread Div1A statements. Passed pretests.

This is strange. Of course, I should've read the statements more carefully, but there were at least 15 pretests, so I've expected them to be strong enough. But all of them can be thrown in the trash bin.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +352 Проголосовать: не нравится

Hello!

Can anybody tell me, why for Div2 C problem for test 64 answer is 5? I suppose I have better answer — 4.

Test 64: 3 1 4 10

My string for answer 4: (divided by players moves) abc b ade d ab

Segment [4,10] contains only 4 different letters — a,b,e,d. Am I wrong?

Thanks a lot for possible explanation of this issue :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I think problems were fine ! Just estimation of level is very bad + bad pretests for A div 1 :)

Anyway I am stupid guy and I should stop with competitions.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +30 Проголосовать: не нравится

Hi guys! Something bad happens to cf-predictor, it's falling over and over again. It's not clear what is the reason. You could download prediction here. Mirror will be available soon.

UPD

I can see rating prediction on standings page, hope you too:) Website currently deployed on AWS

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -61 Проголосовать: не нравится

Why do people put geometry in their problems, i mean it's clear math, informatics it's about implimentation and other informatics' topics. Already 2 contests in a row there is geometry, that's shit.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think the contest problem that it had depended overly on Maths and Geometry

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +48 Проголосовать: не нравится

adedalic Does the dataset of C has some kind of problem? My AC code performs the following: input: 4 2 11 21 output: 6

but it can be 5. The string could be like this: abcdddabefeeabcdddabef........

from 11 to 21 we can have only 5 distinct letters.

Please see to this if I have misunderstood something......

(I skipped my first code because I found this test case and submitted a new one... now I see my skipped code gets AC. This is the greatest irony)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Rating Predictor ....?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -15 Проголосовать: не нравится

in Div2 B test 6 the input was 100000 1 my answer was 1 2 181 the jury's answer was 2 1 558 can anyone explain to me why the jury's answer was better ?

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +21 Проголосовать: не нравится

It's not rated???

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

for div2E or div1C am I correct to say that the the following block will give answer:

for(int i = 1;i<=m;i++) if((2*s) % (gcd(i, n)) == 0) res++;
for(int i = 1;i<=n;i++) if((2*s) % i == 0) res++;

Not saying it will be fast enough just want to know if this is equivalent to the problem

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

For Div2B,I see solutions that fix the first 2 vertices and iterate for the third vertex assuming the angles thus formed are a multiple of (180/n). Can anyone provide with the proof for this? I tried working out the values but I found that they were not always equal(I may be wrong :P).

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Downvote a contest first time. Now i feel sorry to my friend, who i invited to participate the contest. Obviously,the awful problems wasted his time. Not only div1a.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -46 Проголосовать: не нравится

Do it unrated. :c

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

It seems the organization is still causing troubles in this time line.

There can't be two consecutive cf rounds unrated. send_nodes, lets send another D-mail.

»
9 лет назад, скрыть # |
Rev. 5  
Проголосовать: нравится +8 Проголосовать: не нравится

That moment when you and send_nodes are in the same room. xD

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

When you try so hard to improve your rating, but the round ends up unrated.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Somebody clarify rated or not?Its been 3 hours!!!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

They should give that hacker kudos for hacking the entire contest xD instant 1st place or something lul

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone help me find out what I'm doing wrong for Div2D? I don't know how to get past pretest 9. Code

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

just push it!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Interestingly, Div2 B is educational and enjoyable. There are 2 solutions that come to my mind (assuming one of the outer points of the angle is fixed as vertex 1):

  1. Iterate the middle vertex of the angle. Then, either binary search or use a two pointer approach to find the third vertex.

  2. Remember your geometry theorems: The locus of middle points for the angle given the outer points are fixed is a circle (the circumcircle of the polygon). This way, there are only O(N) candidates for the last point of the angle and there is even a way to solve the whole problem in constant time by some formulas.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Two unrated rounds in a row.

I feel sad for those who got hundreds of down-votes because they asked if the round was rated or not :v

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

This contest was definitely unlike any other. The questions involved much more math than normal. In Division 2, the best way to solve Problem B was by drawing out a diagram. It could be realized that since a circle could be inscribed around the regular polygon, and due to the inscribed angle theorem we could just pick two points right next to each other for one side and test out the remaining possible points for the third point. That allows for an O(n) complexity and much easier implementation. Also, Problem D in Division 2 (also Problem B in Division 1) was surprisingly easy! If you haven't already, you should definitely check it out! Just watch out for time complexities!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

Can you atleast give a rough idea of when the decision will be announced? I've been checking this page for around 3-4 hours now. :(

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +5 Проголосовать: не нравится

    I believe that once a solution to div1 A/div2 C is verified, they will just rejudge submissions and provide new standings based on which, the rating will change.

    You can speed it up by creating a formal proof of the solution to the above problem.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Upvotes for contest came down from around 250 to 50. If they don't announce their decision for some more time, it can come down to 0.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

This thread has more than 300 upvotes couple hours ago.. Now it's only 50-ish and falling..

Edit: it's negative now. Feel sorry for him. Hope this problem is solved soon before it gets worse

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Div2C/Div1A

I am getting wa for below test case. My answer is 4 and jury's answer is 5. However I am able to get a string which gives 4 as answer. What am I missing?

Test Case: 3 1 4 10

sample string with answer 4: a b c b a d e e a b

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Now this blog has negative votes...

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +35 Проголосовать: не нравится

Is it rated?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +27 Проголосовать: не нравится

I'm sorry to say that the round is unrated now. Here are some details.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

If the rating of this competition was a stock, then we would all be broke.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

I would like to change my vote for this topic, however cf does not let me do this. Is that option blocked on purpose? I think that I should be able to remove my vote or change it any time.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I can't understand why all those downvotes there is always a possiblity for such a situation and the testers & the problem setter described that they did their best. I think we can understand the situation more wisely ..

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I gave upvote and will always do so,people need to consider how much time authors putted on testing and making problems,mistakes can happen.On the other hand you must consider amount of unlucky people who performed for over +150 rating in previos two rounds and ended up at same rating.it's so frustrating,I can't go over 1480 and with these 2 contests I would be over 1600.Anyway after all this happened suddenly I don't care a bit about rating and won't participate in CF rounds for some time.

»
9 лет назад, скрыть # |
Rev. 8  
Проголосовать: нравится +28 Проголосовать: не нравится

I'm really disappointed about the blog post rating is negative.
Several hour ago, the post rating was 300-400, but now it is -50.

I think some people was disappointed about unrated. Me too. But the contest writer worked very much for codeforces and people, and you may enjoyed the other problems.

So I think this post should be positive, at least 0 because you may enjoyed at least a little, and the writer worked very much. Don't blame the writer too much.

UPD: I see the blog again after 9 hours writing the comment, and the post rating was -18. Thank you for the incident didn't got worse, but the post rating is still negative. I say again: don't blame the writer too much.

UPD2: the post rating became to positive! I'm very happy. (The writer and most people may be happy too.) Thank you!!!

  • »
    »
    9 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +33 Проголосовать: не нравится

    Man, it is just a rating, it is not like we are beating him up or something.

    I belive this is a sign to stop the poor proof contest and the over confidence that the algorithm is correct because the problem looks simple.

    • »
      »
      »
      9 лет назад, скрыть # ^ |
      Rev. 3  
      Проголосовать: нравится +3 Проголосовать: не нравится

      I saw many comment of feedback of Codeforces Round #421, and I posted my opinion:

      I think this post should be positive, at least 0 because you may enjoyed at least a little, and the writer worked very much. Don't blame the writer too much. I say again: don't blame the writer too much. (written by E869120)

      Yes I agree, writer prepared very much. And I think the other problems except Div2C/Div1A is good. Though I have came across similar issue in Codeforces Round #382, that is, there was an issue in Div1A/Div2C, and this is the similar pattern.
      I belive this is a sign to stop the poor proof contest and the over confidence that the algorithm is correct because the problem looks simple. (written by rick_sanchez_c-137)

      I agree that I think writer/tester should make a correct solution with correct proof, but I think Codeforces has too much rounds like 2-3 days per a contest. It is very very short period compared to Topcoder or Atcoder. I want to ask whether Mike or Kalinin can do really good testing and checking proof and checking the editorials. Though, we will be very happy if there's a contest per 2-3 days and also no issue with very high probability.

      UPD: The contest announcement blog is now positive like +20. I also read E869120's comment below. I think many people don't have experiences of problem writing in a large-scale or international competition, and some of them may thinking that it is not very difficult. (Arpa's blog describes how Codeforces problemsetting is doing like.)
  • »
    »
    9 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится -7 Проголосовать: не нравится

    Thanks very much for upvoting the announcement blog.
    Finally, the topic rating became to positive (Now it's +18!). I'm very happy.

    I think any real announcement of CF should be positive, whether the contest was rated (or unrated), whether the contest delayed, whether the contest has some issues, whether your score or rank in the contest, and whether there is some notorious coincidences in the contest.

    Please consider about the work of writer. It may took so long time, and writers/testers have many difficult tasks. I already hosted 4 contest which is unofficial, and 1 contest which is official, all of these in AtCoder, but in one contest example, it spent all of 2 weeks to prepare contest.

    I hope there is no real announcement post of CF contest which has negative rating.

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +83 Проголосовать: не нравится

The test (Div1 A Test 64) is made by me.

Because of my test the contest is unrated, today is so cool for me XDDDDDDDD

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -12 Проголосовать: не нравится

Last two contests,

Rated contest

Solve and hack

Sorry, it is unrated

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

First time I get rank < 50, contest is unrated :(

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +13 Проголосовать: не нравится

Lol, this guy didn't even bother to hide his second account. What an outstanding perfomance from the one who solved the most problems on codeforces ever!

Submissions are obviously the same. Ali.Pi's B, Ali.P's B.

Please no notorious coincidence meme

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

В конце написано Рабор должен быть

»
9 лет назад, скрыть # |
Rev. 5  
Проголосовать: нравится +6 Проголосовать: не нравится

edit:I know now why it will not work :-( adding -1 will not solve the problem :-D

I have a solution for div2/C div1/A , I want to know if it will work , because it seems simple to me and I checked it many times and it worked

I considered segment [1..inf] (from 1 to infinity) that describes the "game turns" as repeated segments of length 2(a+b) (see the figure for the different situations)

I replaced the choice of Mister B by -1

The solution will be as following :

- create a array in range 1..4*(a+b)  that represents the game in first 4(a+b) turns (see the figure)

if [l..r] in [1..4(a+b)] then
    count unique numbers in array[l..r]:
    If count>1 and you considered [-1] while counting then
	solution=count-1
    else
	solution=count

else if r-l>2(a+b) then
    solution=max solution (you can find it on range [1..2(a+b)]

else:
     reduce range to 1..4(a+b) and find solution as described in first branch of if condition
     reducing as following
     nl=l%(a+b)
     nr=r-(l-nl)

adedalic can you take a look

my solution code

sol
photo hosting service

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

problem writes are just pieces of shit.