Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор KIMJONGOOF, история, 19 часов назад, По-английски

Problem Link -> https://codeforces.net/contest/776/problem/D

My submission -> https://codeforces.net/contest/776/submission/285238557

Its pretty obvious from my code what i am trying to do. My Question is that is the logic correct? Where am I going wrong?

I just take cases of whether the door is locked or not and accordingly I build the adj list for the corresponding switch combinations.

*Edit -> Resolved now.

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

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

very very hard

  • »
    »
    9 часов назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    so what do you want to express by writing this post

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

First thing , dont ever put the soln idea or hint in the title As here "2-SAT" either put it in spoiler

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

I just submitted with 2-sat and it got accepted , probably you not making the graph correctly refer to my solution for checking the edges

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

    Oh Ok. I'll check your solution

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

    Thanks! I got the mistake now.

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

    bro what is the full form of 2-sat, this seems like a completely new topic to me, is there any resource where I can learn it from?

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

      Ohk, i don't think you will able to understand it completely, possibly because you seem to not reached enough level to solve this. Let me give you an idea what is 2 sat: assume some boolean variables x1 x2 ... xk func : (kx | ky) & (kx2 | ky2) & ... ki : be any value of the variables We need to find if there is some assignment of these boolean variables such that the function evaluates to true For more: cses programmer handbook (google it, you will find the book)
»
5 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by KIMJONGOOF (previous revision, new revision, compare).