5-gon's blog

By 5-gon, history, 3 years ago, In English

What is the best way to practice CP? 1. I should practice problems rating wise and when I find a problem that involves a new algorithm, I should learn it, or.. 2. I should pick a algorithm and practise it until I master it

Which way is right? 1 or 2? And if I choose 1, should I practice the algorithm until I master it or should I just learn the basics and practice upto the difficulty level problems that I can handle? Again, if I choose 2, then when should I practice rating wise problems?

Full text and comments »

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

By 5-gon, history, 3 years ago, In English

I was solving a problem in CF. So, I came up with an idea(don't know if it would work for sure)..I implemented the code. While I was testing the sample input..it successfully passed! But when I submit the problem, the sample didn't passed. Then I tested it in the CF custom testing but it showed me the same result that the sample test cases failed! But my editor showed me that all samples passed. So, I tested it on codechef editor & online c++ compiler. They showed me my test cases passed! Don't understand what happened! Is there any issue on CF compiler or testing?

Problem link: 701C - They Are Everywhere

My Code -> (https://ideone.com/8H7sXX)

The input - 7 bcAAcbc

The real output - 3

The output showed me — 2

Full text and comments »

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

By 5-gon, history, 4 years ago, In English

The Problem is --> The equation and my submission is -->118705334 I don't understand what's wrong and I did the find_all_solution code according to CP Algorithm. I am getting runtime error at test case 13. Can anyone help me?

Full text and comments »

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

By 5-gon, history, 4 years ago, In English

Can anyone help me with this problem --> Gift Dilemma I tried extended gcd but that didn't work out, someone please help me with the logic

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it