Блог пользователя wakanda-forever

Автор wakanda-forever, 5 месяцев назад, По-английски

Thanks for participating. I apologize for the unexpectedly hard B. Apart from that, I hope you liked the problems and enjoyed the round!

I would like to thank Proof_by_QED, Forge, and awesomeguy856 for pointing out an elegant $$$\mathcal{O}(n)$$$ solution for problem G.

I would also like to thank temporary1 for helping me write the editorial for problem F and Forge and reirugan for proofreading the editorial.

Rating predictions

2241A - Divide and Conquer

Idea
Implementation
Rate The Problem!

2241B - Good times Good times

Idea
Implementation
Rate The Problem!

2241C - RemovevomeR

Idea
Implementation
Rate The Problem!

2241D - An Alternative Way

Idea
An Alternative Way
Implementation
Rate The Problem!

2241E - Fair and Square

Idea
Implementation
Rate The Problem!

2241F - A Bit Odd

Idea
Implementation
Rate The Problem!

2241G - Summmon

Idea
Implementation
Rate The Problem!
Разбор задач Codeforces Round 1107 (Div. 3)
  • Проголосовать: нравится
  • +98
  • Проголосовать: не нравится

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

very bad at game problems what to do?

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

Thanks for this beautiful round and amazing problems :)

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

Problem E is very elegant

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

    can u Please explain me problem E

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

      Sure man.

      Part 1: What makes a triplet good?
      Part 2: How to count good triplets?
»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem B was even harder than problem D. Finding the idea that you have to multiply x by 10...01 was crazy difficult. Great contest!

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

Hello guys,

I've solved many standard DSA problems, but I'm struggling with problems that require identifying patterns.

Even when I solve a Codeforces problem, my solution usually looks much messier compared to other people's solutions. I'd really appreciate some guidance.

Do you guys have any set of problems or resources that can help me improve my pattern recognition? I'm ready to work super hard, but I don't have proper guidance or know which resources to follow.

Any advice would be greatly appreciated. Thank you!

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

One of the greatest contest I have ever seen.

Hats off to the writer .

Great efforts...

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

Not me getting absolutely demolished by B today, man I suck at these type of problems so bad, I found C and D easier than B. Though the contest had pretty good questions in my opinion.

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

A<C<D<B I thought time limit per test meant time limit for each small test in a pretest/test so i spent a whole hour trying to bruteforce B lol, goodbye pupil

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

F < E

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

In G theoretical maximum is 2e5*(2e5-1)/2*1e9, it's okay for ull, but bad for ll. I have test for that, and hacks now are incorrect.

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

    A little bit correction: The maximum answer for each range is $$$5 * 10^{8}$$$, so theoretical maximum answer for this problem here is actually $$$10^{19}$$$ instead of $$$2 * 10^{19}$$$. Still we would need an unsigned 64-bit integer.

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

Thanks for this beautiful round and problems ! It was very fun

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

It was so interesting and brainstorming

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

Chronology.

1) Solved A.

2) Read B, tried around 8-10 minutes, couldn't find any pattern. Wrote two for-loops and isGood(x) to brute the solution. Skipped cos couldn't find pattern from Brute.

3) Read C, solved.

4) Went back to B, read again. Couldn't find pattern again. (Spent around 2 minutes ).

5) Read D, solved it.

6) Went back to B AGAIN. still couldn't find pattern. ( spent more than 5 minutes, because I thought "so many people solved B, so it must be simple!!"). Again wasted those 5 minutes.

7) Read E ,solved it.

8) Again went back to B, (This time, again spent 5-7 minutes, and still coudn't solve it ).

9) Read F, solved it with two attempts.

10) Tried B AGAIN. Couldn't solve it AGAIN.

11) Read G, and realised so less accepted solutions for G. So moved back to B.

12) Finally wrote full fledge brute() for B. and found pattern when printed all possible good numbers for 'x' where (100 <= x <= 1000). ( Found common number 1001. found pattern ).

Honestly, If we know B, its easy. But if we don't , bruting our way through pattern is difficult :( .

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

idk why but problem B seemed to be the easiest for me even tho i only managed to solve A , i read problem D and immediatly skipped it when i saw the graph , but good contest so far(it may be my best) .

Any tips for improvement ?

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

Problem G solution is wrong, Answer exceeds the long long range.380842381

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

Me overcomplicating 2241B - Good times Good times while 10^digits + 1 was patiently waiting in the corner

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

Got A-D in 40 mins and basically finished the contest. I negged on D three times because I'm a noob, I wrote a[0] = b[0], but in reality all cases where a[0] <= b[0] worked. Finally hitting pupil! Yay!!!

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

B is honestly easier if you do math contests. If you do math contests, you would know about the multiply by 101 and 1001 tricks, which would make it easier.

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

    I could not get it in the starting. But when i write x twice and divided this number by x again then I see the pattern. Like for x = 73. My y is 7373 / 73.

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

Problem G remember to use unsigned long long because there's a hack that can construct a answer to $$$9955440513000000000$$$(LLONG_MAX $$$9223372036854775807$$$ is lower than this).

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

    it's crazy how in the implementation of the solution the author used long long not unsigned long long.

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

    I guess that the author didn't expect it so I guess it is reasonably to say that they should have added a constraint that the answer do not exceeds LLONG_MAX as if not maybe almost all accepted solution will be hacked.

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

for F Alice can win as long as there's a single element that causes odd inversions (odd 1's in front of 0 or odd 0's after 1)

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

Thanks for this elegant contest

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

My n^(3/2) solution to E:

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

b was harder than c and d .

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

Great contest. Couldn't figure out a trick for counting subtrees' sizes for the problem E, so switched to F and managed to solve it at the very last moment. The funny thing about E is it's sort of a regex problem.

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

I'm glad so many newbies paid tribute to me by putting wf at the end of their variables ❤

Truly heartwarming ❤

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

我还以为b题是dfs,打表才发现是找规律

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

.

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

x < 1e8 and not <= 1e8 in B saved me big time

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

Attempting a contest after long time, guys help me debug my solution for D, any help is appreciated. https://codeliveshare.com/ide/hXAw317iGb

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

why rating is not getting updated

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

My post contest discussion stream here and hints here

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

I thought that in B x <= 1e8 (including 1e8), so I added a condition that checks if x == 1e8 then y = 2 (or any number that only has one unique digit). Afterwards found out that wasn't necessary

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

cool E, learned new things. thanks a lot :)

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

The first contest that I have practiced after I came back form CP. It's tooooooooooo difficult for me.

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

The contest was reeeally fun but I'm kinda concerned about CodeForces not being able to catch the cheaters..

Like, many of the top 20 people were newbies until now (consistently having 8K+ ranks and not being able to cross the 1200 mark) but somehow they were able to solve all the problems soooo quickly? T^T

Ain't it kinda sus?

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

B looks very easy, but it was the scariest one

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

After sitting with the B for a solid 30 minutes, I realised the 10^d + 1 pattern. Wrote the code. Got WA on test case 2. Turns out, though my logic was correct, I made a mistake in counting the number of digits. Facepalm

Anyway, decided to input the x as string. And used the x.size() to count the digits

380764045

Very nice problem none the less

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

Quickest rating update in a Div. 3! I actually clutched up!

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

I was randomly solving this problem today and noticed it felt very similar to Problem B from this contest. It turns out they have the same author... 🦁

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

In B i tried to make preprossesing for all nums from 2 to 1e4

check is they good and push them to vector then i use this vector and loop on it to find a good y that give me good x*y

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

OMG such a nice round. too bad i missed the contest because i went to play badminton instead smh.. gotta keep an eye on the timings.

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

Bruh, I literally thought of the solution for problem B, but I disregarded that as soon as it came to my mind thinking that y is 10^9 max, and 10^d will exceed that.

Man I should have given it more thought.

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

Oh why I didn't think of this solution for question B?

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

very nice contest.

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

how can i practice to solve these problems?i just did problem A

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

was it intentional in g to make the answer out of bound of the long long range

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

I've only managed to solve one problem. How can I improve?

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

If anyone needs a translation of http://e-maxx.ru/upload/e-maxx_algo.pdf from Russian into English, here you go https://cuty.io/emaxxalgoen.

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

why does number of G solvers decreases?...

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

Can anyone Explain E in more Detail

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

can anyone explain me approach of second problem?

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

i stuck in problem c

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

F was delightful!

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

the name of the problem being good times good times is such a cute hint :P

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

F so confused