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

Автор O--O, история, 3 года назад, По-английски

Hello, Codeforces.

Contest: SpeedForces

Time: Dec/24/2022 19:10 (Moscow time)

Writer: O--O

Tester: JOIN_GROUP, E404_Not_Found, psychobot

You will have 8 problems in 120 minutes.

Problems are very interesting and problem statements are short.

Problem C and D had little mistakes in statement.

Problem F had mistake in sample.

Winners

1. Kirill22

2. Svyat

3. huangxiaohua

4. Kniaz

5. wery0

6. bitset

Did you like the contest?

Solutions are opened.

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

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

As a tester, nice problems. I recommend to participate.

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

what the problem rate for this contest?

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

I like your contests! (Mathforces was good)

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

What about the score distribution?

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

I will write it.

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

Are you sure that everything is fine with problem F?

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

Thanks for Saturday's workout!

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

I saw D on codeforces

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

Could you share Problem H solution? I thought of a solution involving set, however, seemed too complicated to implement, especially for 1 second execution time.

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

    My solution was to iterate k, and maintain a data structure for the products a[i]*a[j] for j < k. For each k, you can iterate p, and query the data structure for the number of pairs a[i]*a[j] <= x / (a[k]*a[p]). The complexity should be O(N^2 log N).

»
3 года назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится
Spoiler F
»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Condition F says that $$$n \ge 1$$$, but in test 4 $$$n=0$$$.

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

Shit of piece, not a contest. Only idiots will give penalty for WA on first test. Testers are also silly noobs — missed obvious bug in checker in F. Author is so lazy, that decided not write validator for tests, resulting $$$0$$$ appeared in fourth test in F.

SHITOFPIECEOFSHIT!

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

In problem D, does the player have to delete all the substrings or just one? If s = "abababa" and t = "aba", does s become "b" after the 1st move or a player can choose? Why wasn't it specified in the statement or at least in samples?

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +4 Проголосовать: не нравится
ll p = 1000005;
ll dp[p];
for(int i=0;i<p;i++){
  dp[i] = INT_MAX;
}
dp[1] = 0;
for (int i=2; i<p; i++) {
   dp[i] = dp[i-1]+1;
   for (int j=2; j<10; j++) {
       if (i % j == 0) {
            dp[i] = min(dp[i], dp[i/j]+j);
       }
   }
}

Link to sol: Soln

In problem E, just traversing inner loop from 2 to 10 passed the test cases. Just wanted to make sure if there is some logic behind this ? Since in the ideal solution, we should have checked for more than that, as given below

ll p = 1000005;
ll dp[p];
for(int i=0;i<p;i++){
  dp[i] = INT_MAX;
}
dp[1] = 0;
for (int i=2; i<p; i++) {
    dp[i] = min(dp[i], dp[i-1]+1);
    for (int j=2; j*i<p; j++) {
        dp[i*j] = min(dp[i*j], dp[i]+j);
    }
}

Link to sol: Soln

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

I used segment tree in problem B, and ACed, but felt it was kinda dumb. Anyone thought of anything smarter?
my submission: 186634062

Help pls :P
thanks in advance.
  • »
    »
    3 года назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +3 Проголосовать: не нравится

    Just keep array elements (let's call each element as $$$a_{i}$$$) and the value of xor of all elements (let's call it $$$X$$$), then after each query do this : Do $$$X$$$ xor $$$a_{i}$$$, after that replace $$$a_{i}$$$ with the integer given in query, and then do $$$X$$$ xor $$$a_{i}$$$ and print the answer. The point is when you xored a number and you want to remove it from xor you should xor with that number again, cuz it's like when you xor even times with a number, it's like you haven't added it to xor.

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

Find smallest $$$k$$$ that $$$\log_x k=\sqrt[x]k$$$.

Wait... when $$$x=4$$$ shouldn't $$$k=16$$$ be smaller?

Did I misunderstand something?

Upd: I didn't see $$$=x$$$.

Upd2: nifek said that there was no $$$x$$$. It seems that O--O your team need better testers!

Upd3: I'm really curious about it is something wrong with the statement or with the solution.

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

Any one better idea for F? Im getting TLE

My solution: https://mirror.codeforces.com/submissions/_Aryan_#

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

How do find more updates on these unrated contests?