Naaz's blog

By Naaz, history, 11 months ago, In English

Hello, I most fail to solve a specific type of question in all platforms. Like 1840B - Бинарная кофейня. or this codechef question

It's not with the tags that i am concerned with rather the type of questions where we are required to output values in straight forward (O(1)) type computation. Like deriving a formulate and few base cases. So please if you have some suggestions for these type of questions please help me out.

Happy Coding.

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

For the Binary Cafe -> I solved using bitmasks. My other friends solved in different ways.

For 2nd one I solved it using brute force O(N*M) iterating over all possible of N*M pairs.

If you have an idea of over bit mask then you can solve the first one. There are other ways too to solve Binary Cafe problem.

For 2nd Codechef problem, once you write equations in your notebook you will get an idea how it can be solved.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    In the second problem, you can just output YES if difference is even and NO otherwise.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah Thats so true. I solved both of them in contest eventually. But can you suggest which tag or filter should i apply to find questions like these.

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      In my opinion "Math" is usually always a tag in such cases.

      • »
        »
        »
        »
        11 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Oh kk , Ill surely look into this.