### antontrygubO_o's blog

By antontrygubO_o, 8 months ago,

We will hold Codeforces Round #794 (Div. 1) and Codeforces Round #794 (Div. 2).

The point values will be:

Div2: 500 — 1000 — 1500 — 2000 — 2500 — 2500

Div1: 500 — 1000 — 1500 — (1500 + 1500) — 3500

We are looking forward to your participation!

UPD 1: Thanks to NEAR for supporting this round, details can be found in this post.

UPD 2: Editorial

UPD 3: Congratulations to winners!

Div1:

1. fantasy

2. jiangly

4. gamegame

5. maroonrk

Div2:

1. lmqzzz

2. Teating_

3. lunchbox

4. Nida1097

5. demacia

• +441

 » 8 months ago, # |   +250 As VIP tester, good luck to all east Asians competiting until 4am
•  » » 8 months ago, # ^ |   +118 As a Japanese, when the contest ends the sun will rise... (btw why so late unusual time?)
•  » » » 8 months ago, # ^ |   +12 I think it is to prevent clashing with codechef starters 40 which is from 10:30pm — 1:30am GMT +8
•  » » » » 8 months ago, # ^ |   +97 You are right. And we think that it's generally not bad to have a late time round once in a while (for people from other time zones).
•  » » » » » 8 months ago, # ^ |   +92 why is it necessary to care about codechef?
•  » » » » » » 8 months ago, # ^ |   +31 Maybe because he is a problem admin at Codechef
•  » » » » » » 8 months ago, # ^ |   +123 Because Codechef is a good platform with good problems
•  » » » » » » » 8 months ago, # ^ |   +45 Noice!!
•  » » » » » » » 8 months ago, # ^ |   +61 Yeah, but sadly no one recognizes it.
•  » » » » » » » 8 months ago, # ^ |   -19 Exactly, Last starter round was really educational, i got to learn binary lifting and finding LCA using binary lifting because of last problem.
•  » » » » » » » 8 months ago, # ^ |   +2 The only drawback is their bad plagiarism checker. Ratings of the fair contestants drop because of the massive cheater base and their plagiarism checker failing to detect them. But their problems are noice no doubt.
•  » » » » » » » » 8 months ago, # ^ |   -7 Both codechef and codeforces provide problems for our training and satisfaction. Who wants to cheat -- Bad for them.
•  » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   +20 Me: "I'm going to propose $20$ problems on Codechef."antontrygubO_o: "Codechef is not a rubbish bin!"
•  » » » » » » » » 8 months ago, # ^ |   +11 Harder problems on codechef like medium/medium-hard are quality problems in general. I don't think you can so easily throw $20$ mediums to the so-called "rubbish-bin".
•  » » » » » » » » » 8 months ago, # ^ |   +16 In fact, I have proposed no medium/medium-hard problems.
•  » » » » » » » 8 months ago, # ^ |   +59 With good loyal employees
•  » » » » » » 8 months ago, # ^ |   -36 We don't care about you either.
•  » » » » » » 8 months ago, # ^ |   +11 even that is down now during the contest
•  » » » » » » » 8 months ago, # ^ |   +10 Can you enter codechef？Is that Website crash？
•  » » » » » 8 months ago, # ^ |   +23 Does that mean that there won't be any contests on cf(even if div1) at usual time or close to that on Wednesday?(since CC starters is held every Wednesday)
•  » » » » » » 8 months ago, # ^ | ← Rev. 3 →   +73 also the point is that if time clashes it makes more sense to change the time of cc contest rather than cf contest because certainly cf is a better platform than cc with larger amount of interested participants
•  » » » » » » » 8 months ago, # ^ |   -45 funny to see cyan judging which site is better, when he can't even solve medium level problems on any of the sites.
•  » » » » » » » » 8 months ago, # ^ |   +105 Funny to see low-rated expert judging cyan with 50 rating difference between them.TimDee
•  » » » » » » » » » 8 months ago, # ^ |   +25 that's why I didn't said anything about website like which website has better problems :)
•  » » » » » » » » » 8 months ago, # ^ |   -17 I think you have weakness in reading texts,I said better platform not better problems
•  » » » » » » » » » 8 months ago, # ^ |   +9 it should be better if we do debate in dm instead of spamming announcement blog xD. Also what is the other thing in coding platforms other than problems, As much as I recall it was long ago when codechef contest goes unrated!
•  » » » » » » » » » 8 months ago, # ^ |   +11 oh okk,try visiting cc now then
•  » » » » » » » » 8 months ago, # ^ | ← Rev. 5 →   -17 If I am an asshole in problem solving ,you are as asshole as me ,our rating difference is 55...also you may never reach things in future that I will do + it doesn't require to be red to understand which platform is better,,,also If I can't solve medium level prblms ,you can't also, it's funny to see someone who is just above 1600 out of nowhere insulting someone who is just few ratings less than him
•  » » » » » » » » » 8 months ago, # ^ |   -10 I never said I am better than you :)
•  » » » » » » » » » 8 months ago, # ^ |   +5 I don't think being higher rated ( no matter the difference ) allows you to insult anyone.-- A non-alt account.
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   -30 Fuck you, shut up, gitgudMarinush
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   -28 Success makes so many people hate you. I wish it wasn't that way. It would be wonderful to enjoy success without seeing envy in the eyes of those around you.bleahbleah
•  » » » » » » » » » 8 months ago, # ^ |   -8 Learn how to troll with getting upvotes
•  » » » » » » » » » 8 months ago, # ^ |   -7 Thanks for the advice rotavirus :)
•  » » » » » » » 8 months ago, # ^ |   0 I don't remember asking tho.
•  » » » » » » » 8 months ago, # ^ |   0 Yes you are right... But both the platforms are really good and are providing competative skills to the future coders as well as coders.
•  » » » » » 8 months ago, # ^ |   +6 Two back to back contests Two back to back contests!!... :)...All the best everyone, may the force of positive delta be with you!
•  » » » » » 8 months ago, # ^ |   0 That is right! Just like sometime there are round which is from 17:35 — 19:50 GMT+8.
•  » » » » » 8 months ago, # ^ |   0 smh y'all postponed this due to codechef and the website went down xD
•  » » » » 8 months ago, # ^ |   0 turns out badly, the CodeChef servers are down
•  » » » » 8 months ago, # ^ |   0 But it went down :(
•  » » » » 8 months ago, # ^ |   0 Ha-ha
•  » » » » 8 months ago, # ^ |   -8 CodeChef Starters 40 got postponed to 26th May lmaoo XD
•  » » » » 8 months ago, # ^ |   0 codechef keeps contest according to codeforces (it is much smaller)...(see now contest is postponed..)
•  » » » 8 months ago, # ^ |   +10 Land of the Rising Sun
•  » » » » 8 months ago, # ^ |   0 hey mate, are u caged here too?
•  » » » » » 8 months ago, # ^ |   0 Nah I'm free here
•  » » 8 months ago, # ^ |   -52 Really good time for India contestants though.
•  » » » 8 months ago, # ^ |   -31 Yeah it's good :D
•  » » 8 months ago, # ^ |   +3 why so late ⚫⁔⚫
•  » » 8 months ago, # ^ |   -6 Bro I hacked someone on C.but there are other people also , who will get WA on C due to that testcase.When will they rejudge.
 » 8 months ago, # |   +4 Amazing Unusual Time
•  » » 8 months ago, # ^ |   +1 tmm
 » 8 months ago, # | ← Rev. 2 →   +26 As a tester and an Anton-problem-enjoyer, I can confirm that the problems are very beautiful. I'd say some of the problems are probably the best I've seen this year, but I won't jinx the round by saying that Spoilersince quite a few problems that I had tested had to be removed, and I haven't seen many problems this year either :/
•  » » 8 months ago, # ^ |   +45 Nice
•  » » 8 months ago, # ^ |   -6 Bro i hacked somenone on C when will other people get testted on that testcase for C problem.
•  » » » 8 months ago, # ^ |   0 What was the testcase?
•  » » » 8 months ago, # ^ |   0 1100001 2 3... till 10000
•  » » » » 8 months ago, # ^ |   0 ok
 » 8 months ago, # |   +70 :o atcoder announcement format
 » 8 months ago, # | ← Rev. 3 →   0 awesome thanks.
 » 8 months ago, # |   0 Div2: 500 — 1000 — 1500 — 2000 — 2500 — 2500Div1: 500 — 1000 — 1500 — (1500 + 1500) — 3500 The last two Div2 tasks are worth the same, but there aren't two tasks in Div1 that are worth the same.
•  » » 8 months ago, # ^ |   +77 The last problem in Div2 will be the first subtask of the fourth problem in Div1.
 » 8 months ago, # |   +110 Thanks to antontrygubO_o for rejecting all of the problems of himself for creating this contest.
 » 8 months ago, # |   +26 It's really an unusual time, so I can't attend :( hope others enjoy it
 » 8 months ago, # |   +11 WOW!, Contest Announcement itself is neat, clean and precise. Looking forward for my first MIDNIGHT contest
 » 8 months ago, # |   +31 I finally get a excuse to wake up till 1 in the night for actual reasons
 » 8 months ago, # |   +45 "Rated range: (−∞,1899] for Div2, [1900,∞) for Div1", means "Rated range: (−∞,1899] for Div2, [1900,tourist] for Div1"?
•  » » 8 months ago, # ^ |   0 why downvote to him...
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 +1
 » 8 months ago, # | ← Rev. 2 →   +33 .
•  » » 8 months ago, # ^ |   +60 My man got Time machine
•  » » 8 months ago, # ^ |   +25 use binary search
 » 8 months ago, # |   -19 very unusual time
•  » » 8 months ago, # ^ |   0 very unusual format
 » 8 months ago, # |   +14 All hail our emperor anton
 » 8 months ago, # |   0 It's Bangladeshi mid night (at 11.35PM).....Unusual advanced time...
 » 8 months ago, # |   0 By looking at the list of testers, we can hope for strong pretest & less FSTs :)
 » 8 months ago, # |   0 Unusual start time: Thursday, May 26, 2022 at 01:35UTC+8Aha
•  » » 8 months ago, # ^ |   +6 Unusual start time: Thursday, May 26, 2022 at 00:35UTC+7Aha
 » 8 months ago, # |   0 unusual time means delaying until one o'clock?not that fair for contestants in asia because it's tooooooo late
 » 8 months ago, # |   0 hope in this contest my no solution get hacked.
 » 8 months ago, # |   +12 Rubbish time for Chinese users.
 » 8 months ago, # |   -21 I think in this contest, the record would set up for the lowest number of participation.
 » 8 months ago, # |   -29 Timings are not unusual , but absurd.
 » 8 months ago, # |   +21 I think most of Americans can participate now, And also I am wondering that people in Los Angeles always participated in CF contests at 4 or 5 A.M
 » 8 months ago, # |   +62 As a tester I should say: Don't even think about skipping this round. Just look at how many testers lost their opportunity to participated in a rated contest(that takes place once in eternity). Show some respect
•  » » 8 months ago, # ^ | ← Rev. 3 →   +7 Wish I could bro. But start time is same as my sleep time. I'd be sleepy entire contest.How about shifting by 1 day and have usual timing
•  » » » 8 months ago, # ^ | ← Rev. 3 →   0 what do you do in morning by sleeping early anyway
•  » » » » 8 months ago, # ^ |   +1 Internship
•  » » » » » 8 months ago, # ^ |   0 cried in javascript
•  » » 8 months ago, # ^ |   +1 I don't want to skip it, but look at the time. I believe most East Asian competitors have to withdraw. Anyway, that would be a good time to American participants.
 » 8 months ago, # |   0 I like unusual contest announcements -
 » 8 months ago, # |   +13 how far is it (−∞) possible???
•  » » 8 months ago, # ^ |   +36 -tourist
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 Bro your DP on codeforces is the most interesting one till date. xD
•  » » 8 months ago, # ^ |   +19 +1/12?
 » 8 months ago, # |   +4 Indian night owls there you go...
 » 8 months ago, # |   +1 Hoping for strong pretests this round. Suffering from weak pretest syndrome since last few rounds.
•  » » 8 months ago, # ^ |   +3 Yes. Last 4 rounds went like trash for me.
 » 8 months ago, # |   -8 what is -∞
•  » » 8 months ago, # ^ |   0 ratings can be negative.
•  » » 8 months ago, # ^ |   0 The rating which is not achieved by anyone till now..
 » 8 months ago, # |   0 Best of luck!
 » 8 months ago, # |   -10 Can you change the starting time, It is not suitable for most users! It would be better if the contest is held as usual, I mean at 19:35 (UTC+5) More specific time: (14:45 UTC+0)
•  » » 8 months ago, # ^ |   +5 My first midnight contest let's gooo
•  » » 8 months ago, # ^ |   0 I agree with you. I won't do this contest because I want more sleep.
•  » » » 8 months ago, # ^ |   -8 Yeah sleep is much better :)
 » 8 months ago, # |   +58 wow, i thought that i'm on codeforces, not on atcoder
 » 8 months ago, # |   0 I hope my pupil friends will contribute to stock up my lost ratings, in this round despite the unusual start time.
 » 8 months ago, # |   0 Time can be usual?All the eastern asian countries people is sleeping.
•  » » 8 months ago, # ^ |   +5 Only the truly passionate ones will be awake.
•  » » » 8 months ago, # ^ |   +12 I'd rather stay in good a sleep and put in more passion the next day
•  » » » 8 months ago, # ^ |   0 Sure you do :)
•  » » » 8 months ago, # ^ |   0 this comment is totally baseless
 » 8 months ago, # |   -10 what ! 2:35 AM?!??
 » 8 months ago, # |   0 Seeing so many reds(long wavelengths) as testers, I feel its gonna be just_fun.
 » 8 months ago, # |   +10 Honestly, with 420 problems solved, a (timezone dependent) leftover max streak of 69 from last summer (a summer of failure tho), and a new peak rating (+175 delta: you know, for kids!), I was thinking of retiring from cp on a completely middling note.That and I still don't know if I'll be able to clear out enough time in the middle of the afternoon on a weekday tomorrow...Buuuut, it's mildly annoying that my 'actual' peak rating was on account of the april fools contest... so, screw it, I'm in (as long as daycare doesn't crap out randomly (again)).Place your bets on how this choice will age, but you'd probably be right to think of rancid dairy more than fine wine :P
 » 8 months ago, # |   0 lets go! very excited about the contest.
 » 8 months ago, # |   0 Cool Round! let's Go Good luck to all :)
 » 8 months ago, # |   +48 omg ukrainian round
•  » » 8 months ago, # ^ |   +10 Why?
•  » » » 8 months ago, # ^ |   0 Because
•  » » » » 8 months ago, # ^ |   -10 Lol
•  » » » » 8 months ago, # ^ |   +15 Оу май, ты же автор!Спасибо за контест!
•  » » » » » 8 months ago, # ^ |   0 я ненастоящий Антон...
•  » » » » » » 8 months ago, # ^ |   0 Кек, а я повелся(
 » 8 months ago, # | ← Rev. 2 →   +18 Hope to see brilliant problems, hope new colors for all
•  » » 8 months ago, # ^ | ← Rev. 3 →   +1 green after red :-)
•  » » » 8 months ago, # ^ |   +5 LOL,u don't need green, red will be awesome for u and u will reach it soon, your graph is fantastic.
•  » » » » 8 months ago, # ^ |   +1 Thank)
•  » » 8 months ago, # ^ |   0 Became cyan!!!
•  » » » 8 months ago, # ^ |   +1 Congratulations great performance!
•  » » » » 8 months ago, # ^ |   +1 Thanks!
 » 8 months ago, # |   0 Wow,its too late
 » 8 months ago, # |   0 I will hope all partipicatian
 » 8 months ago, # |   0 Why today’s contest starts at a bad time ?
 » 8 months ago, # |   0 What a pity that I'm unable to take part because of the too-late time. I have class to attend the next morning
 » 8 months ago, # |   -9 Can someone please tell what's wrong in this solution of mine , its problem D from last contest . I got a WA on test 192 Thanks !!
•  » » 8 months ago, # ^ |   +8 You r using map,int> in place of map,int> AC Code
•  » » » 8 months ago, # ^ |   0 Thanks a lot !!
 » 8 months ago, # |   0 I want to know if I register for contest & due to some reason do not attend it , will it effect on my rating ??
•  » » 8 months ago, # ^ |   0 nope
•  » » 8 months ago, # ^ |   0 no bro
•  » » » 8 months ago, # ^ |   0 Thanks !
•  » » 8 months ago, # ^ |   0 no
•  » » 8 months ago, # ^ |   0 NO
 » 8 months ago, # |   +8 It would be funny for CF to schedule contests with time table evenly distributed among 24 clocks, this way we may have a rough statistics about each timezone's skill distributions (or non-primary account distributions, even the cheater distribution)
 » 8 months ago, # |   -20 Funny to see low-rated expert judging cyan with 50 rating difference between them.
 » 8 months ago, # |   -23 Anton orz
•  » » 8 months ago, # ^ |   -13 Thanks for taking some of your very precious time to delight us with this highly intelectual comment.
•  » » » 8 months ago, # ^ |   -27 You’re welcome
•  » » 8 months ago, # ^ |   -10 :orz:
 » 8 months ago, # |   +27 sleepforces
 » 8 months ago, # |   -8 3 hours delay ...
 » 8 months ago, # |   -11 Contest should be shifted to next day.
 » 8 months ago, # |   +16 start the contest now, codechef servers are down lmao
 » 8 months ago, # | ← Rev. 2 →   +2 When you want to codeforces contest on its regular time and then it is postponed for 3 hrs , then you move to give a codechef contest and that site is down. Its like u have water but u cant drink it
 » 8 months ago, # |   +3 well hello to everyone from codechef
 » 8 months ago, # |   0 BusyChef
 » 8 months ago, # |   0 Codeforces=Sleepforces Codechef=Busychef
 » 8 months ago, # |   -6 Is anyone going to attend it after delay also?
•  » » 8 months ago, # ^ | ← Rev. 2 →   +3 Form starting it was supposed to start at 11 PM IST. Which delay are you talking about?
•  » » » 8 months ago, # ^ |   0 He is talking about the codechef one
•  » » » 8 months ago, # ^ |   0 I am talking about codeforces.
 » 8 months ago, # |   0 Since , codechef starters is from 9pm to 12pm due to their server glitches , will div 2 contest also gonna postponed by 1 hour or more ?
•  » » 8 months ago, # ^ |   0 9pm to 11:59 pm*
•  » » » 8 months ago, # ^ |   0 Codechef canceled today's contest, they will hold this tomorrow!
•  » » » » 8 months ago, # ^ |   0 That too will be unrated
 » 8 months ago, # |   +5 LOL.. Now this round needs to be postponed by an hour as well!
 » 8 months ago, # |   +5 GG CC postponed and cf unusual timing, Now I can watch rcb batting with peace
•  » » 8 months ago, # ^ | ← Rev. 3 →   +1 what to see they are rubbish as always upd: my bad patidar on fire
•  » » 8 months ago, # ^ |   +1 It was a perfect show boom boom patidar
 » 8 months ago, # | ← Rev. 2 →   -18 bad time for Indians now ig :(
•  » » 8 months ago, # ^ | ← Rev. 2 →   +4 to use VPN? ¬‿¬
 » 8 months ago, # |   0 I hope i'll get my rating back)
•  » » 8 months ago, # ^ |   0 kfc!
 » 8 months ago, # |   +4 Hopefully, with unusual time comes unusual performance and I get mad positive rating points :)
•  » » 8 months ago, # ^ |   +4 You had us in the first half not gonna lie
 » 8 months ago, # |   +1
 » 8 months ago, # |   0 The timing is perfect for me XD
 » 8 months ago, # |   -129 Hi antontrygubO_o! Could you ban all r*ssians from participating? Thanks.
•  » » 8 months ago, # ^ |   +1 Hi, could you shut up? Thanks.
•  » » » 8 months ago, # ^ |   -27 No, comrade Perdakov
 » 8 months ago, # |   0 Hoping to become pupil :))
•  » » 8 months ago, # ^ |   0 LETS MEET AFTER THE CONTEST MATE.I'LL COMEBACK
 » 8 months ago, # |   0 Good luck (night) everyone)
 » 8 months ago, # |   0 Why each codeforces round starts at x:35 what is the reason?
 » 8 months ago, # |   0 why can't I register for the contest?
 » 8 months ago, # |   -96 Will the day finally come when Codeforces stops giving problems about subarrays, substrings, subsequences and bracket sequences? Come on guys, the problems are so boring that it's even not worth competing in such contests.
•  » » 8 months ago, # ^ |   +131 No
•  » » » 8 months ago, # ^ |   -10 sir, please stop giving problems about anything, including subarrays, substrings, subsequences, bracket sequences. Come on guy, the problems are so boring that it's even not worth competing in such contests
 » 8 months ago, # | ← Rev. 2 →   +9 Looks like a Div3 Round by seeing A, B, and C.Anyways the problem was very good and I enjoyed it though I made a Wrong submission on C due to a silly mistake.
 » 8 months ago, # |   +3 done with ABC, should I even try D?
•  » » 8 months ago, # ^ |   0 Yes
 » 8 months ago, # |   +2 Speedforces?
•  » » 8 months ago, # ^ |   +25 Unbalancedforces
 » 8 months ago, # |   0 The best round for me. But I think I'll have TL in C((
 » 8 months ago, # |   +49 The worst round in recent times
 » 8 months ago, # | ← Rev. 2 →   +84 A, B, C -> DIV. 3 | D, E, F -> DIV. 1. There was no DIV. 2 today.
 » 8 months ago, # |   0 Free Advice: 30mins left in contest, even if you start solving now, if you could do D you'll be on top 200 :)
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 focus on your own contest kid
 » 8 months ago, # |   +29 Any way to report people like him?
•  » » 8 months ago, # ^ |   -10 You sold solution to him?)
•  » » » 8 months ago, # ^ |   0 Of course not!
•  » » 8 months ago, # ^ |   0 CodeDebugger25 Here you go :
•  » » 8 months ago, # ^ |   0 I don't understand where is the fun when someone cheats, rating is important but it's not everything, the most important thing is to solve the problem by yourself, especially in contests.
•  » » 8 months ago, # ^ |   +3 Give him a lesson. Send the fake solution to him.
•  » » » 8 months ago, # ^ |   +3 and get some money too!!!
 » 8 months ago, # |   +41 Thanks dario2994. Without you, the contest would be unbalanced... orz
•  » » 8 months ago, # ^ |   0 lol
 » 8 months ago, # |   +13 why so unbalanced?
 » 8 months ago, # |   +26 If you don't have enough problems on your hand make less rounds. But please make quality rounds. Anything you can assume and make a problem based on some constructions is the worst problem idea.
 » 8 months ago, # |   +24 How to solve Div1B cleanly without a ton of if statements?
•  » » 8 months ago, # ^ |   +10 split to 4 types of sequences 1)ABAB..ABA 2)BAB...ABABAB 3)ABA...BABA 4)BABA...BABA so split to substring without duplicates of letter. 1 and 2 contribute len/2 to c or d. 3 contribute x to c and len/2-x-1 to d. 4 contribute x to d and len/2-x-1 to c.
•  » » » 8 months ago, # ^ |   +14 This is the bad solution I am referring to. It frankly feels like awful bunch of cases (with a touch of greedy) and nothing else.
•  » » » » 8 months ago, # ^ |   +11 I used the same idea, not sure if my solution meets your standard 158450218
•  » » » 8 months ago, # ^ |   0 I did the same but got WA on 3 :( may be wrong implemented :(
 » 8 months ago, # | ← Rev. 2 →   +1 How to solve Div2 D? T_T
•  » » 8 months ago, # ^ | ← Rev. 3 →   +16 Warning — this solution is bad, there is hopefully a better one.Two consecutive same characters can never be part of the same word, so split on this. This leaves 3 patterns: Single Character (A / B) Repeating Interchangable (ABAB...BABA / BABA...ABAB) which becomes any combination of AB and BA + 1 remaining character (the first / last one) Repeating Non-Interchangable (ABAB...ABAB / BABA...BABA) which requires us to delete an A and a B from somewhere to use the opposite type. Try to fill required number of AB and BA from Type 3 directly first. Then use Type 2 if required. If we have excess of one and a deficit of the other even after this, then convert Type 3 pairs. Greedily use larger strings first since we'll always lose 1 A and 1 B during this interconversion, so we can get $\frac{|p|}{2} - 1$ copies of the opposite word from a Type 3 string of length $|p|$If you have a deficit of As and Bs, get them from any extra AB / BA after this.
•  » » » 8 months ago, # ^ |   +12 I arrived at the exact same solution, but rage quitted while implementing, thinking there might be a better way as it is a Div1 problem.
•  » » » 8 months ago, # ^ |   +25 You can check the number of A and B at the beginning and ignore it later on. The problem basically reduces into checking if we can create enough AB and BA.
•  » » » 8 months ago, # ^ | ← Rev. 3 →   0 Oh, i tried doing it the other way, from Type 2, then type 3 smhActually, tried both ways, some impl bug...
 » 8 months ago, # |   +3 what is the approach behind the D, Please mention if you know Thanks,
•  » » 8 months ago, # ^ |   0 If my solution passes the system test, then D's solution is just a heavy implementation of some case analysis.
•  » » » 8 months ago, # ^ |   0 Hope your solution passes the system test
•  » » » 8 months ago, # ^ |   0 bruh, i was trying to make something smart Dx
•  » » 8 months ago, # ^ |   +1 This is how I did , Look For continuous blocks of A and B if the size of continuous block is greater than >=3 then all the middle characters must count only in a (if block is of A's) or b (if block is of B's) for example using 0 based indexing if if from i to j all are A's then all A's from i+1 to j-1 should definitely contribute of a because they are not proceeded or succeeded by B if(i==0) the first A should also contribute to a if(j==(n-1)) the last A should also. Now We are left with multiple strings of type ABABAB... or BABABA... and these strings are separated from each other by when we detect consecutive A's or B's. Now we sort these string in ascending order of size and check if it is possible to get c AB's and d BA's from them. Also if the leftout strings are odd in size then it must contribute atleast one character to a if it starts with A else to b.
•  » » » 8 months ago, # ^ |   0 i had same idea, but it still seemed kind of stupid solution to me lol
 » 8 months ago, # |   +1 ABC (DIV2) speedforces D (DIV2), are you kidding me?
 » 8 months ago, # |   +35 This is still an unbalanced round. For div1 users, your ranking will depend on how fast you solve div1B. For div2 users, your ranking will depend on how fast you solve div2C. Problems are good, but either too hard or too easy.
 » 8 months ago, # | ← Rev. 2 →   +42 Oh yeah, another shitty speedforces round, more like ABBEFF, not ABCDEF (div 2)
 » 8 months ago, # |   +26 How do you solve Div 1C? Spent the last hour and a half and I still can't think of a good solution :(
•  » » 8 months ago, # ^ |   +16 Hint1Answer <=2 Hint2Draw a graph of the prefix sum.'('=1 ,')'=-1Reversing a substring is rotate the fold line of some segment by 180 degree.
•  » » » 8 months ago, # ^ |   +8 Wait, how does hint 2 lead to $answer \leq 2$.What if we also have large peaks and large troughs in the the region we fold? Isn't it possible to require upto $\log(n)$ folds in that case?
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 Find the peak of the prefix vals, then 2 operations: 0, peak and peak, n is enough. When you choose 2 endpoints with different values to rotate upon, only the values outside the range will 'flip' sides. So when you choose 0 and the highest value, there will be no higher value to 'flip' to the negative side.
•  » » » » » 8 months ago, # ^ |   0 What about ()))((((())))((())? Isn't solution to flip 2 16.
•  » » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 Of course, you still need to handle cases where just picking 1 reverse suffice, but at least you know that you can always solve in at most 2 reverses.
•  » » » » » » » 8 months ago, # ^ |   0 I see, makes sense, thanks!
 » 8 months ago, # |   0 Any hints for c can we solve it using binary search lower and upper bound ?
 » 8 months ago, # |   +8 Avengers Interviewer: What's your superpower? Me: I can solve problem D.
 » 8 months ago, # |   +1 15min solving and rest just staring at the screen :)
•  » » 8 months ago, # ^ |   0 btw what was the approach for solving D?
 » 8 months ago, # |   0 Reminded me of Round 728. Similar gradient lol.
 » 8 months ago, # |   0 Anyone pls tell that what was the approach to solve c:*
•  » » 8 months ago, # ^ |   +1 1.Sort the array 2.Check if length of array is odd or even 3.If Odd then output NO as you will not be able to form a circular array if length is odd, you can check this on your own. 4.If its even, then put the elements like [A[0], A[N/2+0], A[1], A[N/2+1], A[2], A[N/2+2], ...]. 5.Now check if its circular by doing if else example if (a[j]>a[j+1] and a[j]>a[j-1]) or (a[j]
•  » » » 8 months ago, # ^ |   0 pls tell that why we can't create circular array in this manner that , res[ind++]=arr[i]; res[ind++]=arr[n-1-i] why we need to take element from the mid
•  » » » » 8 months ago, # ^ |   0 It won't become circular try to do it on a copy.
•  » » » » 8 months ago, # ^ |   +1 Try for this sample 1 2 3 4 4 4 7 8 9 10. SpoilerIf the middle 2 elements of the sorted are the same, then, they will occur next to each other, after rearranging, which is not expected. i.e., It will become like this 1 10 2 9 3 8 4 7 4 4.So, better to arrange it like 1 4 2 7 3 8 4 9 4 10.
•  » » » » » 8 months ago, # ^ |   0 exactly!
 » 8 months ago, # | ← Rev. 2 →   +4 Is there a clean way of doing div 2D/div1B or is it just horrible implementation?
 » 8 months ago, # |   +1 So sad, that cuz of debug stuff left, i lost +-800 places :( It could be an easy +175, but still +60, so i am fine with this :)
 » 8 months ago, # |   0 I'd really appreciate if anyone could enlighten me with an idea or hint for D?
•  » » 8 months ago, # ^ | ← Rev. 2 →   +7 I don't have the solution, but i was able to make the following observations:Take a string: "ABAABBABAB" Since we don't have to create AA and BB, we can effectively split the above string as [ABA][AB][BABAB] now the task has been reduced to satisfy the number of a,b,c,d (a: count of A, b: count of B, c: count of AB, d: count of BA) using these sub-strings, which are strictly alternating.Again for strings of odd length:ABABA: we can take out single A and reduce count of a by 1. BABAB: we can take out single B and reduce count of b by 1. but taking out first character or last character causes problems: A+BABA or ABAB+A A decision has to be made to either remove first or last character. (I wasn't able to figure this out)For strings of even length:ABABABAB notice removing AB or BA doesn't really affect the identity of string, what i mean by that is: ABABAB remove either AB or BA last 2 remaining characters will always be AB for this string. For BABABABA remove either AB or BA last 2 remaining characters will always be BA. So you can use them to satisfy c and d.In the end you must have some AB and some BA with you and you can easily determine what to satisfy with them, AB or BA or A or B.Hope this makes sense.
 » 8 months ago, # |   0 guys I want to ask you, I have submit problem A late say, then get AC, after time i resubmit again does it mean i will lose points or no, or it depend if it the second submit AC or WA, please tell me about it, and sorry for the stupid question, and if the announcement don't say it will be hack duration, then if i get AC no one will hack me or I will get WA after contest by adding pretests, thanks again.
•  » » 8 months ago, # ^ |   0 if you resubmit problem, you lose all points and get as much as it costs now
 » 8 months ago, # |   0 Everyone is competitive Coder, Until D arrives Just joking don't take it serious
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 Yeah
 » 8 months ago, # |   +72
•  » » 8 months ago, # ^ |   +5 xD
 » 8 months ago, # |   +9 Why was the difficulty in div 2 like AABEEF
 » 8 months ago, # |   +29 GreedyForces
 » 8 months ago, # |   +12 This is my first codeforces contest where I solve exactly $0$ problems and guessed how to solve $3$ (with pretests passed).
 » 8 months ago, # |   0 i noticed that you can divide the string into blocks creating a new block once you reach two consecutive equal letters and the problem can be reduced to finding a way to get at least c ABs and at least d BAs only. Can this be done with dp or greedy?
 » 8 months ago, # |   0 Really nice set of tasks in Div. 2 I had multiple approaches for the first 5 in Div. 2, but ended up being too hard for me, I could barely solve A (had no idea how to prove it). :(
 » 8 months ago, # |   +22 Who knew giving the contest this late would result in a bad outcome.
 » 8 months ago, # |   +44 Why so few construction problems? xDIn div1D, we can make a smaller answer than "choose one element from each cycle in $P$, take their max-min multiplied by 2"? I have a solution that gives exactly this minimum but it gets WA.
•  » » 8 months ago, # ^ |   0 It is possible to archive answer: 2(#CYCLES-1). Consider p={1,3,2,4} -> cycles {1}, {2,3} {4}. One of the optimal solutions with score 4 is: {1,3,4,2}.
•  » » 8 months ago, # ^ |   0 Came up with the exact same minimum, got tricked by the samples.
 » 8 months ago, # |   0 Problem C is very interesting!
 » 8 months ago, # |   0 Good contest, enjoyed it!
•  » » 8 months ago, # ^ |   +2 I enjoyed it, what's the need to downvote it?
•  » » » 8 months ago, # ^ |   +1 :'( ... Aise hi chalta ha cf pe
•  » » » » 8 months ago, # ^ |   +1 Sed.....
 » 8 months ago, # |   +18 This contest was super unbalanced, A-B-C was like easy problems(for my level). Solving D was Like solving E
•  » » 8 months ago, # ^ |   0 Complexed Speedforces!
 » 8 months ago, # |   0 How to correctly split the last sample from (div2) 1686D - Linguistics? 1 3 3 10 BBABABABABBBABABABABABABAABABA I thought you have to at least split into B, BABABABAB, B, BABABABABABABA, ABABA and then I can see how to fulfill 1 3 2 11, but I haven't found a valid split for 1 3 3 10, yet.
•  » » 8 months ago, # ^ |   +3 B = 1 BBABABABAB = 3 ABs, 1 BA, 1 BB = 1 BBABABABABABABABA = 7 BAsABABA = 2 BAs, 1 ATotal: 1 3 3 10
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 Of course! Thanks. Found the bug in my ugly solution 158469628... Spoiler: The BugFor segments of odd length ABA...A I immediately take one A and store half the length in tany. While handling my tany, when using such a segment for ABs, I used the remainder as As and Bs (a -= y; b -= y; instead of tany.push_back(y);)... so I couldn't take a partial segment for BA anymore...head -> desk
 » 8 months ago, # |   0 thanks for great contest !!!
•  » » 8 months ago, # ^ |   +8 Wow, you've done incredible job! Congrats on winning this contest!
•  » » » 8 months ago, # ^ |   +8 thank you so much !
•  » » » » 8 months ago, # ^ |   +5 Wow orz
 » 8 months ago, # |   +118 ACD1 are nice problems, but overall I dislike the round because all of the problems are purely ad-hoc :(. Would be really nice to have some data structure, DP or algorithmic problems.It might be that D2 or E fits those categories, but it doesn't really help when those two problems get 5 solves total.
 » 8 months ago, # |   +14 Div 2E / 1C Problem Title is very relevant to summarized participants' feedback
 » 8 months ago, # |   +21 Y div2D so ugly.
•  » » 8 months ago, # ^ |   +4 weren't there just 4 cases?
•  » » » 8 months ago, # ^ |   +4 3 cases, the odd-length alternating islets are interchangeable regardless of their starting letter.
 » 8 months ago, # |   +43 'D'epressing Contest
 » 8 months ago, # |   0 Why hacks aren't added yet? so many wrong got ac.
 » 8 months ago, # | ← Rev. 2 →   -10 looking for problems [D: F] div2 I think we are talking about the tourist S contest versionhowever, great contest with great ideas am waiting for the Editorial for Upsolving
 » 8 months ago, # | ← Rev. 4 →   +14 people start downvoting the contest, What was the reason ACC to you?
 » 8 months ago, # |   +1 I hacked someone on Cwhen will my testcase added in question C , waiting...
 » 8 months ago, # |   +32 The problems I solved are really boring but the problems I didn't solve seem pretty good so overall 6/10 good round oomfie
 » 8 months ago, # | ← Rev. 2 →   -18 Very poor contest! I have seen problem div1A/div2C somewhere, there was a big gap between div1A/div2C and div1B/div2D. I was expecting that the problems would be really nice, as the author was antontrygubO_o
 » 8 months ago, # |   -14 today's A is the same as 134A
 » 8 months ago, # |   +6 I miss good div2D pblms.
 » 8 months ago, # |   +20 I was waiting for this for a long time, since it probably is my last round before summer. Turns out I was waiting for a speedforces with a huge rating loss for me because I'm not good at solving problems fast. Wow, I feel so betrayed(( i mean that's my fault but I'm sure there is something wrong.also, why didn't Anton invite other people apart from masters or gms to test the round? Why only 1 specialist from div2? I think that was his mistake, nobody could give appropriate feedback to div2 set, and it ended up being this.
 » 8 months ago, # |   +4 Ratings updated preliminarily. We will remove cheaters and update the ratings again soon!
•  » » 8 months ago, # ^ |   -10 What about adding Hack test cases? There are so many wrong submissions who got ac on C.
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 +1
 » 8 months ago, # |   +24 Might have benefited from having more than one div 2 tester, just my thoughts.
 » 8 months ago, # |   -154 This round is complete shit but heavily upvoted. The round 792 had usual problems — and it was heavily downvoted only because the author was not as famous as the author of today's round.Guys, stop praying for your idol Anton — he might be a good contest coordinator and a good contestant himself but he is not a good problem writer. If you also didn't enjoy this round as much as I did not — hit the downvote button.
•  » » 8 months ago, # ^ |   +13 Is the round complete shit if you don't like it?
•  » » 8 months ago, # ^ |   +17 For me at least, having adhoc problems that require algorithmic thinking is better than having 5 Li-Chao Tree problems with heavy constant optimization with very tight TL, but I have to admit that the difficulty curve for this round could have definitely been better, but I still think the problems were good.
 » 8 months ago, # |   0 I tried to solve Problem D with DFS, and it worked well.. until I got Time Limit Exceeded on a pre-test.
•  » » 8 months ago, # ^ |   +3 and what's wrong with it?
•  » » » 8 months ago, # ^ |   +3 nothing wrong with it, just sharing experience.
•  » » 8 months ago, # ^ |   0 I feel like counting A B AB BA and ABA is enough.
•  » » » 8 months ago, # ^ |   0 Break string into substrings till 2 consecutive has not come... For example ABABABABBABAA Break down:- ABABABAB BABA ANow you can see...
 » 8 months ago, # | ← Rev. 2 →   0 How to solve problem D div 2?
 » 8 months ago, # |   0 I'm getting; wrong answer Jury found the answer but participant didn't (test case 1435) 158465505 not getting why is it so?? can anyone help
•  » » 8 months ago, # ^ |