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

Автор mohammedehab2002, 8 лет назад, По-английски

Hello codeforces!

I'm glad to announce that codeforces round #473 for the second division will take place on Tuesday April 3rd 16:05 UTC. As usual, first division participants can take part out of competition.

I'm the problemsetter and the editorialist of this round. I'd like to thank mahmoudbadawy for creating the testdata and testing the round, FalseMirror, Livace, demon1999, and vintage_Vlad_Makeev for testing the round, KAN and Ahmad_Elsagheer for giving their great opinions and thoughts and helping in round preparation, arsor for helping translate the problems, and MikeMirzayanov for the great codeforces and polygon platforms.

You'll be given 6 problems and 2 hours to solve them.

UPD : the scoring distribution will be 500-1000-1250-1750-2000-2500.

UPD : Editorial and bonus tasks.

Good luck and Have fun!

UPD congratulations to the winners!

Div.1:-

  1. Um_nik
  2. dotorya
  3. kmjp
  4. natsugiri
  5. Lewin

Div.2:-

  1. StopBullying
  2. taeyeon_ss
  3. Tsuare
  4. readers2
  5. ajinkya1p3
  • Проголосовать: нравится
  • +367
  • Проголосовать: не нравится

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

"And yes it's rated (I hope)."

Scoring distribution is posted and it is 2 days before the contests even begins.

Contestant : Doesn't that sound like another April fool contest ?

Setter : No, It isn't(I hope)

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

"And yes it's rated (I hope)."how it's calculated that the contest will either be rated or not ,I really wanna know:D

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

I missed rated contests...

hope it will be rated

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

finally ,after 7 days from the last rated contest ,we have CF rated Round :) great :|

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

Good Luck , wish less implementation problems :D

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

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

Why was the contest moved? (maybe because of mathmash)

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

Woooow , Egyptian problem setters , I really proud of you

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

Good job !!! I will have two competitons in the one day. Enjoy it !!!!

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

waiting for a syrian contest Daniar :P

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

Yeah! 5 rated contest in the week ! High ratings to everybody! What a sad story...)

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

Now,Is it confirm whether this contest will be rated or not??? And Can we see 7000 participation 3 minutes before the registration.

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

Good questions

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

Interesting problem titles

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

i can't be able to submit D code. Please look into this. It took me 20 -25 minutes just to submit solution of D again and again.The page seems to get stuck at one point meanwhile i submitted A which was accepted immediately.

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

For which cases answer i -1 in C? Very good problems by the way.

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

how to solve F?

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

I only needed one extra second to submit D, I hope my code wont pass :(

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

Just look at the system testing . lightning speed...

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
if(n<=5){
    puts("-1");
    rep(i,n-1) printf("%d %d\n",i,i+1);
}
else{
    rep(i,n-1) printf("%d %d\n",i,i+1);
    rep(i,n-1) printf("%d %d\n",1,i+1);
}

My C Code , What's wrong???

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

Why is this WA on test 2 in problem C ?

1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 2
2 3
3 4
4 5
5 6
6 7
7 8
»
8 лет назад, скрыть # |
 
Проголосовать: нравится +36 Проголосовать: не нравится

Congratulations on beating the world record on systest start.

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

It is so strange to see OEIS problem in E :(

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

Unable to hack solution in the last 3 minutes the page kept loading endlessly :| PS: Internet was stable

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

Fastest start of System Test ever :o

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

How to solve E?

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

Can Mike or Kan, or someone, please explain why am I getting compile error on my latest submission? It works fine on my PC, and I can't figure out why.

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

how to solve C?

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

How to solve problem D?

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

    Iterate over each number, saving its prime divisors in a visit array, once you find a number that has a divisor that came before keep increasing that number by 1 and try again.

    Once you found a good number for that element, the rest of the array(to the right) can be any number you want, let x be the number of elements left in the array, start from 2 with the visit array you have, find x good numbers and put them in the elements left.

    If you didn't find any bad one, just do nothing.

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится
    1. Generate primes up to x (I used x = 10^7);
    2. If nums a[1]..a[i — 1] are coprimes then a[1]..a[i] are coprimes if and only if all primes divisors of a[i] doesn't exist in set of prime divisors for a[1]..a[i — 1].
    3. Use set of prime divisors. For current index i you can factorize a[i]. While a[i] cannot be used, you can increase a[i].
    4. If there was increase of a[i], then a[i + 1]..a[n] can be initialize with first primes that don't exist in set.

    Example:
    5 2 4 1 5 10

    a[1] = 2. Set is { 2 } a[2] = 4. 4 = 2^2. You need to increase. a[2] = 5. Set is { 2, 5 }

    There was increase. So a[3] = 3, a[4] = 7, a[5] = 11.
    And answer is 2 5 3 7 11.

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

Editorial is actually unavailable.

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

That moment when you try to solve E with MST using DSU and realized that its just OEIS .

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

CF predictor showing 'Application Error' :(

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

Can this be hacked?

I feel it should be if(taken and *primes.begin()<a[i]) but second condition might always be true.

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

Why doesn't Rating Predictor show Round 473 ?
This is updated almost everytime after the contest.

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

Is there somebody, who mixed up k with m in problem B and got billions wa(((

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

Similar problem to problem E:http://codeforces.me/problemset/problem/888/G (Boruvka's algorithm for the MST).

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

Became Expert!!! :P

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

What's the intuition behind C's solution?

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

    In bipartite graph, the number of minimum-vertex-cover is equal to the number of maximum-matching.

    A tree is a bipartite graph, when you regard nodes with depth of different parity as different bipartite parts.

    Therefore, the answer by "wrong algorithm" is true if and only if the calculated minimum is equal to the number of maximum-matching, and is false otherwise.

    To explicitly find a case where the calculated minimum is not equal to the number of maximun-matching, you can refer to the Hall's Theorm Hall's Theorm

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

Hi, I'm a contest contestant: Codeforces Round # 473 (Div. 2)

there was a code that was not tested and was sent during the contest; is the problem D, since the problem I sent remained in Pretests passed, but when I sent it after the answer the contest answer gave me correct answer

This is my code during the contest: http://codeforces.me/contest/959/submission/36929338

This is my code after the contest: http://codeforces.me/contest/959/submission/36933508

both are the same code

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

Sorry for my poor English! In problem 959C - Mahmoud and Ehab and the wrong algorithm,anyone thinked n = 8 is the smallest case which exist a tree which Mahmoud's algorithm is wrong. They think that theorem might be because the second sample test.In fact, n = 6 is smallest case. Therefore,n = 7 or n = 6 is test hack for C.

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

In problem D, why I change the position of two sentences, the judge results differ?

the first one got AC 36938566

and the second one got Runtime error 36938574

Can someone help me?

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

Can Anyone Help me in E ? The editorial language is too much technical for me to understand it. I got the little approach. But i got doubts in it....

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

(╯°□°)╯︵ ┻━┻, when your friends up 1000 points in cf predictor(XD) and u.u no rated for you