DR.MANHATTAN's blog

By DR.MANHATTAN, 7 years ago, In English

Codeforces Round #417 (Div. 2)

  • Could not solve even a single problem ( got stuck on the 1st problem A. Sagheer and Crossroads, as I could not figure out the pattern, and hence brute forced the solution by writing verbose code, which eventually led to a wrong answer as I did not account for all the conditions )

  • Found the description of the problem confusing. Had to read it about 5-6 times, to really understand the question.

  • Later after the contest ended, I took my time and figured out the pattern in the question and coded up the solution quickly( without looking at the editorial ) and got it accepted.

I mean, it was this simple once you see the pattern... ~~~~~

re(i,4){ if(v2[i][3] ) {

       if((v2[i][0]||v2[i][1]||v2[i][2]) ||v2[(i+1)%4][0] || v2[(i+2)%4][1] ||v2[(i+3)%4][2] ){

         cout<<"YES\n";
         return 0;
       }
    }

}
cout<<"NO\n";

~~~~~

The rest of the questions were above my skill level.Even the 2nd question B. Sagheer, the Hausmeister had a DP solution with n*2^n complexity .. My My :-|

Reflection

  • Not all B problems are easy ( i.e just implementation ). Some can have involved concepts like DP. Problems C,D,E remain unsolvable due to lack of algorithm / D.S skill.

  • Think twice code once !!

  • Vote: I like it
  • -2
  • Vote: I do not like it