### interlude's blog

By interlude, history, 12 months ago,

Hello Codeforces!

CQXYM and I are glad to invite you to Codeforces Round #745 (Div. 1) and Codeforces Round #745 (Div. 2), which will be held on Sep/30/2021 13:15 (Moscow time). Note the unusual time of the round.

Each division will have 6 problems and 2 hours to solve them. All problems were written and prepared by CQXYM and me. The round will be rated for both divisions.

We would like to thank:

This is our first round, and great efforts have been put into preparing this round. Were you to kindly participate in this round, we would be very grateful and hope you will enjoy it.

Good luck!

UPD: Here are the scoring distributions:

Div. 1: $500$ — $1000$ — $1750$ — $2000$ — $3500$ — $3500$

Div. 2: $500$ — $1000$ — $1500$ — $1750$ — $2500$ — $2750$

And we would also like to thank Um_nik for testing the round.

UPD2: Editorial is out!

UPD3:

## Winners

Congratulations to the winners:

Div1:

Div2:

• -1232

 » 12 months ago, # | ← Rev. 2 →   -155 As a tester I would encourage you to participate in this round and assure you that the problems are interesting and good .Update :- My review to testers
•  » » 12 months ago, # ^ |   0 Thanks.
•  » » 12 months ago, # ^ |   +195 As a participant I will never trust your word again :D
•  » » » 12 months ago, # ^ |   +122 As a Chinese participant I will never participate in Chinese rounds again :D
•  » » 12 months ago, # ^ |   +49 my face after reading problem A :
•  » » » 12 months ago, # ^ |   +13 You should use a spoiler
•  » » 12 months ago, # ^ |   -6 So u really Trolled us!.
•  » » 12 months ago, # ^ |   +46 it is surely the worst contest I have taken part in
•  » » 12 months ago, # ^ |   +6 You were wrong
•  » » 12 months ago, # ^ | ← Rev. 2 →   +19 Here is my review I gave to problem setters . Name is blurred due to security reasons .review
•  » » » 12 months ago, # ^ |   +27 Then you shouldn't have said all all these things (your comment)in the first place !
•  » » » 12 months ago, # ^ | ← Rev. 5 →   +5 your review is good.problem B has too many situations and what makes it worse is K (Diameter) might be negative.and presets weren't sufficient to show wrongs during contest time (intended).
•  » » 12 months ago, # ^ |   0 wtf???forces
 » 12 months ago, # |   +27 Here it is!
 » 12 months ago, # |   -57 Mathforces?
•  » » 12 months ago, # ^ |   -73 Mathforces!
•  » » » 12 months ago, # ^ |   +25 It was FSTforces!
•  » » 12 months ago, # ^ |   +54 Sorry but I don't understand.
•  » » » 12 months ago, # ^ |   -59 Just asking
•  » » » 12 months ago, # ^ | ← Rev. 2 →   +75 I think he might be implying that cf contests prepared by Chinese authors tend to have more math problems. :)
•  » » 12 months ago, # ^ |   -16 totally agree after reading 1st problem.
•  » » 12 months ago, # ^ |   +40 20k+ users registered and only around 3500 submissions, weird...
•  » » » 12 months ago, # ^ |   +25 They didnt have noticed the unusual time
•  » » 12 months ago, # ^ |   +6 You were so ******* right my guy. Damn
•  » » 12 months ago, # ^ |   0 Hardforces!
 » 12 months ago, # | ← Rev. 2 →   +40 Another Chinese round and friendly time for Chinese! Looking forward to great problems and having fun!
 » 12 months ago, # |   -61 Sad, why isn't Monogon a VIP tester :(
•  » » 12 months ago, # ^ |   +170 I'm only moderately important this time.
•  » » 12 months ago, # ^ |   -81 What? 1-gon's comment didn't hit 100 upvotes in a day?? Impossible!)
 » 12 months ago, # |   +3 This time is good for me.Orz CQXYM!
•  » » 12 months ago, # ^ |   -31 Orz,2000 scores for a round!
•  » » » 12 months ago, # ^ |   -25 Orz purple Hearth
•  » » 12 months ago, # ^ |   -29 Orz zqs!
 » 12 months ago, # | ← Rev. 2 →   -58 Second Shortest announcement after Tourist's Round announcement Since I started using CF.
 » 12 months ago, # |   -50 Bit manipulation problems?
 » 12 months ago, # |   +6 I hope.
 » 12 months ago, # |   +65 I don't have anything against Chinese rounds, but... really, morning on a weekday?
•  » » 12 months ago, # ^ |   +154 Probably people in different time zones exist.
•  » » » 12 months ago, # ^ |   +95 That's why Saturdays exist.
•  » » » » 12 months ago, # ^ |   +99 ICPC World Finals I guess.
•  » » 12 months ago, # ^ |   +30 In China it is 6:05p.m. on the day before the National Day holiday. You can imagine the experience of participating a CF round after school :)
•  » » » 12 months ago, # ^ |   +3 But (maybe?) most middle school students have to stay at school and study at night.
•  » » » » 12 months ago, # ^ |   +9 It often happens on weekdays. But if tomorrow is holiday, students can go back home in the afternoon.
•  » » 12 months ago, # ^ |   +23 I think that it's because the National Day holiday in China is coming.However authors don't know 6 p.m. is even worse than 10 p.m. for many Chinese because most of schools end at 9 :(
•  » » » 12 months ago, # ^ |   -34 However we must take the fact that ICPC World Final will be held today into consideration. Thus we choose 6 p.m. over 9 p.m.
 » 12 months ago, # | ← Rev. 2 →   +7 Rare time....but maybe just right for Chinese contestants like me. I'm a little EXCITED. Hope all of us can enjoy it!
 » 12 months ago, # |   +21 I finnish school 5 minutes before the round, can't join, but I wish those who read the greatest of luck.
•  » » 12 months ago, # ^ |   +71 I managed to convince the teacher to let me compete at school.
 » 12 months ago, # |   +3 Big thanks for the time of the round from Asia! :)
 » 12 months ago, # |   +12 Great, 3:05 AM.
•  » » 12 months ago, # ^ |   0 i guess that's an i for an i for us having to participate from 10:30pm to almost 1am before...
 » 12 months ago, # |   +27 interlude I think we need to update this blog to make this appear on top of the div.3 contest. Many people might not see it. Especially the unusual start time of the round. I didn't see this blog existed. Because the first post from the top was round 744. thanks for considering. :) good luck to the people who are participating.
 » 12 months ago, # |   +72 lighthearted meme
•  » » 12 months ago, # ^ | ← Rev. 3 →   -15 .
•  » » 12 months ago, # ^ |   -18 Hahahahhahahhahaa!!!Although no, it's not funny. You idiot.
•  » » » 12 months ago, # ^ |   +3 You High on Weed . :) __ | | | | | | | | ( | | | | )Hope you Understand my feeling.
•  » » » 12 months ago, # ^ |   -10 That's not a good idea to play jokes like this on the Internet. We can sure that there was something wrong with the education you get from your parents.
•  » » » » 12 months ago, # ^ |   -15 заткнись телочка.еще что-то скажешь про моих родителей, зубы выбью тебе, тварь.
•  » » 12 months ago, # ^ |   +66 Meanwhile me
•  » » » 12 months ago, # ^ | ← Rev. 2 →   -26 Hahahahhahahhahaa!!!Although no, it's not funny. You idiot.
•  » » » » 12 months ago, # ^ |   -27 Hahahahhahahhahaa!!!Although no, it's not funny. You idiot.
•  » » » » » 12 months ago, # ^ |   -26 Hahahahhahahhahaa!!!Although no, it's not funny. You idiot.
•  » » » » » » 12 months ago, # ^ |   +4 let me stop you guys :)
•  » » » » » » 12 months ago, # ^ |   0 break XD;
•  » » » 12 months ago, # ^ |   +10 Imagine having school online, and not offline
•  » » 12 months ago, # ^ |   +31 Me:
•  » » » 12 months ago, # ^ |   +1 Now that the contest is over, are you happy with your decision?
•  » » » » 12 months ago, # ^ |   +3 i guess yes as he got a very good rank in this one
•  » » 12 months ago, # ^ |   +11 I have a test in my class today that completely overlaps with the contest timings. Cant skip them even if I want to :sobb:
 » 12 months ago, # |   +6 Another great round!! Hope I can do better than before in it.
 » 12 months ago, # |   0 Hi there. Could the contest be at 18.35?
•  » » 12 months ago, # ^ |   +3 The round authors are Chinese; I assume starting at 22:35 is not comfortable to them.
•  » » » 12 months ago, # ^ |   +15 Oh, I am sorry I didn't think that. Thanks.
 » 12 months ago, # |   +6 Hoping to become Pupil after this round...Best of Luck everyone!!
•  » » 12 months ago, # ^ |   +8 you did it! Congrats :D
•  » » » 12 months ago, # ^ |   0 Thanks a lot!!!!
 » 12 months ago, # |   +5 As a Chinese,I usually leave school at 6:30 PM,so I cannot enjoy this round :(
•  » » 12 months ago, # ^ |   +11 Leave school, but don't leave a contest. (Don't take it seriously.)
•  » » 12 months ago, # ^ |   +10 And now I think I am lucky :D.
 » 12 months ago, # |   -26 i do remember that one of the past contest nearly at the same time as of this one and it went bad ...........
 » 12 months ago, # | ← Rev. 2 →   -19 Can you somehow postpone the competition for 2 — 3 hours? I think it would be more convenient to write everything in the evening than in the afternoon. usually the competitions are held at 17:30 Moscow time and this is very convenient.
 » 12 months ago, # |   0 Is 1900-2100 no longer in Div 2?
•  » » 12 months ago, # ^ |   +5 People rated <2100 can participate in div2, when it is div2Only round(so no parallel div1), but when there is a parallel div1 round, 1900+ have to participate there. It has been like this for a long time
•  » » » 12 months ago, # ^ |   0 Oh! I see
 » 12 months ago, # |   -51 A way to increase contribution from 0 to 100:0-20: leave stupid comments20-40: write a blog on how to increase contribution from 0 to 2040-60: write a blog on how to increase contribution from 20 to 4060-80: write a blog on how to increase contribution from 40 to 6080-100: write a blog on how to increase contribution from 60 to 80
•  » » 12 months ago, # ^ |   -9 A way to increase contribution from 0 to 126:0-126: leave stupid comments
•  » » » 12 months ago, # ^ |   +7 that leads in either ways UP or DOWN (+126 || -126)
 » 12 months ago, # |   -9 Big thanks for the friendly time of the round:)
•  » » 12 months ago, # ^ |   0 Actually, 9 p.m. is better than 6 p.m. for Chinese students.
 » 12 months ago, # |   0 Starting My Codeforces Journey From your round...Hope to have my first giving round and your first making round great!Thank you
 » 12 months ago, # |   +1 My first div2 round here. Hopefully it doesnt go downhill. fingers crossed. I like this time slot :)
•  » » 12 months ago, # ^ |   +3 This ages very well
 » 12 months ago, # |   0 All the best to all the participants. :))
 » 12 months ago, # | ← Rev. 2 →   +2 From contest authors and testers, I'm waiting really good contest!
 » 12 months ago, # |   -118 Greeting all chinese people!
•  » » 12 months ago, # ^ | ← Rev. 3 →   -27 Idk what's up with everyone, so retracting it for the better!
•  » » 12 months ago, # ^ |   +38 I think the content you posted is not appropriate, because we all know that the Great Firewall in Mainland China blocks almost all "user-generated content" websites, and codeforces as a "user-generated content website" is not blocked by it because There is very little political content on codeforces. If you post more content in this area, the result is likely to be that codeforces is blocked by the Great Firewall of China. As a result, it will cause great inconvenience to users in mainland China. They need to cross the Great Firewall to access codeforces.
•  » » » 12 months ago, # ^ |   -14 Good.
•  » » » 12 months ago, # ^ | ← Rev. 2 →   -87 However, according to some netizens in the QQ group Universal OJ Users, almost everyone in China mainland who use Codeforces can across the Great FirewallBut anyway, I don't think any political content posted on codeforces is appropirate because codeforces is a website for people who love programming. I think whether it will make codeforces blocked or not it's not good to post content which is not about algorithms on codeforces
•  » » » 12 months ago, # ^ | ← Rev. 2 →   -121 Although I heard some netizens say, and I also think whether Codeforces is blocked or not doesn't matter to many codeforces users, I think after all using websites not blocked is more convenient.
•  » » 12 months ago, # ^ |   +72 Lol, this is pretty good, don't know why it's being downvoted
 » 12 months ago, # |   0 can anyone tell me what is the process of penalty in DIV 2 round
•  » » 12 months ago, # ^ |   +5 Technically, there are no 'penalties' on time count. But yes, you get less points if you solve a problem after incorrect attempts.Each problem is assigned points (e.g., Problem A in this round is 500), the faster you solve a problem, the more points you get. The amount of points you can achieve gradually decreases over time.Problem A points deteriorates at a rate of 2 points per minute (you get 498 points if you solve after 1 minute, 496 points if you solve after 2 minutes, 494 points if you solve after 3 minutes and so on)Plus, every incorrect attempt costs you 50 points. Now let's see, if you solve that problem A after 10 minutes on your 2nd attempt, you get (500) - (10*2) for 10 minutes to solve - (50) for one incorrect attempt = 430.If you solve that problem A after 15 minutes on your 3rd attempt, you get (500) - (15*2) for 15 minutes to solve - (50*2) for two incorrect attempt = 370.Additionally, the minimum points you get on any problem is lower bounded by 30% of the max points on that particular problem. e.g., irrelevant of how many incorrect attempts or how much time, you will get a minimum of 500 * 30% = 150 for that problem A.
 » 12 months ago, # | ← Rev. 2 →   +26 Round delayed by 10 minutes
•  » » 12 months ago, # ^ | ← Rev. 2 →   -13 10 mins delay for my first contest...Bad vibes
 » 12 months ago, # | ← Rev. 5 →   0 deleted...
 » 12 months ago, # | ← Rev. 2 →   0 Time added 10 minutes!
 » 12 months ago, # |   0 contest extended by 10 min!
•  » » 12 months ago, # ^ |   0 does it change anything?
 » 12 months ago, # |   +4 Why this sudden addition of ten minutes in starting the round??
•  » » 12 months ago, # ^ |   0 may be due to some technical issues
•  » » 12 months ago, # ^ |   0 To reach 20K+ participations maybe.
 » 12 months ago, # |   +69 Hopefully the delay doesn't signify an unrated round.
 » 12 months ago, # |   +87 now what to do with 10 min of my life??
•  » » 12 months ago, # ^ |   +98 Think about what to do with 10 min of life
•  » » » 12 months ago, # ^ |   -18 Listening to your words is just like listening to your words lol
•  » » » 12 months ago, # ^ |   0 Listen to your words, so I heard your words
•  » » 12 months ago, # ^ | ← Rev. 2 →   0
 » 12 months ago, # |   -8 how many point i need to join to div 1 ???
•  » » 12 months ago, # ^ |   +1 1900 and above
•  » » 12 months ago, # ^ |   0 1900
 » 12 months ago, # | ← Rev. 3 →   +14 I hope it'll be the only problem of the contest.Wish all the best!!!P.S. The "problem" here doesn't mean the problems that we're going to solve in the contest.
 » 12 months ago, # |   +90 This doesn't really matter, but why would you use "obsidian" instead of "black"?
•  » » 12 months ago, # ^ |   +42 Minecraft
•  » » 12 months ago, # ^ |   +42 Because author wanted to complicate the problem statement without any reason.
 » 12 months ago, # | ← Rev. 4 →   +190 If you can't write a nice problemset for cf, just move the problemset to other websites.Terrible contest.edit: Chinese slang
•  » » 12 months ago, # ^ |   -15 ?______?
•  » » » 12 months ago, # ^ |   0 It means he hates the idea provider due to hard problems, but it may be Chinese slang that is very disruptive and not appropriate to show in public.
 » 12 months ago, # |   +31 First time not being able to solve (or not wanting to implement such an ugly solution for) even the first problem. Might just be me, but I think this contest needed a lot more tuning.
•  » » 12 months ago, # ^ | ← Rev. 2 →   -49 Thought it was one of best contests I competed in, besides B and C out of order. Finally some actual implementation and more ideas than just greedy/math with one for loop required...If you can't solve a 30 line solution due to implementation I'm not sure you should be in div1. I've long said there is severe lack of implementation skill for most low div1 users and below.
 » 12 months ago, # |   +14 Hardforces (: (at least for me )
 » 12 months ago, # |   +13 Coding is very hard
 » 12 months ago, # |   +21 div.1 too hard for me :(
 » 12 months ago, # |   +154 Why would you write statement like this: "and the diameter of the graph must be less than $k-1$?"Couldn't you write "diameter of the graph must be less than $k$"?Or even better, "diameter of the graph must be less than or equal to $k$?
•  » » 12 months ago, # ^ |   +13 For real, my code was so messed up I had to rewrite because I got confused in the middle.
 » 12 months ago, # | ← Rev. 5 →   +27 I'm sorry but i am happy because today it's not only me who can't solve a single problem.
 » 12 months ago, # |   +90 How to unregister?
 » 12 months ago, # |   +18 Not my cup of tea...
 » 12 months ago, # |   +13 Damn bro you didn't have to kill us with those problem statements!
 » 12 months ago, # |   +12 Man!! explain me the problems. Cant understand anything from the statements
 » 12 months ago, # |   +7 its my 2nd chinese round and i find it harder the usual div2 coz i can solve avg 2 problem but in this round i can't do even A. Chinese loves maths too much ≧ ﹏ ≦
 » 12 months ago, # |   +7 only 3.7k submissions to problem A, btw WAonpretest2forces :(
 » 12 months ago, # |   +72 At least I'm not alone, here we are :')
•  » » 12 months ago, # ^ |   +1 Getting demoralized when not able to solve any problem.then coming to comments-->turns out to be a natural therapy
 » 12 months ago, # |   0 Not even able to solve one quest, very tough round.but atleast doing no submission won't affect my rating ^-^
•  » » 12 months ago, # ^ |   0 I thought if you presented, no matter have you submit or no, It will affect your rating?
 » 12 months ago, # |   +3 The wording of some of the problems are hard to understand :(
 » 12 months ago, # | ← Rev. 3 →   -8 Bruh, I don't even feel like trying C cause pretty sure it's beyond my capabilities. Spoiler**GUESSFORCES**
 » 12 months ago, # | ← Rev. 2 →   +8 In the last 12 rounds held over the past 3-4 months, this is the only round where I had to spend ~10 minutes on both A and B just to be able to interpret properly what the question wants to say, never mind attempt to solve them. Statements were weirdly put, and maybe difficulty wasn't properly calibrated going by the meagre amount of submissions ~4k for div2 A even after an hour.
 » 12 months ago, # |   0 statement of div2 c is beyond my scope :')
 » 12 months ago, # |   0 one silly mistake costed 4 penalties on problem B :(
•  » » 12 months ago, # ^ |   0 Same :(
 » 12 months ago, # |   +398 Thanks a lot for clarifying this, before the round I was worried that my solution might also be tested on a negative number of test cases.
 » 12 months ago, # |   0 I am even not able to solve B this time, my brain exploded thinking of it :(
•  » » 12 months ago, # ^ |   +3 I am not even able to solve A :/
 » 12 months ago, # |   +155 A flaw in the rating system exposed brutally by this round: in div 1, those who do manage to solve A, but do so late and/or with penalty attempts, will see their rating fall significantly, while those who bail out completely on solving A will see no change to their rating.
•  » » 12 months ago, # ^ |   +73 that's why A should always be comparatively easy in both divisions, can you imagine less than 6k participation in div2 :(
•  » » » 12 months ago, # ^ |   +45 100% agree
 » 12 months ago, # |   0 Me on this contest be like:Click this
 » 12 months ago, # |   +27 Damn, That's the hardest A and C I've ever seen
•  » » 12 months ago, # ^ |   +3 For me B Totaly was pain in ass!
 » 12 months ago, # | ← Rev. 2 →   +1 HardForces :(UPD: Sad, Got FST on Div.2 B :(
 » 12 months ago, # |   0 Today I will get -101 rating change :(
 » 12 months ago, # |   +5 Its really good, but is so hard:(
 » 12 months ago, # |   +4 20000 registers 6000 contestants hmmm makes sense
 » 12 months ago, # | ← Rev. 2 →   +15 Didn't participate in a Div. 0 before, but today i did.
 » 12 months ago, # |   0 I Just guessed the solution for A after 1hr 20 mins of waste analysis and it worked :/ and then solved B under 30 mins , strange round
 » 12 months ago, # |   0 Damn, couldn't even solve A.This contest really was amazing!
 » 12 months ago, # |   +16 Is O(N^3) the intended solution for Div1 A or are you expecting O(N^2)?
•  » » 12 months ago, # ^ |   +3 $O(N^3)$.
•  » » » 12 months ago, # ^ | ← Rev. 2 →   +20 Amazing. I had an O(N^3) time with O(N^3) space initially which got MLE.Optimized it to O(N^3) time with O(N^2) memory and still got TLE. Tried optimizing it further and got WA. What a waste of 2 hours for me.
•  » » » » 12 months ago, # ^ |   +3 I solved it O(N^3 * 16) it gave me TLE but i break when i find solution with value greater than 16 and passed the pretests
•  » » » » 12 months ago, # ^ |   +25 Atleast you were writing codes. I was just crying for 2 hrs T_T
•  » » 12 months ago, # ^ |   0 Yes, my O(n^3) passed
•  » » 12 months ago, # ^ |   0 I think O(n^3)
 » 12 months ago, # |   +5 Are the CF div2 rounds are getting harder or me getting dumber?
•  » » 12 months ago, # ^ |   +19 You just happened to be in the wrong contest at the wrong time
•  » » 12 months ago, # ^ | ← Rev. 2 →   0 I am trying again on CF after spending a long time on Leetcode and DSA style problems. I am thinking to quit. It feels like a waste of time now but I am interested too lol. I don't know. I can spend this time on learning other skills like more backend. Will maybe just try to solve some harder problems for my range in the next few days.
 » 12 months ago, # |   +16 A contest with really high difficulty...
 » 12 months ago, # | ← Rev. 2 →   +3 So is there anyone tell me how to solve Div.1A/Div.2C. I got WA on pretest 18 :(
•  » » 12 months ago, # ^ |   +13 You can discover the property that the answer will not be more than 16. and just do it in brute force. it will be O(n * m * 16 * 16). Hint : try to use the number larger than 16, maybe 17.
•  » » » 12 months ago, # ^ |   0 I found that but failed to have further a further thought. Could you please tell me what the (16 * 16) is?
•  » » 12 months ago, # ^ |   0 You are just checking min answer for the 5x4 matrix. But there may be test cases like 8x8 size 01111110 10000001 10000001 10000001 10000001 10000001 10000001 11111110 In this case, the answer is 0. But according to your approach, the answer will come to more than zero.
 » 12 months ago, # |   +7 Any O(nlogn) solution for Div1C/Div2E? I only came up with sqrt decomposition XD
•  » » 12 months ago, # ^ |   0 wasn't time limit a little too tight for sqrt decomp? :(
•  » » » 12 months ago, # ^ |   +8 O(nsqrt(nlogn)) should work for n=100k.Example: 1540D - Inverse Inversions
•  » » » » 12 months ago, # ^ |   0 It has 5 sec limit. 1 sec limit kept me under the impression that nsqrt(n) is being punished here. anyways my fault :(
•  » » » » 12 months ago, # ^ |   0 Not in this task, not with 1 second time limit, IMO. 1.5 seconds would probably be enough.
•  » » » 12 months ago, # ^ |   +10 I passed system tests with $O(n\cdot \sqrt{n}\cdot \log{n})$.I used a fenwick tree for big values of $x[i]+y[i]$ instead of just maintaining when to add or subtract something.
•  » » » » 12 months ago, # ^ |   +10 Weak systests :/ But I see that this solution was already hacked after contest. My solution with FT was a bit too slow too.
•  » » 12 months ago, # ^ |   -84 I can only come up with $O(n\sqrt{n})$ solution too.
•  » » 12 months ago, # ^ |   +26 The TL may be a bit tight for O(N sqrt(N))
•  » » » 12 months ago, # ^ |   -126 In fact the constant of the solution is very small. I think even $O(n\sqrt{n}log_n)$ solution can also pass.
•  » » » » 12 months ago, # ^ |   +16 And O(n^5) can pass B with some optimization...
•  » » » » » 12 months ago, # ^ |   -130 $O(n^5)$ is the expected complexity.In fact you will find the constant is extreme small. A lot of state is useless.
•  » » » » » » 12 months ago, # ^ |   +36 That's really unexpected.. I thought author may have come up with something smarter to get $O(n^4)$ solution and set $n=100$ to cut $O(n^5)$ one..
•  » » » » » » » 12 months ago, # ^ |   -6 In fact there do have a solution works in $O(n^3log^2n)$, but it's too difficult for D1B.
•  » » » » » » 12 months ago, # ^ |   +146 Well, that's surprising. Why didn't you set $n \leq 50$? It would be much easier to understand that the solution is fast enough and it's worth coding. Was it that important to fail $O(n^6)$ solution?
•  » » » » » » » 12 months ago, # ^ |   +20 Um_nik played these games.
•  » » » » » » » 12 months ago, # ^ |   -65 Sorry but I didn't come up with any $O(n^6)$ solution.
•  » » » » » » » » 12 months ago, # ^ |   +107 Then my question remains: why $n \leq 100$? Only to make some people not implement a correct solution?
•  » » » » » » » » » 12 months ago, # ^ |   -8 "In fact the constant of the solution is very small." -interlude
•  » » » » » » » » » 12 months ago, # ^ |   +18 I understand that the solution is fast enough. It would still be with $n \leq 50$. And this fact would be clear before implementing.
•  » » » » » » » » » 12 months ago, # ^ |   +18 Just because the $O(n^5)$ solution can pass the task and it runs very fast. In fact you will find that the answer will be 0 if $m,k$ is larger than $\frac{n}{2}$.
•  » » » » » » » » » 12 months ago, # ^ |   +45 Not always, my $O(n^5)$ solution got TL.
•  » » » » » » 12 months ago, # ^ |   +38 Are u serious? Only because of this, I didn't code the solution and thought for an O(n^4) solution for almost 1.5 hrs. And the constant isn't that small, recursion won't pass easily without optimizations (returning wherever you can).
•  » » » » 12 months ago, # ^ |   +16 However my O(N sqrt(N)) solution didn't pass.
•  » » » 12 months ago, # ^ |   +5 I failed on both BC for TL
•  » » » » 12 months ago, # ^ |   0 I think your solution for C is slow because of "cin and cout" .
•  » » » » » 12 months ago, # ^ |   +3 I'm sorry but as a matter of fact,coder's submission has got another TL after replace cin/cout with faster IO streams. Isn't it obvious that this failure it due to implementing or Time Limit but not IO ways?
•  » » » » » 12 months ago, # ^ |   0 You are right..my bad
•  » » 12 months ago, # ^ |   0 O(nsqrt(n)), you can operate trains whose x+y>=sqrt(n) and whose x+y
 » 12 months ago, # |   +1 Perfect! Problems are challengable and of benifits. especially C, its great on both Thinking and Realization. All in all, great round.
 » 12 months ago, # |   +2 Ooh man! one of the toughest A in div 2!!!
•  » » 12 months ago, # ^ |   +5 maybe you can just look at sample test cases to find the pattern without thinking much or proving anything . At least that's what I did XD
•  » » » 12 months ago, # ^ |   0 I figured it out with PnC but still I would say it shouldn't have had been an A problem, maybe B or B1 if possible!
•  » » 12 months ago, # ^ |   0 The hardest ever
 » 12 months ago, # | ← Rev. 2 →   +46 So difficult.UPD : also fstforces.
 » 12 months ago, # |   +48 Why is the diameter of the graph given as <=k-1, why not <=k ?
•  » » 12 months ago, # ^ |   +32 It's < k-1, My guess is just to add more confusion.it's like let's make the contest very hard and confusing for the people who decided to participate at 3 AM as they already have a brain fog at this time :D
 » 12 months ago, # |   +6 Am I the only one who has a bad feeling about system tests?
 » 12 months ago, # |   +40 Well at least the judge queue will be short lol
 » 12 months ago, # | ← Rev. 3 →   +20 Please, if you will write a round again in the future think about the quality of statements twice before. Some things were not very clear, like in div2 B where you should have specified strictly less, as you did while the round was going. Also, talking about B, it wouldn't be a bad idea to also write in bold important words, not just numbers and variables(here I'm talking about the word CONNECTED); you can see in other past problems that this is sometimes done, especially for important conditions like the connectivity one in B(for example for saying that all the numbers in an array need to be different). One last thing about this problem would be the limits for k, like were those special cases of k <= 1 really that important to be placed in the tests, ore are they even in the tests?
•  » » 12 months ago, # ^ |   +9 I am really confused why the diameter of the graph must be strictly less than k−1. other than k, it causes unnecessary confusion.
 » 12 months ago, # |   0 hardforce
•  » » 12 months ago, # ^ |   0 don't worry, system_fail_forces also coming soon.
 » 12 months ago, # |   0 Couldnt solve anything. PS: Writing bruteforce and searching on OEIS is not "solving".
 » 12 months ago, # |   +11 I feel like today's contest is suitable for Div 1.5 and Div 0.5
 » 12 months ago, # |   +25 The round had nice problems (I read only div1A-C tho), though ridiculously hard. Could've easily been split into two separate div1 rounds with some easier, filler problems. I want to express my deepest sympathy to all div2 participants, who had those super tough problems given as C-E. Div1A should've been div2E IMO. To the authors, you did very good job with inventing interesting problems. Only that you underestimated their hardness and the overall contest turned out too hard.
•  » » 12 months ago, # ^ |   +14 That is the job of coordinators and testers but I don't know how can they all agree to serve all these problems together.
 » 12 months ago, # |   +1 Some solutions for Div2 B will fail for this test: n = 1, m = 0, k = 1
•  » » 12 months ago, # ^ |   0 is it NO ?
•  » » » 12 months ago, # ^ |   0 Yeah, some solutions didn't consider that the given diameter could be negative as well.
•  » » » » 12 months ago, # ^ |   0 In first sample he told u diameter of the graph is zero, its obv. not strictly less than 0
•  » » » » 12 months ago, # ^ |   +6 Although I honestly don't see why the authors would want to make k start from 0 and not 1.
•  » » » » 12 months ago, # ^ |   0 I felt,The definition of diameter is valid only when there are atleast 2 vertices. Is this assumption wrong?
•  » » » 12 months ago, # ^ |   0 Yes. The Answer will be NO
•  » » 12 months ago, # ^ | ← Rev. 3 →   0 YES
 » 12 months ago, # |   0 Honestly how to iterate on this map in c++ for Div1 C ? map[(xi + yi)][day % (xi + yi)][xi].push_back({st_j, end_j}) Plus is it really the solution ?
•  » » 12 months ago, # ^ |   -14 Just use map.insert.The solution is about O(n sqrt m)
 » 12 months ago, # |   -14 Maybe the pretest is too weak?
 » 12 months ago, # |   +6 system testing is super fast today!
 » 12 months ago, # |   +31 Despite so many testers spanning across different ratings, a pretty unbalanced round.
 » 12 months ago, # |   +3 Saw a pattern in the ans of A for n = 2 , half of the total-permutations and it actually worked for larger n
 » 12 months ago, # |   +10 You could bold "connected" in B :/
 » 12 months ago, # |   0 k = 0 on problem B. Damn you guys got me!!!
 » 12 months ago, # |   +7 Awesome difficulty Forces+FST Forces = Codeforces Round #745
 » 12 months ago, # |   0 system testing gotta go fast
 » 12 months ago, # |   +50 Did someone mistakenly swap B and C?
•  » » 12 months ago, # ^ |   -44 Before the contest I thought B is easier but it turns out that I was wrong.
 » 12 months ago, # |   +18 Who actually proved their solutions for A lol
•  » » 12 months ago, # ^ |   0 lol haha lmao . rofl . so funny .
•  » » 12 months ago, # ^ |   0 Not me lol
•  » » 12 months ago, # ^ |   +7 I thought of something like, if a permutation is valid, it's reverse is always invalid. So half would be valid and half invalid
•  » » 12 months ago, # ^ |   +9 Proof by symmetry is valid, and very simple.
•  » » 12 months ago, # ^ | ← Rev. 2 →   +8 I think you can make a one-to-one mapping from valid permutations to invalid ones; let's say you want to count permutations which have exactly $n$ indices such that $p[i]p[i+1]$ (note that we don't have any repeated numbers, so this condition is the exact opposite of the one we consider valid.) Let's assume $\Pi(i)$ is the count of all permutations that have $i$ consecutive increasing pairs, and $\neg\Pi(i)$ the same for decreasing pairs; we know a pair is either increasing or decreasing; so we have: $\Pi(i)=\neg\Pi(2n-1-i)$; so we have: $\neg\Pi(i)=\Pi(2n-1-i)$; therefore, we have $\sum_{i=0}^{n-1}\Pi(i)=\sum_{i=n}^{2n-i}\Pi(i)$; I think by now you can see why $\frac{n!}{2}$ works in this problem.
 » 12 months ago, # |   +4 What is test 4 for problem Div2B ?
•  » » 12 months ago, # ^ |   0 I'm crying
 » 12 months ago, # |   +3 I came up with a (n^2)m solution for Div1 A but it gave TLE. Is there a more efficient solution?
•  » » 12 months ago, # ^ |   0 I also have this exact complexity and it passed. I used only vectors and pairs, maybe you used some more complex data structures?
•  » » » 12 months ago, # ^ |   0 Hmm. Seems like the constraints were tight. I see many solutions giving TLE in the system test.
•  » » » » 12 months ago, # ^ |   0 Agreed, If the intended solution was O(n*n*m) it's just sad.
•  » » » » 12 months ago, # ^ |   0 yep. FST for $O(n^2 m)$130355128
•  » » » » » 12 months ago, # ^ |   0 update: constant optimization (using tuple instead of vector) passed with 139ms.130386010
 » 12 months ago, # |   0 But it actually feels good to see a tough round now and then.
 » 12 months ago, # |   0 How to solve Problem C ?
 » 12 months ago, # |   +8 hardforces + clumsyforces + (1.5 + 0.5 ) forces +system test fail forces + ....
•  » » 12 months ago, # ^ |   0 so, bad round. lol
 » 12 months ago, # |   0 It is so reassuring to see that the problems were hard for everyone! Nevertheless, they were also really engaging.
 » 12 months ago, # |   +16 important rule : don't join chinese contest LOL
 » 12 months ago, # |   -17 FSTForces :(
 » 12 months ago, # |   0 shitty contest
 » 12 months ago, # | ← Rev. 2 →   +3 I think the pretest in Div 2 B could have been a little better. Other than that, contest had really interesting problems, except C. I didn't like C, as the only solution that I thought of was implementation heavy, so I simply skipped it and moved ahead. E was good. Just missed the window for submission.
 » 12 months ago, # |   +3 Annoucement-cum-Hardforces
 » 12 months ago, # |   -12 everything in this contest was bad. even the problems.
 » 12 months ago, # |   +8 Is it possible to solve Div1B faster than $O(n^5)$?
•  » » 12 months ago, # ^ |   -67 With 2D FFT we can solve it in $O(n^3log^2n)$.
•  » » » 12 months ago, # ^ |   +8 I wondered if it's possible during the round. Nice :|
•  » » » 12 months ago, # ^ |   +35 How? Don't you need division for that?
•  » » » » 12 months ago, # ^ | ← Rev. 6 →   0 let dp[ k ][ i ][ j ] denote number of sequences of length i that have exactly j elements with k maximums (e.g. as in the number of maximums in the process defined in statement, e.g. the variable m). Then dp[ k ][ i ][ j ] is the sum over all i1 , i2, j1 , j2 , such that i1 + i2 == i-1 , j1 + j2 == j of ((i-1 choose i1) * dp[k-1][i1][j1] ) * dp[k-1][i2][j2]. This thing can be done with 2d FFT. E.g. we are fixing the position of the maximum element. Edit: right, the modulo isnt guaranteed to be prime, not too sure.
•  » » » » » 12 months ago, # ^ |   -12 No, its wrong.
•  » » » » » 12 months ago, # ^ | ← Rev. 4 →   0 1) it should be i1+i2=i-1, though that's pretty easy to handle 2) you forgot an (i-1 choose i1) factor, which requires dividing by i! before the convolution.
•  » » » » » » 12 months ago, # ^ |   0 ohh right
•  » » » » » » 12 months ago, # ^ | ← Rev. 2 →   0 I am not too sure i understand part 2). Do you mean calculation of (i-1 choose i1) mod p needs division ? If so, we can pre calculate that with pascal's triangle equality. Edit : I see, makes sense.
•  » » » » » » » 12 months ago, # ^ |   0 No; you can divide by i! before convolution so you just do m convolutions of size nk; unless I'm missing something, directly calculating (i-1 choose i1) requires you to do mn^2 convolutions of size k, which is slower than the complexity interlude mentioned.
 » 12 months ago, # |   0 How to solve A ?? Intution ??
•  » » 12 months ago, # ^ |   0 just apply bruteforce and and think what will be the answer when n =3,4,5
•  » » 12 months ago, # ^ |   0 Most people just deduced it from the given sample cases
•  » » 12 months ago, # ^ |   0 $ans=\begin{cases}1&n=1\\\prod\limits_{i=3}^{2n} i&n\geq 2\end{cases}$
•  » » » 12 months ago, # ^ |   0 why ?? i need intution not just the plain answer :_:
•  » » » » 12 months ago, # ^ |   0 You can find this rule by directly calculating the result when $n=3,4,5$
•  » » » » 12 months ago, # ^ | ← Rev. 2 →   +9 It's in fact $\frac{(2n)!}{2}$. For any permutation with $k(k>=n)$ such $i$, you can reverse the permutation and get another unique one with $2n-1-k(2n-1-k •  » » 12 months ago, # ^ | +11 the answer is (2*n)!/2, because each permutation whose the number of pi < pi+1 is no less than n corresponds to another permutation whose the number of pi < pi+1 is less than n after you reverse this permutation •  » » 12 months ago, # ^ | ← Rev. 3 → 0 its simply a combinatrics problem ans : (2*n-1)!*(n) approach: for n there will be 2*n numbers and we can have no more than n positions with pi>n; fo(i,1,2*n) { ans=(ans*i)%MOD; } ans=(ans*n)%MOD; cout<  » 12 months ago, # | 0 Tight ML in div2 C ;(  » 12 months ago, # | +57 Sometimes I miss the old times when this assumption at least sometimes was incorrect. •  » » 12 months ago, # ^ | 0 The data of this task is actually difficult to make, and I can't come up with all the wrong solution too. Maybe we could communicate more about this task. •  » » » 12 months ago, # ^ | +8 maroonrk what's incorrect in your code? •  » » » » 12 months ago, # ^ | +10 My solutions is like this:The essential part of this problem is to make in-degrees of all vertices except the root no less than 2. For each vertex$i$, we know to which vertex$j$we can span an edge. Valid$j$'s form a set of ranges if we order vertices by their distances from the root, and the number of ranges is at most the degree of the vertex$i$. My solution consumes O(number of ranges of the queried vertex) time, so it's a$O(NQ)\$ time algorithm. However, it passed somehow.
•  » » » » » 12 months ago, # ^ |   +9 Well, doesn't look like "we can't come up with all the wrong solution".
 » 12 months ago, # | ← Rev. 2 →   +18 I didn't enjoy this round very much,not only because I got a negative delta.(For div2) The problems are way harder than a typical Div2 round,Problem ABC are not very suitable for their place and Problem DEF are so hard that very few people can solve them during the 2h contest.Also the statement is kinda hard to understand(maybe it's my fault for not reading the statement that carefully but).You have to read it mutiple times to find certain words like "connected" or figure out what the problem is asking.Contests are used to seperate contestants into two parts:Those who are very good at Problem Solving and those who are not that good.They are NOT used to find out who are better at English reading and typing.upd: obviously the pretests are weak too but I blame myself
 » 12 months ago, # |   +2 one of the worst contests with worst pretests with hard problemsat all, you won the worst contest
•  » » 12 months ago, # ^ |   0 true!
•  » » 12 months ago, # ^ | ← Rev. 2 →   -20 I agree with you.
 » 12 months ago, # |   0 how to solve c?
 » 12 months ago, # |   +1 Every Time I think I am now good enough to become CM , My Rating Starts Falling Until it reaches Specialist Range
 » 12 months ago, # | ← Rev. 5 →   +59 Sincerely, this round is not a good round. I have taken nearly 40 contests, and this contest is the first contest that I downvote. 1, the problem are so unbalanced, for div1, so many people are not able to solve A, and for div2, difficulty gap between B and C are too large, so as C and D. 2, div2 B is the worst problem I have ever met. It is so tricky, and description are soooooooo uncomfortable. What is "less than k-1" mean? Could you just write less than k" or even better "no greater than k". "n=1" is meaningless because we cannot pick two points from n=1, and "k=0 or k=1" is even more meaningless because, who want to discuss a graph with negative k?3, div2 A are so unfriendly to newbies. 4, weak pretests5, Except for the balance and description, a good contest should be educated. Even I cannot solve the problem during the contest and get negative delta, it doesn't matter. We can learn something after the contest, and improve our ways of thinking or coding skills. But in this contest, I just want to say, what the hell of this ?? just a bunch of mind tricks or brain teaser? Can I learn something in the contest? In all, getting up at 5:30 AM and take part in such contest is the most wasteful thing I have ever done.
•  » » 12 months ago, # ^ |   +1 systest is pretty weak too? I uphacked myself with a case with obvious 32-bit integer overflow...130380959
 » 12 months ago, # |   +11 I'm wondering if the pretest is too weak. I see many people got FST on 1C
 » 12 months ago, # |   +9 In Div2 B, what is the expected answer for case: n = 1, m = 0 and any k. I guess according to definition of diameter given in the problem statement, diameter is not defined for n = 1 (we need at least 2 nodes to define diameter). I think the answer for this case is ambiguous and the problem should accept both "Yes" and "No" as the correct answers for the above-mentioned case.
•  » » 12 months ago, # ^ |   0 totally argee
•  » » 12 months ago, # ^ |   0 I think they made it quite clear the if n=1 the diameter is 0 by putting an example with n=1 and a note that says in this case the diameter is 0.
•  » » » 12 months ago, # ^ | ← Rev. 2 →   0 I agree but this thing should be mentioned in the problem statement itself, most people don't see the explanation of the sample test case.
 » 12 months ago, # |   +3 Why condition in div2 B use less than k-1 instead of less than just k? It just creates some confusions.
•  » » 12 months ago, # ^ |   0 something likecin>>k--;
 » 12 months ago, # |   0 what is test 61 in