SashaT9's blog

By SashaT9, 4 months ago, In English

Recently, while working on some combinatorics, I stumbled upon an interesting identity. I haven't seen it mentioned before, so I decided to share it here (with the hope that someone will find it fascinating).

The identity

$$$\displaystyle \sum_{k=0}^{n}(-1)^k\binom{n}{k}(2^{n-k}-1)^m=\sum_{k=0}^{m}(-1)^k\binom{m}{k}(2^{m-k}-1)^n$$$

holds for $$$n, m \geq 1$$$.

We may apply it for specific $$$(n,m)$$$ and get interesting results. For example, $$$\displaystyle \sum_{k=0}^{n}(-1)^k\binom{n}{k}(2^{n-k}-1)=1$$$ holds because we use the original identity for $$$m=1$$$.

I encourage everyone to try to prove it by themselves before reading my proof.

Proof
Corollaries

If you have other proofs of this identity, I would gladly read about them in the comments.

Full text and comments »

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

By SashaT9, 8 months ago, In English

We thank everyone who participated in the round.

1968A - Maximize?

Author: SashaT9

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem

1968B - Prefiquence

Author: FBI

Hint 1
Solution
Implementation
Rate the problem

1968C - Assembly via Remainders

Author: SashaT9

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem

1968D - Permutation Game

Author: FBI

Hint 1
Hint 2
Solution
Implementation
Rate the problem

1968E - Cells Arrangement

Author: SashaT9

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem

1968F - Equal XOR Segments

Author: SashaT9

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Implementation
Rate the problem

1968G1 - Division + LCP (easy version)

Author: SashaT9

Hint 1
Hint 2
Solution
Implementation
Rate the problem

1968G2 - Division + LCP (hard version)

Author: SashaT9

Hint 1
Hint 2
Solution
Implementation
Rate the problem

Full text and comments »

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

By SashaT9, 8 months ago, In English

Hello everyone,

FBI and SashaT9 are very exited to invite you to Codeforces Round 943 (Div. 3)! It starts on May/02/2024 17:45 (Moscow time).

The format of the event will be like any Div. 3 rounds:

  • 6-8 tasks;
  • ICPC rules with a penalty of 10 minutes for an incorrect submission;
  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points);
  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests.

Only trusted participants of the third division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600 (or you are a newcomer/unrated), then the round will be rated for you.

We would like to thank:

Good luck and have fun!

UPD: Editorial.

Full text and comments »

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

By SashaT9, 16 months ago, In English

Hello everyone!

I invite you to the contest where I authored all the problems. There are tasks that couldn't make it to the Official Codeforces Round. But they are still not that bad :)

I hope you enjoy the problems. Thanks for participating!

If you have any feedback or suggestions, please feel free to leave them in the comments. Your feedback will help improve my future contests.

UPD: My apologies! The author's idea for problem D was incorrect. I hope that the solution is now correct. All the submissions for this problem were rejudged, and three samples were added.

UPD2: Problem D has been hopefully fixed. Many thanks to Yam for detecting and correcting the problem.

Full text and comments »

Announcement of SashaT9 Contest 1
  • Vote: I like it
  • +61
  • Vote: I do not like it

By SashaT9, history, 17 months ago, In English

1857A - Array Coloring

Author: SashaT9, prepared: SashaT9, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

1857B - Maximum Rounding

Author: SashaT9, prepared: FBI, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

1857C - Assembly via Minimums

Author: SashaT9, prepared: SashaT9, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

1857D - Strong Vertices

Author: Pa_sha, prepared: SashaT9, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

1857E - Power of Points

Author: SashaT9, prepared: SashaT9, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

1857F - Sum and Product

Author: Pa_sha, prepared: Pa_sha, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

1857G - Counting Graphs

Author: SashaT9, prepared: SashaT9, Skillful_Wanderer

Tutorial
Code C++
Code Python
Rate the problem

Full text and comments »

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

By SashaT9, 18 months ago, In English

Many thanks to miaowtin and FBI for their invaluable help and support in the preperation of this blog. Unfortunately, this blog is not currently completed, but we encourage everybody to share their solutions to these and other problems of the section in comments. And last but not least thanks to pllk for maintaining CSES.

Shortest Subsequence

Prerequisites
Tutorial
Implementation

Swap Game

Prerequisites
Tutorial
Implementation

Prüfer Code

Prerequisites
Tutorial
Implementation

Acyclic Graph Edges

Prerequisites
Tutorial
Implementation

Multiplication Table

Prerequisites
Tutorial
Implementation

Advertisement

Prerequisites
Tutorial
Implementation

Special Substrings

Prerequisites
Tutorial
Implementation

Maximum Xor Subarray

Prerequisites
Tutorial
Implementation

Movie Festival Queries

Prerequisites
Tutorial
Implementation

Binary Subsequences

Prerequisites
Tutorial
Implementation

Programmers and Artists

Prerequisites
Tutorial

Bit Substrings

Prerequisites
Tutorial
Implementation

Full text and comments »

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