Perhaps today and/or tomorrow due to a power outage there may be disruptions in the work of Codeforces and Polygon. Please do not plan any important events during this time. If there are details or the exact time, we will definitely publish them. Estimated time of maintenance: from 2 Aug, 16:00 (UTC) to 2 Aug, 20:00 (UTC). ×

By Harbour.Space, 13 days ago, translation,

Hey, Codeforces!

We have great news for you.

Harbour.Space University is excited to announce a new contest for all interested programmers who want to start their studies in Barcelona, Spain or Bangkok, Thailand, and join our ICPC team.

The contest will be hosted on the Codeforces platform Jul/22/2021 17:35 (Moscow time). We have prepared 9 problems of the joined (Div1 + Div2) level. The round will be rated and open for everyone.

UPD: Scoring distribution: 250-500-750-1250-1750-2500-3000-3750-5250

UPD2: The editorial is out!

Sign up for the contest →

For the next academic year (2021/22), we are recruiting a fascinating community of competitive programmers from the top prize-winners of international Olympiads to join one of our competitive programming teams at the university.

In the next few years, our goal is to win SWERC and compete at a high level in the ICPC globally. Therefore we want to invest a serious amount of our energy, resources, and talent into these activities.

That’s why we are inviting you on an exciting journey in the company of like-minded people, outstanding coaches, and our ongoing partnership with Codeforces.

We have already organized over 100 educational rounds, so we think the time has come to test our joint efforts and reward the most diligent.

Here’s what you win if you place in the contest:

,

The monthly living allowance throughout the entire duration of studies depends on the overall performance of the candidate. As a guidance, it is in the range of 500-1500 EUR (it might be applied to the contestants who win 4th-10th places).

*No application fee is required for any of the awards listed above.

We would like to say a word of appreciation to:

UPD3: Congratulations to the award winners!

Note1: All the winners get an application fee waiver.
Note2: All of you eligible for Competitive Programming Scholarships (cf rating > 2000) may apply directly through our website and go through the general admissions process.

Guaranteed full scholarship + monthly living allowance + free 3-week course:
- 1 (49). Ali.Kh
- 2 (58). Yousef_Salama
- 3 (175). Krauze

A full scholarship with interview process + free 3-week course:
- 4 (184). sunyx
- 5 (200). 777
- 6 (203). Redhood
- 7 (219). Meijer
- 8 (226). Gioto
- 9 (265). kpw29
- 10 (267). Huah2

Free 3-week course:
- 11 (292). dhruvsomani
- 12 (299). adamant
- 13 (326). Kaitokid
- 14 (355). khiro
- 15 (264). c8kbf

Good luck, and may the code be with you!

Harbour.Space University

• +59

 » 13 days ago, # | ← Rev. 5 →   -113 Sir Errichto is an Author, seems Good!
•  » » 12 days ago, # ^ |   +56 Can i ask why so many downvotes?please don't downvote this message :((
•  » » » 12 days ago, # ^ |   -46 because people think that downvotes are better than upvotes :(
•  » » » » 11 days ago, # ^ |   -21 My rating is 1351. If i wanna become a specialist after this round, (to gain 50 rating points) 4000th place will be enough, right? (giving the fact that all div1 participants (about 1200 users) will be above me)
•  » » » » » 11 days ago, # ^ |   0 I think yes, good luck :)
•  » » » » » » 11 days ago, # ^ |   0 Thank you, you too;)
•  » » » » » 11 days ago, # ^ |   0 i also fear of that , to be honest u will not achive today but some day sure
•  » » » » » » 11 days ago, # ^ |   0 why not today?
•  » » » » » » » 11 days ago, # ^ |   0 because he is not consistent yet thats why
•  » » » » » 11 days ago, # ^ |   0 Just use cf predictor
•  » » » 11 days ago, # ^ |   +13 people downvote everything, just like stack overflow ahah, anyway dont take it personal
•  » » » 11 days ago, # ^ |   0 Get a higher rating and you'll get upvote — CF hidden laws No.1 -
•  » » » » 11 days ago, # ^ |   +112 Yes, get higher rating and stop writing stupid comments and you will get upvoted.
•  » » » » » 10 days ago, # ^ |   0 Like this guy.
 » 13 days ago, # | ← Rev. 2 →   -32 Only 3 testers? Kinda weird O_oUPD: LostCoder was right, more testers were added
•  » » 13 days ago, # ^ |   +29 only if they were grey
•  » » 13 days ago, # ^ |   +29 Probably new testers would be added in few more hours i think.
•  » » 12 days ago, # ^ |   -14 tourist prepared the last contest all himself. So, i think 3 testers isn't too bad
•  » » » 12 days ago, # ^ |   +93 tourist counts as 3 people
•  » » 12 days ago, # ^ | ← Rev. 2 →   +17 Now there are 1015 testers.
 » 13 days ago, # |   +1 Niceeeeee prizes, but absolutely they're not mine :(
 » 13 days ago, # |   +24 Erricto means we r getting Geometry Problems. change my mind!
•  » » 13 days ago, # ^ |   0 Seoul_graffiti good guess! Good luck mates
•  » » 12 days ago, # ^ |   0 (*_+)
•  » » 12 days ago, # ^ |   +2 If they aren't A,B, or C, i am good
 » 13 days ago, # |   -21 Errichto is one of the authors = good round
 » 13 days ago, # |   +6 Weird terms of agreement when registering for the contest: Section#38:RegistrationTerms Maybe it makes sense to fix this? So that the cheaters don't have a formal "I didn't break any rules" excuse.
 » 13 days ago, # |   +28 Albeit really appreciative for the CF partnership, I highly doubt this recruitment strategy will be particularly effective. Limiting the choices to only top 10 in div 1 just seems absurd and suicidal. Unless it was never intended for the prizes to be collected?
•  » » 13 days ago, # ^ |   +102 I understand that it's top-10 among those showing interest.
•  » » » 13 days ago, # ^ |   +6 Yes, that would make way more sense. I misinterpreted it.
 » 13 days ago, # | ← Rev. 2 →   +33 rules are broken again
•  » » 13 days ago, # ^ |   +52 Thanks, fixed.
•  » » » 12 days ago, # ^ |   +5 "City where you live ot city you are representing", In social settings.
 » 13 days ago, # |   +40 benefits summary:pay your rating and 2 hours and might get :) large +delta and scholarship little +delta nothing little -delta large -delta
 » 13 days ago, # |   +68 My only achievement at codeforces
•  » » 13 days ago, # ^ |   +48 And my only achievement is gone now, thanks to my new friends :(
•  » » » 12 days ago, # ^ |   +49 It's not gone, you have been given a new target, chase it up ;)
•  » » 12 days ago, # ^ |   +75 Meanwhile me:
•  » » » 12 days ago, # ^ |   -24 you are guys? i thought you are computers with legs :D
•  » » 12 days ago, # ^ |   0 I looked at my contribution and my fans' number and didn't feel like saying anything :(
•  » » » 12 days ago, # ^ |   0 And then your contribution dropped :(
•  » » 11 days ago, # ^ | ← Rev. 4 →   +113 from Imgflip Meme Generator wait should i be happy or sad lol Spoilerwell thanks for the upvotes and for my 2 new friends xD
•  » » » 11 days ago, # ^ |   +2 Woah!!! Behold, Here comes the true legend
•  » » » 11 days ago, # ^ |   -21 Every action has equal and opposite reaction? Btw, nice coincidence! (/◕ヮ◕)/
 » 13 days ago, # |   +35 As a tester, I want to wish you all good luck & high rating!P.S. Yes, it is rated.
 » 13 days ago, # |   -6 Praying for specialist! Also orz to the authors, the testers, and MikeMirzayanov for the Platform!
•  » » 13 days ago, # ^ |   +41 Imagine tons of unnecessarily tag for Mike!!!
•  » » » 13 days ago, # ^ |   -8 my bad lmao
•  » » 13 days ago, # ^ |   0 You will get there, don't worry.Remember me?I was in ITMO camp.
•  » » » 13 days ago, # ^ |   -14 yeah ofc
 » 13 days ago, # |   +55 As a tester, I ...
•  » » 13 days ago, # ^ |   +65 am late.
•  » » » 12 days ago, # ^ |   0 But the problems will be inter....
 » 12 days ago, # | ← Rev. 3 →   -65 .
•  » » 12 days ago, # ^ | ← Rev. 2 →   -25 Seems like I misunderstood. Sorry for everyone.
 » 12 days ago, # |   0 Is it possible to decline the scholarship(not that i'll win it, just curious)
 » 12 days ago, # |   -16 Hope to reach pupil. Should i solve previous contests of these authors? Would that be helpful?
•  » » 12 days ago, # ^ |   +18 Why so many downvotes? I don't understand.
 » 12 days ago, # |   0 Hoping to be an expert for the first time in this round. Got stuck around 1500-1600 for too long.
 » 12 days ago, # |   -22 The moment i see Errichto name in the author list, i immediately checked the contributors list and then realised that he is not the author of the announcement blog :(
 » 12 days ago, # |   0 Really very excited to participate!!
 » 12 days ago, # |   +1 Looking forward to it! interested in your university. i ma still a bit young but i have plenty of time to practise for your future contests!
 » 12 days ago, # |   +18 When, will the scoring distribution be announced ?
 » 11 days ago, # |   +12 curious to know how did authors from different nations came together to write a round? As far as I know, CF coordinators don't accept individual problems
 » 11 days ago, # |   +28 Hope I can become an International Master after this round.
•  » » 11 days ago, # ^ |   +15 Sad.I could become an International Master if My D were not FST.
 » 11 days ago, # | ← Rev. 2 →   -75 i just wanna congratulate tourist, benq and radewoosh for getting the first three places and winning the scholarship
•  » » 11 days ago, # ^ |   +69 How in the world did you spell tourist wrong?
•  » » » 11 days ago, # ^ |   +83 To avoid copy-right issues.
 » 11 days ago, # |   0 Is it a 3 hour round?
 » 11 days ago, # |   +4 Score distribution??
 » 11 days ago, # |   +1 It's been a while since I entered a contest after a time skip, I'm looking forward to it <3
 » 11 days ago, # |   +3 The purpose of the scholarship is to attract the top-ranked coders to join the university and to win ICPC, right? So, if they don't fulfill the requirement for ICPC (e.g. age limitation), does it mean they are not eligible for the scholarship?
•  » » 11 days ago, # ^ |   +15 Good day, foolishgoat We carefully take a look at each case separately. Winning the ICPC is one of the priorities of our university, but also, we are investing in a community of like-minded competitive programmers. We have had the cases of several top-rated programmers who have been already awarded scholarships for one of our technical master's programmes
 » 11 days ago, # |   +18 update: 9 problems in 2h 30m :)
 » 11 days ago, # |   +1 I think this round will have best problem ever I have seen.
 » 11 days ago, # |   0 Score distribution?
 » 11 days ago, # |   0 UPD: Scoring distribution: 250-500-750-1250-1750-2500-3000-3750-5250
•  » » 11 days ago, # ^ |   0 A 250pts task...?
•  » » » 11 days ago, # ^ |   +13 Only once I saw this score
•  » » 11 days ago, # ^ |   -28 Guys i don't really understand the downvotes. please don't downvote unnecessarily :( Tnx.
 » 11 days ago, # |   0 250 points for A... First time am I seeing that!
 » 11 days ago, # |   0 I have never seen 250 pts for problem A. It will be interesting!
 » 11 days ago, # |   +12 tourist ans Benq both are participating today and the fight for rank 1 continues!
•  » » 11 days ago, # ^ |   +15 Well Benq did it!
 » 11 days ago, # |   +19 Speedforces coming up
 » 11 days ago, # |   +21 So glad to see marX as a problemsetter!
 » 11 days ago, # |   0 Amazing!!Contest
 » 11 days ago, # |   0 getting 5min long queue for 1st question :(
 » 11 days ago, # |   +37 stringforces
 » 11 days ago, # |   -8 Does someone ever had this feeling, that you didn't register for the contest and thought you will after you solve till C (pupil goal), and then realize you can't register anymore (for the first time)? (sad emoji). Anyways will upload in practice.
•  » » 11 days ago, # ^ |   +9 why did you have to use so much tactics??That you didn't register then waited until solving C.Just fucking register before the contest and give the contest like a winner.Don't be so timid!!
•  » » » 11 days ago, # ^ |   +1 For The First Time. Also, Regarding the tactics everyone should have there own Freedom of choice.
•  » » » » 11 days ago, # ^ |   0 of course you have the freedom of choice,I just gave my opinion(nothing else)
•  » » » 11 days ago, # ^ |   0 saying a person who stopped giving contest after becoming specialist once.Show the same courage yourself if you think you can sustain specialist by giving contest.
•  » » » » 11 days ago, # ^ |   -19 It's a dumb comment from you.How do you know that I am not giving contests because of fear of loosing specialist position??I am very confident that the next contest I will give I will be expert.Besides,I don't consider being specialist as an achievement.For me it's just a node on the path.
•  » » » » » 11 days ago, # ^ |   -15 A kid who took 71 contest to be specialist once is confident to be expert in his next contest.Just stop lying to yourself bro.
•  » » » » » » 11 days ago, # ^ |   +9 and people like you can only comment like these...I don't care whatever you say.3 years later when I will become red after giving 200 more contests..Please on that day comment some stupid stuffs too..I am inviting you.Till then take care and stop barking
•  » » » » » 8 days ago, # ^ |   0 I am very confident that the next contest I will give I will be expert..
 » 11 days ago, # |   +41 At least i will be able to participate in div 3 round.....
•  » » 11 days ago, # ^ |   +5 Me too :) we had same ratings before contest xd..
 » 11 days ago, # |   +26 HackForces
•  » » 11 days ago, # ^ | ← Rev. 2 →   -10 Just hacked some1,feeling good. xD (Only doing memes,plz don't downvote me)
•  » » 11 days ago, # ^ |   +3 Soon it'll turn into FSTForces :(
 » 11 days ago, # |   +9 Saw a tough Fight between Tourist and BenQ...Congrats BenQ for winning.
 » 11 days ago, # |   +12 I trolled on F because of a one char error for like 40 minutes -_- but the problems were good overall.The observation on E was pretty nice (albeit maybe a bit convoluted?).
 » 11 days ago, # |   +11 What is the intended solution for F? I am doing like some $O(n \log MAX ( \log MAX + \sqrt{MAX} ))$ shit and runtime is ~3950ms. Likely not going to pass sys test.
•  » » 11 days ago, # ^ |   0 I had a solution with the same complexity, but couldn't debug in time :/
•  » » 11 days ago, # ^ |   0 If you use sqrt decomposition with prefix/suffix sums in each block then the $log$ factor disappears because the intervals are disjoint.
•  » » 11 days ago, # ^ |   0 I was able to do $O(n\sqrt{n})$
•  » » 11 days ago, # ^ |   +3 I used Fenwick trees to compute the sum and count of numbers $\ge \sqrt{K}$, with $K=500$ it passed systests in 888 ms.
 » 11 days ago, # |   +18 How to solve E?
•  » » 11 days ago, # ^ |   +9 Why my E does not work?Foreach p[i] we calculate the k if that p[i] was an unswapped one. Then we collect the frequency of all those k.Each k with a freq>=n-2*m is a possible k.But that fails on pretest 2, why?
•  » » » 11 days ago, # ^ |   +6 Nope, you still need to do further check. Try this input: 1 6 2 2 3 4 1 5 6 Your code outputs 2 0 5, but this is incorrect. Can you change 2 3 4 1 5 6 to 1 2 3 4 5 6 with only two swap operations? You can't; you need at least three.
•  » » » » 11 days ago, # ^ |   0 I see, thanks.
•  » » 11 days ago, # ^ |   +37 At most 3 different shift values are possible. Check each of them (we run dfs and check if the number of bad-ordered vertices — number of cycles <= m).
•  » » » 11 days ago, # ^ |   +28 I will always remember to read special constraints...
•  » » 11 days ago, # ^ |   +15 There are at most 3 possible k's (you only consider k's where we have >= n-2*m fixed points, you couldn't move more), and m <= n/3. For each k, just check how many swaps you need to sort it.
•  » » » 11 days ago, # ^ |   +14 I will always remember to read special constraints...
•  » » » » 11 days ago, # ^ | ← Rev. 2 →   +8 EDIT: Ignore, incorrect
•  » » » » » 11 days ago, # ^ | ← Rev. 2 →   0 .
•  » » » » » 11 days ago, # ^ |   0 Why would it be $O(N^2)$?
•  » » » » » » 11 days ago, # ^ |   0 I'm an idiot, for some reason I thought $O(TN)$ was $O(N^2)$, which makes no sense. I'll edit the comment.
•  » » » 11 days ago, # ^ |   +3 I feel like I'm missing something obvious, but how does having atleast n/3 fixed points imply that only 3 k's can satisfy that constraint ?
•  » » » » 11 days ago, # ^ | ← Rev. 3 →   0 Using swaps you can change at most $2m$ positions. That means that each valid k has to have at least $n-2m$ fixed points. This is smallest when $m$ is maximal, which is $n/3$. That means you have to have more than at least $n-2\cdot n/3 = n/3$ fixed points, which is possible for at most 3 different k's.
•  » » » » » 11 days ago, # ^ |   0 Thanks. I got to the "we need n/3 fixed points" criteria but could not come to the conclusion that it means we can have atmost 3 K's.The rather simple piece I was overlooking was that each position can only be fixed by a unique 'k'. So the set of fixed points for any two K's do not intersect and therefore having 3 of them have sets of size >= n/3 means there's nothing left for the rest of the Ks.
 » 11 days ago, # |   0 Holy,shit!C was easier than B.I didn't notice.
 » 11 days ago, # |   -13 Is problem E related to counting inversions? I think I was close to the idea but couldn't implement it on time xd.
 » 11 days ago, # |   -8 How to solve B??
 » 11 days ago, # |   +19 Too bad problem B had such weak pretests. :(
•  » » 11 days ago, # ^ |   0 maybe It was intended for hacking
•  » » » 11 days ago, # ^ |   0 Hacking costed Tourist to lose his 2nd Position and Shift to 4th...
•  » » 11 days ago, # ^ |   0 Someone tried to hack mine and failed. PS: Thank God
 » 11 days ago, # |   +36 Thank you for the contest! Also, I'm glad to see a contest with hacks, for a change.
•  » » 11 days ago, # ^ | ← Rev. 2 →   -7 Thank you for the contest! Also, I'm glad to see a contest with weak pretests, for a change.
 » 11 days ago, # |   +38 E was such a troll problem.
•  » » 11 days ago, # ^ |   0 Why so ? . I just want to know why do you think it is . I wasn't able to solve it,Can you explain your solution ?
•  » » » 11 days ago, # ^ |   +3 The basic idea is that for each k, you perform the shift, and then you count the number of swaps needed to go from one permutation to the other. If it is at most m, we found a good k.But this solution takes quadratic time. The key insight is the constraint on m <= n/3. This means that we only need to consider options where at least n/3 numbers are already fixed. And there can be at most 3 of these.
 » 11 days ago, # | ← Rev. 2 →   0 Please check why it is giving runtime error for Problem-D :- 123349910
•  » » 11 days ago, # ^ |   +3 Do not do size() - 1 without typecasting. Because size() returns unsigned int, so when size = 0, size() — 1 becomes arbitrarily large.
•  » » » 10 days ago, # ^ |   0 Thanks rifatrraazz !!
 » 11 days ago, # |   +17 Find my D is wrong and resubmit in the last minute!!!!! Case1 abbb a NO And hope my F will pass although it takes 3.96s in pretests
•  » » 11 days ago, # ^ |   +1 Bruh!Too many incoming FSTs!
 » 11 days ago, # |   +16 what is the hack testcase for B?
•  » » 11 days ago, # ^ |   0 1aaaabcddddddddddda ddddcIt should output YES
•  » » » 11 days ago, # ^ |   0 Lol my solution passed this but didn't passed the pretest...Sad Times:-(
•  » » » 11 days ago, # ^ |   0 my code outputs "YES" for this , still got hacked :(
•  » » 11 days ago, # ^ |   0 1 fabcb abcbaf
 » 11 days ago, # |   0 How to solve D?
 » 11 days ago, # | ← Rev. 2 →   +180 Scoring distribution: 250-**1900(500+14×100)**-750-1250-1750-2500-3000-3750-5250.
•  » » 11 days ago, # ^ |   +12 What testcase did you use for hack?
•  » » » 11 days ago, # ^ |   +9 case4 baaaaaaa aaab dcabc abcd aaaa aaaa baac aaab 
•  » » » » 11 days ago, # ^ |   0 ansNO NO YES NO is it right?
•  » » » » » 11 days ago, # ^ |   +69 One more FST :D
•  » » 11 days ago, # ^ |   +36 You still missed 4 hacks in your room lol
•  » » 11 days ago, # ^ |   +48 I did my best in hacks too :)
•  » » 11 days ago, # ^ | ← Rev. 2 →   +1 I thought there was a B test case that I was missing after only hacking 1 B solution in my room and seeing others hack 5+ B solutions, but after system testing I see that others were simply way more lucky with the rooms they were in.
 » 11 days ago, # |   0 Can someone please help why my solution of B giving wrong answer, got stuck for 1.5 hours:(link
•  » » 11 days ago, # ^ |   0 1 gamfhvaz av -> YES
 » 11 days ago, # |   +12 I solved A,C. Solved C first time in codeforces. Thanks for the contest.
 » 11 days ago, # | ← Rev. 4 →   -48 Hello! Why does this solution for C is failing on the second pretest? I was debbuging it for like two hours, but my debug method has a fatal flaw -- i'm brainlet. Pls help. https://pastebin.com/xqysHjZu
•  » » 11 days ago, # ^ |   0 Test with 1010101010. Your code outputs 7, but the correct answer is 6.
•  » » » 11 days ago, # ^ |   0 This is interesting, thanks for the observation, 'll try to figure out, i guess...
 » 11 days ago, # | ← Rev. 2 →   +14 Observation for Elet's consider answer for k cyclic shifts Let the number of elements in the array that are in their position be p and that are not in their positions be t p + t = n minimum number of moves required to rearrange those incorrect positions will be (t+1)/2 so (t+1)/2<=m t<=2*m-1 n-p<=2*m-1 p>=n-2*m+1 p>=n/3+1(let it be n/3) as m<=n/3, there won't be many k's for which p>=n/3. 
•  » » 11 days ago, # ^ |   0 Thanks for sharing your observation...!I thought about it for hours, but couldn't get it :(
 » 11 days ago, # |   0 What is Test3 in problem F
 » 11 days ago, # | ← Rev. 2 →   +17 Pretests for D are very weak. Test case for successful hackingabcde abcdAnd my pretest passed solution also fails on this test case and I realized that after hacking someone else solution and locking my own T_T.
•  » » 11 days ago, # ^ | ← Rev. 2 →   +7 Nvm, I thought mine would fail, but it is AC. I thought it should be YES. Nevermind.
•  » » 11 days ago, # ^ |   +3 Ans should be NO ryt?
•  » » » 11 days ago, # ^ |   0 correct
 » 11 days ago, # |   +61 Problem B & D weak pretest :(
 » 11 days ago, # |   +9 i think standings is gonna change very much :/
 » 11 days ago, # |   +5 I've got a really nice new achievement in this contest. Which is I'm the first participant to get WA on test 23 on Problem E, and almost the only, actually there are just two participants who managed to do that. Thanks codeforces for this new achievement.
 » 11 days ago, # |   +35 How to solve F? I think I figured out how to calculate all pairs apart from ones with structure (i < j a[j] % a[i]).
•  » » 11 days ago, # ^ | ← Rev. 4 →   +5 Add numbers from left to right. When we insert a number $a$: $b \mod a = b$ for all numbers $b < a$, so add sum of all smaller numbers to answer. $a \mod c = a$ for all numbers $c > a$, so add $a$ to the answer multiplied by the amount of larger numbers. The other 2 cases are a little more difficult In order to count $c \mod a$ for numbers $c > a$, lets notice that $c \mod a = c - i \cdot a$ for numbers $c$ in range $[a \cdot i, a \cdot (i + 1) - 1]$. Just loop over $i$ and count using the formula. Total iterations over $i$ for all values will not exceed $A \cdot log(A)$ (similarly to Sieve of Eratosthenes), because all of the elements are distinct. In order to count $a \mod b$ for numbers $b < a$, we do similarly to above, but instead we precalculate for $b$. So we do something like add $b$ to position $b$, add $b$ to position $b \cdot 2$ and so on... Then for $a$ we will add to the answer the number of smaller elements $\times$ $a$ — sum on range $[1, a]$. We can perform all the operations fast using some fenwick trees.
 » 11 days ago, # |   -38 unbalanced contest + weak pretests, lmfao.
 » 11 days ago, # |   +2 tourist was happily securing second place ... And then the hackers came :)
•  » » 11 days ago, # ^ |   +1 And then week Pretest came :)
 » 11 days ago, # |   +1 123348935 Problem D Why this gives WA on pretest 17?
•  » » 11 days ago, # ^ |   0 1 wtcy w -> NO
 » 11 days ago, # |   +100 Hacks on problem D should be a lesson to future problemsetters that you should either have more than 1 brain cell or use $t \leq 10^4$.
•  » » 11 days ago, # ^ |   +52 What do you mean?
•  » » » 11 days ago, # ^ | ← Rev. 2 →   +11 You can either make all possible test cases with small $n$ and a small alphabet size(2, 3 or 4) or do the brainless approach of using $t=10^4$ and making completely random test cases by partitioning $1.25 \cdot 10^5$ into $10^4$ parts and making the size of each part the size of the first string for that test case, making the alphabet size a random number between $1$ and $min(n,26)$ and making the size of the second string a random number between $1$ and $n$. Both of those will definitely make a test case like ab a, which is the only D hack that I know of.
•  » » » » 11 days ago, # ^ |   +3 Well, setting $t \leq 10^4$ is something different than setting higher $t$ and just making a few random tests, but I guess the "more than 1 brain cell" part is kind of about it.
•  » » 11 days ago, # ^ |   0 Bruh, all pretests on D except 2 (and sample test) have $t=1$. These 2 pretests have $t=10$ and $t=500$ respectively.
 » 11 days ago, # |   0 How to solve E?
 » 11 days ago, # |   +1 Suppose someone hacked any solution. My question is will that test case be included in system test?? Or it remains the same?
•  » » 11 days ago, # ^ |   0 yes it will , every hack case is included in system test
•  » » » 11 days ago, # ^ |   0 Thanks brother
 » 11 days ago, # |   +79 f**k the sh*t weak pretest
 » 11 days ago, # |   +11 FST Forces!!! T_T
 » 11 days ago, # |   0 its not a good idea to start doing problems after 1 and half hours of contest beginning, I got it after I could not solve atleast 2 question
 » 11 days ago, # |   +24 Is this real? Red coders getting FST on B?????
 » 11 days ago, # |   +5 It seems hacker also get hacked :3
 » 11 days ago, # | ← Rev. 2 →   +358 Good job on making an Educational Hackforces Round!
•  » » 11 days ago, # ^ |   0 Yeah...too much Goof problems
•  » » 11 days ago, # ^ |   0 yeah i can feel the same pain..
•  » » 11 days ago, # ^ |   +163 Cool.. Educational Round is rated for Div. 1 now, meanwhile AtCoder Regular Contest isn’t for some reason.
 » 11 days ago, # | ← Rev. 3 →   +17 In B, except for the edge cases, not getting covered in system tests. There is also another hack case.The system tests don't include even a single case of "YES" with sz(s) == 500 and sz(t) == 999, because there are solutions (which got AC'ed), with dp array parameters as 505, 505. (dp[505][505]).:(
 » 11 days ago, # |   +36 Why not $10$ tasks of "write a cycle"-style?
•  » » 11 days ago, # ^ |   +28 I was wondering for a while. Did you mean "loop"?
•  » » » 11 days ago, # ^ |   +3 I was wondering for loop a while loop. Did you mean "loop"?
 » 11 days ago, # |   +14 Man, what is going on, my submissions are not being checked
•  » » 11 days ago, # ^ |   0 Same problem
•  » » 11 days ago, # ^ |   +1 Same..My all submissions are in the queue.
 » 11 days ago, # |   +6 Your text to link here... I want to know that why problem B is always routime error
•  » » 11 days ago, # ^ |   +6 I think the line "int i=s.length()-2" is the reason for getting runtime error. s.length() always returns an unsigned integer. If the value of s.length() is 1 then s.length()-2 will not be -1. It will be a big unsigned integer and your string doesn't have that big size. That's why you got runtime error.
 » 11 days ago, # |   +9 Hi Everyone, what is the correct approach for problem D, I was trying to greedily find the next matching characters but it's not the correct approach. Do we need to think around dp for this question?
•  » » 11 days ago, # ^ |   0 I also use greedy and get the right answer
•  » » 11 days ago, # ^ |   +14 Do greedy on the reversed strings and you will succeed. To prove it: let's say that in the correct solution we do not match a pair of symbols and do backspace instead. Then after some even number of symbols, we will face the same symbol. We could have just deleted all the skipped symbols + this one and just pick the very first one we faced. Thus, our greedy works.
•  » » » 11 days ago, # ^ |   +45 Sir, thank you for hacking my B, only if you could've done it a little earlier :(
 » 11 days ago, # |   +3 some people were hacked in the middle of the contest and they were able to resubmit? i dont see this fair but ok..
•  » » 11 days ago, # ^ |   +5 Yeah, It seems unfair because getting hacked is just telling somebody that your solution will fail system tests .Obviously he/she will resubmit and escape FST .
•  » » » 11 days ago, # ^ |   0 yeah but that allows you to find the mistake and submit a good solution which will pass. and what is FST?
•  » » » » 11 days ago, # ^ |   +11 FST-Failed System Tests
 » 11 days ago, # |   +26 Is B the problem with the most FST in cf history ?
 » 11 days ago, # |   +32 The pretest are f*ck*ng weak.
 » 11 days ago, # |   +13 With the help of Problem D，I can't get Grand Master！
 » 11 days ago, # |   +183 I would worry about losing rating, but fortunately div.3 rounds are unrated for me.
•  » » 11 days ago, # ^ |   -8 unfortunately*
•  » » » 11 days ago, # ^ | ← Rev. 2 →   +20 I think he wrote "fortunately" veeeerrry intentionally!! :)
 » 11 days ago, # |   -11 Thanks for the strong pretests!!!!!!!!!!
•  » » 11 days ago, # ^ |   -38 And yes F;;k yuuuu testers
 » 11 days ago, # |   +122 A meme: meme
 » 11 days ago, # | ← Rev. 3 →   +174 B & D
 » 11 days ago, # | ← Rev. 2 →   -60 Currently I am new here started few months ago and did few problems of Div 1.should I solve 100 problems of Div 1 or I should solve 30-40 and then proceed to Div2I did the below problem BBut I got late to submitCan anybody suggest if this is a good approach or a lengthy one
•  » » 11 days ago, # ^ | ← Rev. 2 →   +20 Did anybody explain you not to insert code directly in the comment?
•  » » 11 days ago, # ^ | ← Rev. 2 →   -9 Why do I get So much downvote though I already wrote that I am newbie, you code masters treat a newbie this way to encourage them
•  » » » 11 days ago, # ^ |   +4 This blog is about the certain contest, so people only discuss about that contest. Avoid discussing about other stuff. There are many other people who have asked the same questions. Do some searching online. People's experiences are different. No one can tell you the single best way to learn.
 » 11 days ago, # |   +44 I have a question but I might get downvoted,What is the importance of pretests if they don't tell me if my solution is correct or not?
•  » » 11 days ago, # ^ |   +3 Just thought the same thing..
•  » » 11 days ago, # ^ |   +34 You can enjoy the contest till it lasts. :D
•  » » 11 days ago, # ^ |   +3 Well, there is a reason they're called PREtests
 » 11 days ago, # |   +88 So I spent more than 1.5 hours on F and after reading some accepted solutions, I realized that I overlooked the "distinct" part. Please press F guys.
•  » » 11 days ago, # ^ |   -8 But I think there is only a slight difference if written cleanly(which I wasn't able to do so).
•  » » 11 days ago, # ^ | ← Rev. 2 →   +29 WTF I literally just found that I had overlooked it because of your comment.F
•  » » 11 days ago, # ^ |   0 :O I didn't read that too and just hoped my $\mathcal{O}(N*(N/B)*log(N/B))$ works lol
•  » » 11 days ago, # ^ | ← Rev. 2 →   0 Me too! I had a lot of trouble with fitting my $O(N * \sqrt {N * \log (N)})$ solution in the TL, but eventually I did try deleting the #define int long long line, which helped a lot. Will reconsider using it in the future.
 » 11 days ago, # | ← Rev. 4 →   -25 .
 » 11 days ago, # | ← Rev. 2 →   +26 Woops I didn't realize we had to end an even number of positions away from the end in problem D so I tried both parity sequences, muh bad.
•  » » 11 days ago, # ^ |   +8 Lol, now I got my mistake. Thanks!
 » 11 days ago, # | ← Rev. 2 →   0 why my submissions are not getting judged?
 » 11 days ago, # | ← Rev. 3 →   +14 Don't forget to check my submissions. My all submissions are still in the queue. :(
•  » » 11 days ago, # ^ |   0 mine too. :(
 » 11 days ago, # |   +38 Does the $==$ operator on strings return "false" immediately if the lengths are different? I assumed that it doesn't and tried to hack a guy which would have $O(n^4)$, but it was unsuccessful.
•  » » 11 days ago, # ^ |   0 I think it does.
•  » » 11 days ago, # ^ |   0 tried the same with same result, so might be
•  » » 11 days ago, # ^ |   +10 I found this: https://stackoverflow.com/a/32486610
•  » » 11 days ago, # ^ |   -15
 » 11 days ago, # |   +6 Damn! Hackforces :/
 » 11 days ago, # |   +21 ![ ]()
•  » » 11 days ago, # ^ |   0 same...I was going to gain 93 rating (and reach expert!), but then after system tests, I'm going to lose 7 rating.
 » 11 days ago, # |   +17 My F passed with 3.993s. Wow.(Probably the redemption of last round's F)
 » 11 days ago, # |   0 Can someone point out the edge-case of B, though I passed FST, would like to know what it was?
•  » » 11 days ago, # ^ |   0 My FST case1 cabad cabac
•  » » » 11 days ago, # ^ |   0 And why should not be "YES" ? "cabac" = "cab" + "ac" ? right?
•  » » » » 10 days ago, # ^ |   0 Yes, output should be "YES" but my code printed "NO".
•  » » » » » 10 days ago, # ^ |   0 Don't Worry! My code printed "YES", still failed system test :)
 » 11 days ago, # | ← Rev. 3 →   0 .
•  » » 11 days ago, # ^ |   0 maybe he solved F quickly and just thought of having a look at D and then forgot to submit F coz he thought let me solve this D quickly coz it's gonna be quick and then he submitted both of them together.
 » 11 days ago, # |   +2 hackforces going great :3why soooo weak pretest!! :'(
 » 11 days ago, # |   +6 I think that it's the most fstforces round on cf
•  » » 11 days ago, # ^ |   +1 no, but yes maybe in terms of a number of redcoders getting FSTs.
•  » » » 11 days ago, # ^ |   +1 ok, then which one?
•  » » » » 11 days ago, # ^ |   0 the second one, this maybe the most fstforces round on CF for red coders
•  » » » » 11 days ago, # ^ | ← Rev. 3 →   0 I gathered some statistic on this topic once (well, not exactly this, it was about hacks, but I suspect those with a lot of hacks should also have a lot of SFTs except for educational rounds )https://codeforces.com/blog/entry/83599
 » 11 days ago, # |   0 What does FST mean?
•  » » 11 days ago, # ^ |   +11 Failed System Tests
 » 11 days ago, # |   +5 TLE on 87th test case :( .Habour poor test case.
 » 11 days ago, # |   +9 This contest told me never locked the problem if you don't want to hack others. I knew why i was wrong when I was hacked by others, but I cannot make any submission anymore.
 » 11 days ago, # | ← Rev. 2 →   +37 score prediction after contest +69score prediction after system test -69
 » 11 days ago, # |   +1 (on test 18)such a big difference between system-testing on B vs E
 » 11 days ago, # |   -14 This was my first ever contest , can anyone help me how can I improve, how to practice and study ?
 » 11 days ago, # |   -23 lesson learnt, never participating in any harbor space contest again.
 » 11 days ago, # |   +19
 » 11 days ago, # | ← Rev. 2 →   0 This was my first contest and I have solved one question but my profile showing still unrated anyone can tell reason for it?
 » 11 days ago, # |   -36 Announce this round as unrated for too many controversy.
 » 11 days ago, # |   0 how is  cabad cabac  correct in problem B: Reverse String?
•  » » 11 days ago, # ^ |   0 the steps are 1 2 3 2 1
•  » » 11 days ago, # ^ |   +1 cca (Going right)cab (Going right)caba (Going left)cabac(Going right)
•  » » » 11 days ago, # ^ |   0 Thanks
 » 11 days ago, # |   +119 You have been warned.
•  » » 11 days ago, # ^ |   +8 Looks like a strong testcase for problem D. 1 <> weakpretests 
•  » » » 11 days ago, # ^ |   0 Almost certain it is not. You can check it by yourself if you want.The test
 » 11 days ago, # | ← Rev. 2 →   0 Does anybody know what was the problem in test 19 problem D?
•  » » 11 days ago, # ^ |   +3 That's a large test case, I don't know. But looking at your solution, what you're missing probably is that the position at which $t$ ends must be at even parity relative to the end of $s$.
•  » » » 11 days ago, # ^ |   0 hey can you debug my D code pls WA on test 18
•  » » » 11 days ago, # ^ |   +1 Ahhh... thanks, I missed that.
 » 11 days ago, # |   +25 Thanks for the contest! It was nice. Really enjoyed solving it!
 » 11 days ago, # |   0 What is wrong in this approach with problem D : every two adjacent letters in t should have even distance between them in s. so the path is even odd even odd ...... or odd even odd even odd even.
•  » » 11 days ago, # ^ |   0 there is no or. There is a single possibility. D was solvable by a single for. It was honestly ridiculous for a D.
•  » » » 11 days ago, # ^ |   0 It's a combined round, not ridiculous. In most Div1 + Div2 A-E is solvable by pretty much anyone >= 1700 rating, it's mostly based on observations.
•  » » 11 days ago, # ^ |   +1 take the index of the last character that you choose, call it pthe number of characters from p + 1 to the rest of the string has to be even
•  » » » 11 days ago, # ^ |   0 thanks
 » 11 days ago, # |   +46 So the solution to D which checks if $t$ is a subsequence of $s$ fails on the second testcase in the sample test and then on test $17$ if anybody is interested.
 » 11 days ago, # | ← Rev. 2 →   +1 I feel that D could have been worded better. "If you type the string s and press backspace instead of typing several characters of s."This made it seem like using at least one backspace was compulsory.
 » 11 days ago, # |   0 Why do I get So much downvote though I already wrote that I am newbie, you code masters treat a newbie this way to encourage them
 » 11 days ago, # |   +7 Can Anyone please explain Why This Solution is giving TLE when being run on GNUC++17(64) compiler and is getting accepted on being run on GNUC++17 Compiler only Link To Accepted Submission
 » 11 days ago, # |   +6 Poor contest. G is trash, don't understand why it is approved.
•  » » 11 days ago, # ^ |   +3 That and bad pretests on B and D. D was literally 10 lines of code that were basically nearly guessable as logic by pupils that hardly have any experience with such contests. B was probably in the end harder than C or D. Also, that left quite a big difference in difficulty between D and E.
•  » » » 11 days ago, # ^ | ← Rev. 2 →   0 There wasn't a gap between D and EIn fact, if you look at number of solvers and the fact that E is after D, E is barely more difficult at all
•  » » 11 days ago, # ^ |   +33 I'm curious--why do you dislike G? I think the weak pretests in this round are problematic, but I enjoyed solving G. The main observation (that the answer is at most two) was fairly nice and well-motivated, and my eventual solution was relatively concise. The authors could perhaps have done more to make the round as a whole less focused on speed and on avoiding FSTs, but I thought this problem itself was a fun one to solve.
•  » » » 11 days ago, # ^ |   +35 Quite straight forward, the idea is trivial, I can solve immediately after reading it.
•  » » 11 days ago, # ^ |   +45 I agree that G is simple and one can come up with a solution in a few minutes (which is bad if you then need to code for 10-15 minutes). That wasn't the case for many testers and organizers though. The number of ACs confirms that the difficulty was fine.Even though I was very involved in preparing this problem, I think it's the worst one out of E-I. EFHI are good problems.Also, I think that this contest would be much more enjoyable for div1 without the first few problems. I stated many times that combined rounds are bad. What about using just D-I or E-I, maybe with problem G replaced with something more interesting.
•  » » » 11 days ago, # ^ |   +41 Combined rounds are bad but contests with prizes can't be split into divisions.
 » 11 days ago, # |   0 Wrote a recursive solution for D, but got run time error on pretest 4, pretty sure it is recursion limit exceeded error. Here is the solution if anybody is interested: https://codeforces.com/contest/1553/submission/123341608
 » 11 days ago, # |   +116 To not keep you waiting, the ratings are updated preliminarily. In a few hours/days, I will remove cheaters and update the ratings again!
•  » » 11 days ago, # ^ |   0 Thanks.
•  » » 11 days ago, # ^ |   0 thank you orz
 » 11 days ago, # |   +6 If cf-predictor is correct, We will see Benq on top replacing tourist. Spoiler... For the first time in my case.
•  » » 11 days ago, # ^ |   +14 How does that matter to you?
•  » » » 11 days ago, # ^ |   +8 At least he/she didn't tag Benq and tourist.
 » 11 days ago, # |   0 say hello to weak pretests on D
 » 11 days ago, # |   0 what's TC 19 in problem D ?
•  » » 11 days ago, # ^ |