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

Автор redheadphone, 2 месяца назад, По-английски

I created this problem involving binary strings and have been thinking about putting it into a contest for some time, but it wasn't working out. So, I decided to post it here.


Problem Statement:

You are participating in a problem where an interactive judge holds n binary strings, each of length n. The value of n is such that (3 < n < 100). You do not know these binary strings, but you can interact with the judge using two types of operations:

  1. OR Operation: You can select two different bit positions (i1, j1) and (i2, j2) from any binary strings, and the judge will return the bitwise OR of the two bits at those positions.
  2. AND Operation: You can select two different bit positions (i1, j1) and (i2, j2) from any binary strings, and the judge will return the bitwise AND of the two bits at those positions.

You can perform at most 2 * n operations in total.

Your task is to find a new binary string of length n that is guaranteed not to be equal to any of the n binary strings that the judge holds.

Operations:

  • OR(i1, j1, i2, j2): This returns 1 if either bit (i1, j1) or bit (i2, j2) is 1. Otherwise, it returns 0.
  • AND(i1, j1, i2, j2): This returns 1 only if both bit (i1, j1) and bit (i2, j2) are 1. Otherwise, it returns 0.

Notes:

  • Bit Position: Bit positions are represented as (i, j), where i denotes the ith binary string, and j denotes the jth bit of the ith binary string. Both i and j range from 1 to n.

Полный текст и комментарии »

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

Автор redheadphone, история, 7 месяцев назад, По-английски

I stumbled upon an intriguing variation of Tic Tac Toe shared by Twitter user lobotosasha (link: https://twitter.com/lobotosasha/status/1779156359449072032). In this modified version, players face an additional challenge: they cannot mark more than three cells with their shape. If they mark a fourth cell, their first marked cell disappears.

So, is it possible for anyone to win this game if both players play optimally?

Assuming that you cannot mark the cell where your shape will disappear after your move, do you think victory is possible, or are we stuck in an eternal stalemate?

Let me know what you think!

Полный текст и комментарии »

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

Автор redheadphone, история, 21 месяц назад, По-английски

As a competitive programmer, you're probably looking for a way to showcase your skills and achievements to potential recruiters and fellow programmers. One effective method is to include your Codeforces profile stats in your github README.

This is where the Codeforces Readme Stats come in. This project, which I created, is a great tool that automatically generates beautiful statistics of your Codeforces profile, which can be added to your README to create a stunning profile that highlights your skills and achievements.

Project: https://github.com/RedHeadphone/Codeforces-readme-stats

Полный текст и комментарии »

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

Автор redheadphone, история, 2 года назад, По-английски

This has happened to me twice, where 1 index hashing is getting TLE but 0 index hashing with same logic is getting Accepted. Not sure if it's python issue or hashing complexity.

TLE — https://codeforces.net/contest/1701/submission/163370464

Accepted — https://codeforces.net/contest/1701/submission/163370574

TLE — https://codeforces.net/contest/1702/submission/163995656

Accepted — https://codeforces.net/contest/1702/submission/163996134

Полный текст и комментарии »

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