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

Автор SPatrik, история, 7 лет назад, По-английски

Hello, Codeforces!

I am glad to invite you to take part in Codeforces Round #577 (Div 2), which will be held on Sunday, 4 August at 16:35 UTC.

You will be given 5 problems, one of them will have 2 subtasks and 2 hours to solve them.

The round will be rated for the second division.

Huge thanks to cdkrot and KAN for helping to prepare the round.

I would like to thank to 300iq, isaf27, vintage_Vlad_Makeev, pllk, mohammedehab2002, 74TrAkToR, Rox, _overrated_ for testing the round.

And thanks to MikeMirzayanov for the great codeforces and polygon platforms.

This is my first Codeforces round. Hope you will enjoy it.

Good luck and have fun!

UPD: The scoring distribution is: 500 — 1000 — 1500 — 2000 — (2000 + 1000)

UPD2: Editorial

UPD3: Congratulations to the winners:

Div2:

1: wwaynetuu

2: jerome_mei

3: satu0king

4: Yazmau

5: Tlatoani, Hasan0540, boba5551

Unofficial Div1:

1: neal

2: uwi

3: scott_wu

4: I_love_Tanya_Romanova

5: ecnerwala

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

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

All the " Author's First Codeforces round " are always carefully designed. Can't wait attending this contest.

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

Wish you the best of luck for organising your first contest

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

Which question has two subparts? Please share the points of all problems.

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

The time is not friendly for Chinese

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

I hope it's the first of many.

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

We expect problems would be interesting and this round will be remarkable for PARTICIPANTS & JUDGES.

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

Which problem has two subtasks?

And the what's the markes for each problem?

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

i have a question... current my email "not visibled" in codeforces, how to fix???

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

Hopefully, I will become spec.

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

Hope C1 and C2 I want rate inflation

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

coding sucks

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

Hope this round goes well.

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

It's interesting that writing of contest problems is a free creativity. So many authors use imagination and fantasy almost without limits, sometimes even insert jokes.

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

Guess I'll be master after this round.

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

There are fewer people take part in this contest.

Maybe it is too late,but I'll still enjoy it!

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

I hope the problem statements are short and clear.

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

Please don't be stuck, server

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

When codeforces adds another speedforces.

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

.

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

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

D is too hard for D.

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

TypingForces. Also D is unusually tough.

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

I can't see B solution meh feels stupid

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

How to solve B?

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

How to solve D?

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

Is N^4 the intended complexity for E1 ?

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

What is pretest 5 in B ?

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

Logic behind B?

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

Test 5 B == killer.

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

Anybody know what pretest 7 in D was?

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

Dafuq was B omfg

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

Logic behind c?

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

A, B, C are standard problems. D is a good problem. For this thank you author.

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

Когда предлагаешь контест просят указать особенности задач, которые даются. Кому какие сегодняшние задачи показались необычными и интересными? В чем их особенность? У кого после решения задачи появилась радость, что ты придумал классное решение и оно зашло? Лично мне не понравилась ни одна из АВС. Тем более у меня не появилась радость после решения баянистого С. Кроме того, D и E, по-моему, очень сложные для D и E.

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

B reminded me of AGC 036 C.

By the way, could somebody hack my solution for D? I solved in a dijkstra-like style. I checked 998244353 times but I couldn't find my bug.

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

When you propose a contest, you is asked to indicate the features of the tasks that are given. To whom what today's tasks seemed unusual and interesting? What is their feature? Who, after solving the problem, got the joy that you came up with a cool solution and it came in? Personally, I did not like any of the ABC. Moreover, I didn’t have joy after the decision of the old C. In addition, D and E, in my opinion, are very difficult for D and E. Sorry from my poor English

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

Hey guys, Could anyone please explain to me what is the hack means for contests?

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

    If your solution's imperfect(even though you passed pretest, it's possible), the others who locked that problem can hack your solution with data which is counterexample.

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

      Could you please more clear :D I am new for contests

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

        During the contest, your submissions are only tested on a limited set of test (pretests). It's possible that an incorrect solution can pass pretests, so during the contest, other people in your room who have solved the same problem can choose to lock their problem and "hack" your solution (provide a test case where your soln will fail). Hackers are awarded +100 pts for succesfull hack, -50 for unsuccessful.

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

        The pretest doesn't cover all of test data. So although you passed pretest, it can be a wrong answer. After pretest passed, you can lock the problem. It means you cannot change your answer and you can read other user's code. When you reading code, if someone's code have counterexample, you can enter counterexample and if the hacking attempt's successful, you can get 100point. but if it failed, you lose 50point. Can you understand? (sorry for my poor english)

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

Problem D looks similar to a recent task from TCO, except that the one from topcoder restrict the number of safe columns to exactly two.

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

--deleted--

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

A nice version of problem D: 1066F - Yet another 2D Walking.

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

Okay, why is E1 worth 2000 and E2 worth 1000? E1 is nothing but dumb coding that doesn't even require much thinking from my perspective, while E2 is a beautiful (in my opinion) and hard problem.

Subtasks are getting a bit annoying on CF :(

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

Even though I may not have solved most of the problems, I quite enjoyed the contest. The questions were challenging and intriguing at the same time.

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

Can anyone recommend some problems to solve to develop skills to solve problems like B ?

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

A, B and C are too easy and D was too tough I think this contest just focuses on speed.

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

SPatrik, can you explain to me why did you need this statement that knights are allowed to capture each other? Does it affect anything except solutions that fall as mine because the case was forgotten when I need to capture an opponent`s knight? And why was not it covered by pretests?

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

Are you kidding? A B C are too easy and D is so hard. it is not suitable as D.

For E & F , are you sure you were not make a kidding to us?

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

Thanks to SPatrik for problem C. The same problem was given to the participants of Lipetsk Municipal Olympiad and some participants who wanted to qualify for Sirius (December 2018) about one year ago. So, I had the same problem prepared in Polygon and you helped me realize that my testset wasn't full and some authors' solutions weren't right. Thank you very much :)

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

for god sake WA on C because of int overflow, Shame ._.

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

WOW fast system testing

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

Can someone help me find out why is this submission getting MLE? 58305730

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

I dont get why a lot of people failed to solve B.

can somebody explain

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

one should never overthink B otherwise, it cost him his rating

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

This is my last Div2 Round. But I was late in submitting E1 about 10 seconds so I missed the last chance to win in Div2. QAQ so sad....

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

My rating did not update. Why?

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

How this case could be "YES"? Problem B.

Test case 5 :

5

1000000000 1000000000 1000000000 1000000000 1000000000

Answer YES

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

can anyone help me finding error in this code

int main()
  {   
      ios_base::sync_with_stdio(false);
      cin.tie(0);
      cout.tie(0);            
      //std::setprecision(20);    
      int tests=1;
        //freopen("input.txt", "r", stdin);
     //  cin>>tests;
       
     while(tests--) 
      {   
        ll n,k;
        cin>>n>>k;
        ll a[n+1];
        for(int i = 1;i<=n;i++)
           cin>>a[i];
         a[0]  = 0;
        sort(a,a+n+1);
        ll i = (n+1)/2,j;
        j = i;
        ll median = a[i];
        for(j = i;j<n;j++){
          if(a[j+1] > a[j])
          {
            if(k >= (a[j+1]-a[i])*(j-i+1)){
                k = k-(j-i+1)*(a[j+1]-a[j]);
                //cout<<a[j]<<" ";
                median = a[j+1];
            }
            else{
                break;
            }
          }
        }
        if(k){
         // cout<<k;
          ll len = (j-i+1);
          median = median + k/len;
        }
        cout<<median;
 
      }
}
»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What wrong with me? It's second consecutive time I passed pretests and got wrong answer in system tests. It's not wrong approach, it is overflow integer. So sad for my rating.

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

How to solve E? Is it SG function or something else?

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

The code of neal’s problem D has a problem.In its last loop,safe_index might equal to safe.size(),and safe_col has random value.It might lead to “wrong answer”.(Sorry for my poor English)

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

Problem D:Could anybody tell me why I always fail on test 13? After reading the editorial,I found that my idea is correct.Maybe some details!

code:58360651