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

Автор AlFlen, 5 лет назад, По-русски

Привет, Codeforces!

Мы с 74TrAkToR рады пригласить вас на наш совместный Codeforces Round 750 (Div. 2), который пройдет в 24.10.2021 13:05 (Московское время). Обратите внимание на необычное время проведения раунда. Он будет рейтинговым для всех участников, чей рейтинг ниже 2100. Одновременно с раундом будет проходить ЧеРеКОШ, на котором будут использованы задачи с этого раунда!

Мы хотим поблагодарить всех, кто оказал нам бесценную помощь в подготовке этого раунда:

На раунде вам нужно будет помочь героям мультсериала Лунтик и его друзья. Вам будет предложено 7 задач, одна из которых имеет две подзадачи. У вас будет 2 часа 30 минут на их решение.

UPD: Разбалловка: $$$500-750-1500-1750-2500-(2000+1500)-3250$$$.

UPD2: Разбор

UPD3: Поздравляем победителей!

Div. 2:

  1. int65536

  2. hehezhouyyds

  3. trunkty

  4. m3owp1mp

  5. Chtholly-Nota-Seniorious

Div. 1 + Div. 2:

  1. SSRS_

  2. emthrm

  3. int65536

  4. turmax

  5. hehezhouyyds

Желаем всем удачи!

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

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

hoping for a good contest :)

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

As a tester, good luck anyone who participates will have a positive delta!

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

Anxious for the contest to arrive

PS: I take this opportunity to leave a link to a blog with a collection of segment tree problems that I hope will be helpful to someone. https://codeforces.me/blog/entry/22616

Thanks to AminAnvari

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

why cf is organising contest at unusual time these day? By the way hoping for big delta +ve

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

traktor. Me when I read A

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

As a tester, GOOD LUCK!

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

As a tester, GOOD LUCK!

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

Судя по тому, что будет 7 задач, то будет много не сложных на скорость и пару с таргетом 1900-2100. Можно было бы поднять рейтинг. Жаль, что не смогу написать раунд из-за мкошп.

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

»
5 лет назад, скрыть # |
← Rev. 6  
Проголосовать: нравится -44 Проголосовать: не нравится
nice meme
»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

does one subtask means that one problem will be divided to easy and hard versions?

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

А вот что произошло дальше, мы сейчас с вами и узнаем!

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

i wish i could creat a contest like this one day :3

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

Unusual Time

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

I hope you surprise us with A1 and A2

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

I hope to become MASTER again through this contest.

Good luck!

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

I want green

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

Good time for Chinese participants!

I wonder why recent contests take place earlier.

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

I don't know whether it is appropriate to post this comment under this blog.

If I registered for round #751(Div-1) and I lost candidate master after today's contest, will I be able to participate in tomorrow's Div-1?.

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

ppl say the unusual time of this round is because its mirroring an olympiad, but we all know the real reason is that it doesn't clash with the T20 World Cup: India vs Pakistan. Thanks Codeforces, appreciate it.

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

At least the first question can be easy for newbies!!!

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

is there gonna be score distribution?

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

Yay! Perfect Timing for me. Today is IND vs. PAK World T20 from 7:30 pm (UTC+5.5).

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

Is it rated?

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

Todays Contest is Awesome..... I am only able to solve one question but B and C questions solution i know but there time complexity is way too much........ Today gonna learn something new...... Very nice contest Again!!!

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

WA on pretest 2 for problem 4 ... :(

»
5 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +1 Проголосовать: не нравится
  • Problem 1: Pretest passed in 7 mins.
  • Problem 2: Pretest passed in 3 mins.
  • Problem 3: Pretest passed in 12 mins.
  • Problem 4: WA on pretest 2 :(
»
5 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

Guys does Codeforces really use Adobe Flash Player? I feel like it is a prank, I can't do hacks.

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

WTF is happening with me I am solving A in more than 1 hr and B,C in 30 mins is it just me or nowadays problem A is becoming trickier. I suck

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

Thanks for such a good contest!

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

WHY THE CONSTRAIN sum <= 1e9 is in D there are solutions that cut because of this what the hell is point? you could make it 2e9

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

How to solve E? I tried a O(n^1.5) dp approach but didn't work.

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

please tell me if i have submitted two pretest passed solutions for the same problem, which one will be judged for main tests??? please some one tell meee pleaseeeee

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

Are pretests for F1 really weak?

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

Someone solved the problem F2 with a Gaussian basis?

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

    I don't think that it is possible to solve this problem with gaussian basis. The expected solution uses the fact that you have at most 5000 different values for $$$a_i$$$. You just need to solve $$$dp[k][xor] =$$$ minimum position you can reach value xor, using only $$$a_i \lt = k$$$

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

Can someone give a hint for A? I was trying it case by case but I felt like there were way too many cases with my method. In the end, I was really short on time and couldn't even enumerate all the cases.

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

    for Problem A : the answer is either 0 or 1 proof : let A , B , C be durations ( 1 min each ) of the 3 musics A + 2B + 3C is the total duration now consider 2 groups : ( B + C ) and ( B + C ) so we remain with A + C duration now if A + C is odd => 1 will be extra or else A + C will be equally distributed

  • »
    »
    5 лет назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +3 Проголосовать: не нравится
    1. First of all, it's obvious that answer can't be more than 3.
    2. Answer can't be 3, because in that case we can move from the bigger subset 1 or 2 to smaller one (or, if bigger subset consists only from 3's, that means all 1's in 2's in smaller, and we can exchange 3 with 2 or 1 and make answer smaller).
    3. Answer can't be 2 using the same logic. Obviously, if bigger subset has at least one 1, we can make the answer 0 easily. If answer is 2, then all 1's in smaller subset. Bigger subset consists only of 3's? Exchange 3's from that subset with 2 and 1 from smaller, afterwards move 1 to smaller. Answer is zero. Bigger subset consists only of 2's? Exchange 2 from bigger with 1 in smaller. Answer is zero. 3's and 2's? Exchange 2 with 1 from smaller.

    4.Answer is obviously can be 1, because a + 2b + 3c can be odd.

    Any natural (and > 0 depending on definiton) numbers a, b, c, such that a + 2b + 3c is even can be divided to equal groups.
    

    Proof: answer can't be bigger than 1, proved that in 1. — 3. If cannot be divided, then answer is 1, and that means that sum of bigger subset and smaller subset is odd, which contradicts with what we prove. So the answer is (a + 2b + 3c) % 2.

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

D was nothing but x(+y) + y(-x) = 0 and x(-y) + y(x+z) + z(-y) = 0. One can easily use 1st relation to solve for even arrays but tricky part comes for odd arrays where u need to find x and z such that there sum is not 0.

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

How to solve A quickly?

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

Great problems!

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

I don't understand the answer for A from editorial:

cout << (a + c) % 2 << '\n';

If a=0, b=1, c=0, shouldn't the answer be 2 minutes? (not zero as the editorial suggest)

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

The question for the experts is, is there really not a single test in A that would reject a solution with an overflow of the int variable? https://codeforces.me/contest/1582/submission/132905404

I spent half an hour looking for a hack, for this solution, for me it became a kind of challenge...

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

Did anyone else solve F2 with bitset in $$$O(\dfrac{a_i^3+na_i}{w})$$$? I think that I will FST(

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

I needed more 5 minutes to fix my bug for D if I just didn't be like a moron in A and waste 20 min on it pfff I hope my solution is WA after fixing that bug that would actually make me feel less worst lol

Edit: Accepted but wasn't gonna make it in time without my stupidity in A anyway that actually feels even more less worst my idea is correct and I wasn't gonna make on time better than the solution is completely wrong or i just needed more 5 min to get Accepted

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

Problem — B

Left shift
Logarithimc power method
Pow

Is'nt left shift and logarithimic power method better than pow??
anyone can explain why?? thanks in advance.

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

    (1L<<zc); returns an int, so if zc > 30 you will get 0 in the answer. Change it to ll ans = (1LL<<zc); and you should get ac.

    You are also taking the modulo in the logarithm power, which makes 0 sense in this problem and this is why youre getting wa

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

Nice problems! If problem A explanation was correct this contest was one of the great contest in cf

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

I finished A, B, C in 44 minutes, and spend all my time of D. It's was so simple. I tried some Diophantine equation lmao and did not figure out the correct solution.

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

Problem D has shaved years off my lifespan.

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

FSTforces

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

2 minutes silence for those who got FST on F1.

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

2 minutes silence for those who got FST on F1.

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

I don't understand one thing

Why does xor of empty subsequence equal to zero?

Another interesting thing is that there was no such pretest in the tests.

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

To get F1 accepted it was more important to keep in mind that xor 0 is always possible than the fact that increasing subsequence is different from non-decreasing.

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

E time limit got increased after contest ?

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

.

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

After the round 750, I received the message:

" Your solution 132867227 for the problem 1582C significantly coincides with solutions vpike/132864849, RefreshedCoder/132867227 "

The two solutions can be found here:

132867227 132864849

It's a simple greedy approach and I wrote every character in my IDE. It's a wrong judgement and may I ask the admin of Codeforces to examine the two submissions manually?

I personally don't know vpike and it's just a coincidence that our solutions are similar in this simple problem. I solved in total 6 problems in the round and there's no motivation for me to cheat in problem C.

Please, could anybody help me to get my rating back?

UPD: Ping MikeMirzayanov here

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

Can somebody hack my D? I think my submission is wrong, because I dont check this condition the sum of their absolute values cannot exceed 10^9. 132943758 upd: it is correct

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

Is F2 solvable with java?

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

Thanks for fast Editorial!

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

Can anyone tell me why me solution https://codeforces.me/contest/1582/submission/149071151 gives TLE on F2 If I use while loop which I have commented instead of for loop it gives AC.