Hello Codeforces!

On September 05, 18:05 MSK Educational Codeforces Round 28 will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

The round will be **unrated** for all users and will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given **6 problems** and **2 hours** to solve them.

The problems were prepared by Mikhail PikMike Piklyaev, Vladimir 0n25 Petrov and me.

Good luck to all participants!

UPD. Editorial can be found here.

Congratulations to the winners:

Rank | Competitor | Problems Solved | Penalty |
---|---|---|---|

1 | eddy1021 | 6 | 148 |

2 | bmerry | 6 | 168 |

3 | uwi | 6 | 173 |

4 | fzzzq2002 | 6 | 183 |

5 | wrinx | 6 | 192 |

Congratulations to the best hackers:

Rank | Competitor | Hack Count |
---|---|---|

1 | halyavin | 74:-11 |

2 | Dmit_riy | 17 |

3 | scaurb | 12 |

4 | winter545 | 12:-3 |

5 | Benq | 9 |

169 successful hacks and 113 unsuccessful hacks were made in total!

And finally people who were the first to solve each problem:

Problem | Competitor | Penalty |
---|---|---|

A | eddy1021 | 0:02 |

B | wrinx | 0:06 |

C | Rawnd | 0:10 |

D | alei | 0:11 |

E | chitanda | 0:20 |

F | HIR180 | 0:06 |

Hopefully it wont have geometry problems :)

ahahahahhahah xD

Don't worry, we don't like geometry as much as you do :) I guarantee nothing for this round, of course, we might have prepared such. Still you can check amount of these in our previous rounds.

Did I miss some recent incident with a geometry problem? Or do you mean that both times Education Round had a geometry problem we had a lot of hacks (30 hacks were a lot back then...) / authors solution were not precise enough?

I believe that it's because 432 round has 2 geometry problems in div.2

is there a way to solve that problem better than

O(N^{3}) ?It's actually

O(n) since for any given point A there can be at most 10 points such that for each pair B, C angle between vectors AB and AC is greater then or equal to 90 degrees, so naive solution will find two points B and C for which angle between AB and AC is less than 90 among first 11 pointsIt can be O(1) ;). We don't need to read input if n>=12

no, i mean in general. Leave that n>=11 thing. Given n points can we do better than

O(N^{3}) ? Or just modify the question to: dot product >= C (some constant)I don't get what you're asking about. If we consider question "dot product >= C" then it is completely different problem.

@swistakk Big-o notation describes worst-case complexity, so more like Ω(1) as a best case scenario.

I know what big O stands for and I maintain my opinion that this task can be solved in O(1).

(meme is life)

Look, I'm not arguing for the point of arguing. It seems my knowledge of asymptotic notations is incomplete. May I ask why it's the upper bound?

Consider such algorithm:

Running time of our algorithm for every

nis bounded byconstantwhich is running time for 11 points. Hence it's O(1).I misread your comment earlier. Do you mean to say something like this: https://pasteboard.co/GJ0r6xP.png

I am not sure you get what O(1) is here. What is complexity of algorithm that for an input of length n does respectively: 100, 234, 12, 1243543, 1, 78945673657578458567, 5, 5, 5, 5, 5, 5, 5, ... operations (I mean, 100 operations for n=1, 234 for n=2 etc.)? It's O(1), because it runs in time at most 78945673657578458567 no matter the value of n is.

Now what is complexity of algorithm that does that many operations: 1^3, 2^3, ..., 11^3, 1, 1, 1, 1, 1, 1, 1, ...? It's O(1)! There no such complexity as "O(n) for n<=15 and O(1) for n>15", it's just O(1).

Gimme more MemeS!

I bought an Geometry book after CF R 432

So serious :D

Was it the AoPs one? I like that one.

Is it rated ? No ofc. give me some down votes

So is it rated or not?

Why must unintelligent specimen like you plague our CodeForces community?

Unfortunately, attention seeking exists in almost all communities. They will stop if you ignore them.

not

I hope that today's round gives me feeling of competing on

and not oncodeforcesgeometryforcesorimplementationforces!Why doesnt CF add Educational Rounds records to contest log

We also have just discussed this topic. I plan to update all previous announcement blogs with this data after the results of current contest are up.

Ban UWI please.

why?

Because hacking is illegal in my country!

Ples senpais give me some up votess :v

I m Gonna solve All six questions.......(Just Kidding)

And get Hacked by uwi

Lol

Can't get hacked if you don't solve!

Haha

I Have not solved more than 2 question in any Codeforces contest but Today i m gonna........Lol

Can't wait the contest to end so I can watch people getting hacked by uwi!

Don't worry guy contest is rate! UPVOTE ME PLZ!

How to solve the f**k problem A???

Same Here..

Just solve more problems. It's the third time this problem appears on CF.

UPD: 180C - Письмо, and the other problem is in Gym.

can you send the solution?

yes its really interesting but tough

dp... i just solved it before 4min left ;ㅅ;

i think (test case 2)

6

0 1 0 0 1 0

ans = 0 0 0 1 -> 4...

i can only solve F

please uwi do not hack my solutions ... wait a minute I did not solve anything -_-

its smart not to solve at all then get hacked after solving everything

Lol,Even uwi can't hack your solution now....

Here it goes! Here it goes! Let the hacking begin uwi!

I've made simple dp on tree in E but fail. I assume that because of long long overflow. Is that good solution?

why is problem F a problem F

It's because there should have also been problem G, just didn't have enough time to prepare it.

Now coz its over somebody tell me A. I did nothing today :(

Count number of ones after index i and number of zeros before index i. Now answer could be zeros+ones.

why would that work. I could not solve anything. And still have no idea. I checked bmerry solution and he did the same. But why ;-;

Because zeros should be before ones. Delete all zeros before i. Delete all ones after i.

isn't that delete all 1s before i and all 0 after i. so at every iteration, I need to assume that its 1 and move accordingly??

Yeah, i think so.

Do not use cin in F!!

sigh.....

Or use cin with

`ios_base::sync_with_stdio(0);`

But then i cant use printf safely.

You know, sometimes printf is much more convenient than cout, such as printf("%d %d %d\n", i, j, k) vs cout << i << " " << j " " k << endl;

Did someone solve problem D with a 2D Segment Tree?

I solved it using 2D sparse tables, it used n^2logn memory, but O(1) queries :D

It can be solved easily using 2d RMQ. You can check my submission

It can also be solved with pure binary search. sort the times and binary search on the first event that makes the screen broken. in each check of the binary search, use a table of N by M and another dp one. fill it with 0's and put 1's on the places that were broken until that event. use dp to find in O(NM) the largest square completely made out of 1's. if its size is at least k, then at this moment of time the screen is already ruined, otherwise it's not.

total time: O(NM * log(NM))

The problem F is too easy. It should be problem B.

It seems that the checker for the problem F is incorrect.

My solution got AC, even though the absolute error is more than 0.0001 on the testcase #15.

(14792.348508-14792.3)/14792.348508 = 3.27926292e-6 < 1e-4.

the statements says relative or absolute error, so in this case relative error is used.

Previously only absolute was in statement, it was changed after this comment

It was nice round xD,although i was only able to Solve Problem A, and B was greedy but :/ welp

(After Solving A)

Today is my birthday. So please don't hack my solutions @uwi :)

Is it unrated round?

Is it rated round?

BledDest, you seem to have forgotten to add the editorial to contest materials, please add it so people can find it more easily. Thanks!

Done.

Hey guys I can't figure out problem A why the answer of this input is "4"? input : 0 1 0 0 1 It seems maximum possible is 3 011 or 001 could you help me?

I think I got it...