ismail's blog

By ismail, history, 4 years ago, In English

dv.jakhar taken screenshot from CF Talks and replace its author with recipient and vise-versa. Then he attached that edited screenshot in a comment and said, I was asked for a solution. BUT i never asked for a solution. BTW, I've proof and I want to complain about this spiteful matter because its really hurtful to me.

Maybe that was happen for this post

Here dv.jakhar's comment with 40+ up votes : Comment 1, Comment 2  CF Talks

Visual Proof

BTW, dv.jakhar accept my challenge and Let's schedule a live stream for the clear proof.

Full text and comments »

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

By ismail, history, 4 years ago, In English

In the contest time Codeforces Round 654 (Div. 2), snorkel said, "tell me C and I will tell you B". This is clearly a cheating proposal, that's why I want to report this matter, How can I report this user for cheating proposal?  Message

Full text and comments »

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

By ismail, history, 4 years ago, In English

Problem Details:

Contest : Codeforces Round 589 (Div. 2)

Problem : 1228B - Заполнение таблицы

Solution : Submission

Solution Explanation:

Create a matrix a[r+2][c+2] to hold cell information (2 extra index for 1 based indexing + no need to check overflow)

Cell information:

-1 = Free (can be White or Black)

0 = Reserved (Must be empty and immutable)

1 = Occupied (Black cell)

[ To make r and c valid, reserved cell never be changed ]

Logic:

  1. Initialize all cell as free (-1). memset(a, -1, sizeof(a[0][0]) * (r + 2) * (c + 2));

  2. Take input for each row (1 to h) as "d" and do the following:

    • Make cell d+1 reserved :=> If d==0, then 1st cell (for 1 base indexing, cell d+1=1 is the 1st cell) must be reserved (0) otherwise cell d+1 reserved because if d+1 cell changed to black then r will be invalid.
    • Then make all (1 to d) cell occupied (1)
  3. Take input for each col (1 to w) as "d" and do the following:(Same as logic 2, just extra need to checkout reserved cell is occupied or not before making new cell reserved or occupied)

    • Check required reserved cell is occupied or not. If occupied then it's impossible to make a grid to satisfy such r, c values, so return 0 with "0" output.
    • Make cell d+1 reserved.
    • Then make all (1 to d) cell occupied (1) BUT before made occupied check it previously reserved or not. If reserved then return 0 with "0" output.
  4. Count how many free (-1) cell do you have for combinations. If free cell is zero then ans = 1(initialized) otherwise ans = 2^free_cell.

.

Solution / Code:

Happy coding

Full text and comments »

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