摘要:
D. Balanced String You are given a binary string $s$ (a binary string is a string consisting of characters 0 and/or 1). Let's call a binary string bal 阅读全文
摘要:
F1. Omsk Metro (simple version) This is the simple version of the problem. The only difference between the simple and hard versions is that in this ve 阅读全文
摘要:
Minimum Edge Weight Equilibrium Queries in a Tree There is an undirected tree with n nodes labeled from 0 to n - 1. You are given the integer n and a 阅读全文
摘要:
D. Sorting By Multiplication You are given an array $a$ of length $n$, consisting of positive integers. You can perform the following operation on thi 阅读全文
摘要:
C. Vika and Price Tags Vika came to her favorite cosmetics store "Golden Pear". She noticed that the prices of $n$ items have changed since her last v 阅读全文
摘要:
D. Imbalanced Arrays Ntarsis has come up with an array $a$ of $n$ non-negative integers. Call an array $b$ of $n$ integers imbalanced if it satisfies 阅读全文
摘要:
C. MEX Repetition You are given an array $a_1,a_2,\ldots, a_n$ of pairwise distinct integers from $0$ to $n$. Consider the following operation: consec 阅读全文
摘要:
B. Split Sort You are given a permutation$^{\dagger}$ $p_1, p_2, \ldots, p_n$ of integers $1$ to $n$. You can change the current permutation by applyi 阅读全文
摘要:
D. Matrix Cascade There is a matrix of size $n \times n$ which consists of 0s and 1s. The rows are numbered from $1$ to $n$ from top to bottom, the co 阅读全文
摘要:
2024-01-26 upd:这篇可以作废了,请移步至数位 dp 学习笔记(灵神模板),该博客介绍了递归的写法,会更容易理解与编写代码。 前言 最近学了一种新的数位dp的状态表示,打算应用到以前做过的数位dp的题目。如果我们对数$N$进行数位dp,以前的状态定义$f(i,j)$表示所有数位大小为$i 阅读全文