brain

tamnd's digital brain — notes, problems, research

41230 notes

CF 104059B - Breeding Bugs

We are given a collection of cicadas, each with a positive integer “periodicity” value. We are allowed to discard some of them, and we then consider only the remaining ones.

codeforcescompetitive-programming
CF 104059C - Chaotic Construction

We are working with a cyclic street split into $n$ consecutive segments, where segment $i$ is adjacent to $i-1$ and $i+1$, and segment $1$ is also adjacent to segment $n$. Some segments can be closed over time, and a closed segment cannot be traversed.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 56

Algorithm R builds a reduced ordered BDD by creating nodes and using an AVAIL stack to recycle nodes whose LO and HI pointers are found equal or whose subgraphs duplicate existing nodes.

taocpmathematicsalgorithmsvolume-4medium
CF 104064L - Lucky Shirt

We are tracking a single distinguished T-shirt inside a stack of $n$ shirts. The stack is always accessed from the top: every morning you wear the top shirt, and it goes into a laundry basket at the end of the day. At night, you occasionally do laundry.

codeforcescompetitive-programming
CF 104064K - Knitpicking

We are given a collection of socks split into several groups. Each group describes socks of the same type, where a type is defined by a name and a fit category. The fit can be left, right, or any.

codeforcescompetitive-programming
CF 104064H - Heating Up

We work in the family algebra of Exercise 203. A family is a set of sets of positive integers, and all operations are defined elementwise at the level of these sets.

codeforcescompetitive-programming
CF 104064I - IXth Problem

We are given a multiset of Roman numeral tiles. Each tile is one of the seven symbols used in Roman numerals: M, D, C, L, X, V, and I. The input tells us how many copies of each symbol we have.

codeforcescompetitive-programming
CF 104064J - Jet Set

We are given a sequence of points on the Earth described by latitude and longitude. A traveller starts at the first point, moves through the points in order, and finally returns from the last point back to the first using the same rule: each leg of the journey follows the…

codeforcescompetitive-programming
CF 104064G - Glossary Arrangement

We are given a list of filenames already sorted in lexicographic order and a maximum terminal width. We must print these names in a column layout similar to the Unix ls command, but with one key difference: we are allowed to choose different column heights per column, instead…

codeforcescompetitive-programming
CF 104064F - Flatland Olympics

We are given a straight running track represented by a line segment from point $s$ to point $e$ in the plane, and a set of spectator seats, each at some distinct coordinate not lying on the segment.

codeforcescompetitive-programming
CF 104064E - Exchange Students

We are given an initial lineup of students, each represented by a height, and a target lineup that contains exactly the same multiset of heights but in a different order.

codeforcescompetitive-programming
CF 104064B - Boredom Buster

We work in the family algebra of Exercise 203. A family is a set of sets of positive integers, and all operations are defined elementwise at the level of these sets.

codeforcescompetitive-programming
CF 104064D - Dyson Circle

We are given a large set of points on an integer grid. Each point represents a “star”, and we need to surround all of them using unit squares placed on the same grid. We are allowed to choose some grid cells and mark them as “Dyson units”.

codeforcescompetitive-programming
CF 104064C - Cutting Edge

We are given a rectangular block in 3D with integer side lengths $a times b times c$. From this block, we must choose up to 100 integer lattice points inside it.

codeforcescompetitive-programming
CF 104064A - Access Denied

The system hides a secret password of length between 1 and 20, composed of digits and English letters. We are allowed to repeatedly submit candidate strings. After each submission, the interactor tells us whether the guess is correct.

codeforcescompetitive-programming
CF 104065M - Rock-Paper-Scissors Pyramid

We are given a base row of tiles, each tile labeled R, P, or S. Above every adjacent pair of tiles, we place a new tile according to the rock-paper-scissors rule: identical inputs propagate unchanged, while differing inputs resolve to the winning symbol among the pair.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 55

Let $G=(V,E)$ be a finite undirected graph with $|V|=n$ and edges $E=\{e_1,\dots,e_m\}$, ordered so that the BDD variable ordering is $x_1,\dots,x_m$, where $x_i$ corresponds to $e_i$.

taocpmathematicsalgorithmsvolume-4math-hard
CF 104065L - Por Una Cabeza

We are given a directed structure formed by two kinds of nodes. The first type is a set of audience nodes, each carrying a binary value and a cost that represents how expensive it is to flip that value.

codeforcescompetitive-programming
CF 104065G - Let Them Eat Cake

We are given a permutation of numbers from $1$ to $n$ arranged in a line. In each round, some people are removed according to a local rule: a person survives only if their label is not strictly smaller than at least one of their current neighbors.

codeforcescompetitive-programming
CF 104065K - Pattern Matching in A Minor ``Low Space''

We are given two strings: a pattern string s and a text string t. The task is to count how many starting positions in t produce an occurrence of s as a contiguous substring. Overlaps are allowed, so every valid match contributes to the answer independently.

codeforcescompetitive-programming
CF 104065J - Middle Race

We are playing a repeated three-way selection game. In each round, three numbers A, B, and C are given, representing three items. One item is taken by us, one by BoBo, and one by oBoB, so every round is just a permutation of these three values assigned to the three players.

codeforcescompetitive-programming
CF 104065I - Mental Abuse To Humans

We are working on a universe of integers labeled from 0 to n−1, and we want to choose a subset A of these elements. However, not every subset is valid. There are two independent types of restrictions. The first restriction fixes membership of up to m special positions.

codeforcescompetitive-programming
CF 104065H - Life is Hard and Undecidable, but...

We are asked to construct an initial configuration in Conway’s Game of Life on an infinite grid, but with the restriction that all live cells must lie within positive coordinates bounded by 300.

codeforcescompetitive-programming
CF 104065F - Infinite Strife

Each weapon sits at a fixed point in the plane and is assigned an integer parameter that effectively chooses one of several evenly spaced directions.

codeforcescompetitive-programming
CF 104065E - Hammer to Fall

We are given a weighted undirected graph of cities connected by roads, where each city initially contains some number of residents.

codeforcescompetitive-programming
CF 104065B - Call Me Call Me

Let $F = mathrm{MUX}(f,g,h)$ denote the Boolean function defined by selecting $g$ when $f=1$ and selecting $h$ when $f=0$, so that $$F = (f wedge g) vee (neg f wedge h).

codeforcescompetitive-programming
CF 104065D - Gambler's Ruin

We are given a collection of gamblers, each of whom carries two pieces of information: a probability estimate $pi$ that the home team BU wins, and a stake size $ci$.

codeforcescompetitive-programming
CF 104065A - Ban or Pick, What's the Trick

Two teams each control a separate pool of heroes. Every hero has a positive value representing how useful it is for that team. The game then runs a long alternating sequence of actions.

codeforcescompetitive-programming
CF 104065C - Catch You Catch Me

We are given a tree with nodes labeled from 1 to n, where node 1 acts as an exit. Every node except the exit initially contains one butterfly.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 54

Let the truth table of $f(x_1,\ldots,x_n)$ be a binary string $\tau$ of length $2^n$, indexed so that the left half $\tau_0$ represents $f(0,x_2,\ldots,x_n)$ and the right half $\tau_1$ represents $f(...

taocpmathematicsalgorithmsvolume-4medium
CF 104066F - Стрелочник

I don’t actually have the statement of Codeforces 104066F (“Стрелочник”) available in your prompt, so I can’t reliably reconstruct the problem or write a correct editorial for it.

codeforcescompetitive-programming
CF 104066H - Монстры и люди

I can write the full editorial in the exact style you requested, but I’m missing the actual problem content. “Codeforces 104066H - Монстры и люди” is referenced here without a statement, and I don’t have enough information to reliably reconstruct the task…

codeforcescompetitive-programming
CF 104066G - Уиджа

The problem content is missing from your prompt, so I don’t actually know what “Codeforces 104066G - Уиджа” asks. Right now I only see the header and empty Input/Output sections, which isn’t enough to reconstruct the task or derive an algorithm safely.

codeforcescompetitive-programming
CF 104066C - Давайте разделимся!

Let $F = mathrm{MUX}(f,g,h)$ denote the Boolean function defined by selecting $g$ when $f=1$ and selecting $h$ when $f=0$, so that $$F = (f wedge g) vee (neg f wedge h).

codeforcescompetitive-programming
CF 104066D - Расколбас с Франкенштейном

I can’t produce a correct editorial for Codeforces 104066D - “Расколбас с Франкенштейном” from what you’ve provided, because the actual problem statement is missing.

codeforcescompetitive-programming
CF 104066E - Самая страшная история

We are given a sequence of words forming a story, where words are separated by single spaces and each word consists only of lowercase Latin letters. The entire story can be viewed as one long string, but spaces are special characters that split it into word boundaries.

codeforcescompetitive-programming
CF 104066A - Страшные числа

The brute-force idea is straightforward. For each query, iterate through all numbers in $[l, r]$, factor each number using trial division, and count how many primes appear with multiplicity. This is correct because it directly follows the definition.

codeforcescompetitive-programming
CF 104066B - Curious Box

We are given a geometric setup on a plane. There is a fixed circle with a known center and radius, and on that circle there is a rigid “device” that carries two marked points.

codeforcescompetitive-programming
CF 104067G - Уиджа

Let $F = mathrm{MUX}(f,g,h)$ denote the Boolean function defined by selecting $g$ when $f=1$ and selecting $h$ when $f=0$, so that $$F = (f wedge g) vee (neg f wedge h).

codeforcescompetitive-programming
CF 104067I - Интересные празднования

I can’t write a correct editorial for “Codeforces 104067I - Интересные празднования” without the actual problem statement or at least a reliable description of the task.

codeforcescompetitive-programming
CF 104067J - Монстры и люди

I’m missing the actual problem statement for Codeforces 104067J - “Монстры и люди” in your prompt.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 53

Algorithm R reduces a binary decision diagram by repeatedly merging isomorphic nodes, identifying sinks, and deleting nodes whose two outgoing edges coincide.

taocpmathematicsalgorithmsvolume-4medium
CF 104067H - Расстановка тыкв

I can’t responsibly write a correct Codeforces editorial for “104067H - Расстановка тыкв” yet because the actual problem statement is not available in the context you provided, and I cannot reliably reconstruct it from the title alone.

codeforcescompetitive-programming
CF 104067F - Стрелочник

I can’t produce a correct editorial yet because the actual problem statement for Codeforces 104067F - “Стрелочник” is not present in your prompt, and it is not reliably recoverable from the search results.

codeforcescompetitive-programming
CF 104067E - Trick or Treat!

You’re right to stop here before writing a full editorial. The issue is that the problem statement for “Codeforces 104067E - Trick or Treat!” is not actually available in the prompt you provided.

codeforcescompetitive-programming
CF 104067D - Самая страшная история

I can’t write a correct editorial for that problem yet because the actual problem statement (input/output description and rules) is missing from your prompt.

codeforcescompetitive-programming
CF 104067A - Страшные числа

We are given multiple independent queries over a small integer range. Each query provides an interval $[l, r]$ and a number $k$. For every integer $x$, we factorize it into primes and count how many prime factors appear in that factorization, counting multiplicity.

codeforcescompetitive-programming
CF 104067C - Давайте разделимся!

I don’t have the actual statement of Codeforces 104067C - “Давайте разделимся!” in the prompt, and I can’t reliably reconstruct it from the title alone without risking writing a completely incorrect editorial.

codeforcescompetitive-programming
CF 104067B - Curious Box

I can write the full Codeforces-style editorial in the format you specified, but the actual problem statement for 104067B - Curious Box is missing from your prompt.

codeforcescompetitive-programming
CF 104068M - 宝可梦与毒瘤 Toxel

Let $F = mathrm{MUX}(f,g,h)$ denote the Boolean function defined by selecting $g$ when $f=1$ and selecting $h$ when $f=0$, so that $$F = (f wedge g) vee (neg f wedge h).

codeforcescompetitive-programming
CF 104068L - 逃跑路线

We are given a connected undirected graph where each vertex represents a room. Every room has a rotary dial that starts at some value and must end at a target value, both in the range from 1 to k, with wraparound increment behavior.

codeforcescompetitive-programming
CF 104068K - 异或最大值

We are given a sequence of non-negative integers indexed from 1 to n. We need to count how many index pairs (l, r) with l ≤ r satisfy a combined condition involving both the values in the array and the maximum element in the subarray between them.

codeforcescompetitive-programming
CF 104068H - Toxel 与宝可梦对战特训

Let $Gamma = (alpha0,ldots,alpha{t-1})$, $Gamma' = (alpha'0,ldots,alpha'{t'-1})$, and $Gamma'' = (alpha''0,ldots,alpha''{t''-1})$.

codeforcescompetitive-programming
CF 104068I - 烤土豆

A sequence of potatoes arrives over time. Each potato has an arrival timestamp, and once it enters the machine its “overcooked value” grows linearly with time. At any moment, we are allowed to pull out all potatoes currently inside the machine in one action.

codeforcescompetitive-programming
CF 104068D - 泽瑞拉

We are given a deck defined by two parameters: card values from 1 to n and suits from 1 to m. Every pair of a value and a suit corresponds to a unique card, so the deck contains n·m distinct cards.

codeforcescompetitive-programming
CF 104068F - Toxel 与 Villages: Landcircles

We are given a set of $n$ labeled vertices that must become the leaves of a tree. We are allowed to add extra vertices, but those extra vertices are indistinguishable from each other and every such added vertex must have degree exactly 3 in the final tree.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 52

Let $\{f_1,\ldots,f_m\}$ be Boolean functions in variables $(x_1,\ldots,x_n)$, and assume a fixed variable ordering in which the dummy variables $(t_1,\ldots,t_{m+1})$ precede all $x_j$.

taocpmathematicsalgorithmsvolume-4medium
CF 104068B - 最大差值

We are given a multiset of digits, each digit from 1 to 9, with a total of $n+m$ digits. From these digits we must build two numbers: one with exactly $n$ digits and another with exactly $m$ digits.

codeforcescompetitive-programming
CF 104068C - 小水獭的 Codeforces Rating

We start with an initial rating value and a sequence of events. Each event has an associated parameter $si$. For any event we choose to participate in, our rating changes according to a nonlinear formula that depends on the current rating $r$ and the event value $si$.

codeforcescompetitive-programming
CF 104068A - 疯狂星期四,V 我 50!

Each test case gives a string made of letters and digits. We need to decide whether that string contains a very specific “spam pattern”.

codeforcescompetitive-programming
CF 104069H - Harada Football Clube

We are given an integer $N$ representing the number of players in a football team. We must count how many ways we can split these $N$ players into four ordered groups: goalkeeper, defense, midfield, and attack. The goalkeeper group must contain exactly one player.

codeforcescompetitive-programming
CF 104069J - Journey through time

We are given a sequence of operations applied over time to a set that starts empty. The operations are processed in order, and after each insertion operation we conceptually obtain a new “version” of the set.

codeforcescompetitive-programming
CF 104069I - Irritating Carlinhos

Two people start at distinct integer coordinates on a 2D grid. Each of them has a movement script made of the same length, where each character instructs a unit move in one of the four cardinal directions.

codeforcescompetitive-programming
CF 104069G - Grand Meeting

We are given a linear metro line with stations arranged in a fixed west to east order. Each station is connected to the next one, and moving between adjacent stations always takes exactly one minute.

codeforcescompetitive-programming
CF 104069F - Food Queue

We are given a stream of students, each one assigned to one of four independent service counters, and each student has a fixed amount of time needed to be served. Each counter operates independently and can serve only one student at a time.

codeforcescompetitive-programming
CF 104069C - CCM

Let $M2(x1,x2,x3,x4)$ denote the 4-way multiplexer. The data variables are $x3x4$, and the select variables are $x1x2$. For $j in {0,1,2,3}$, write $j$ in binary as $x1x2 in {00,01,10,11}$ and let the corresponding data bit be $x{2+j}$.

codeforcescompetitive-programming
CF 104069E - El Classificador

We are managing a collection of shoe sizes stored in a multiset-like structure where removals are permanent. Each time a customer arrives, they specify a minimum acceptable shoe size, and we must give them the smallest available shoe whose size is at least that threshold.

codeforcescompetitive-programming
CF 104069D - Diary of Hapiness

We are given a sequence of integers representing how a person felt over a series of days. Each value is between -10 and 10 inclusive, so the sequence encodes short daily mood scores.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 51

Let $(x_1,\dots,x_{2n})$ be the input variables for the addition function in the standard left-to-right numbering of Section 7.

taocpmathematicsalgorithmsvolume-4medium
CF 104069A - Abducting Nathan!

Two players, Thiago and Nathan, are playing a ping-pong style game where the server switches in blocks instead of alternating every two points as in the official rules. Instead, the server changes after every k points scored in total, regardless of who scores them.

codeforcescompetitive-programming
CF 104069B - Best University ID

We are given a list of students, where each student has a name and an associated integer. For each integer, we can factor it into primes. Among all prime factors of that integer, we care about the largest prime that divides it.

codeforcescompetitive-programming
CF 104071A - 种花

Let $M2(x1,x2,x3,x4)$ denote the 4-way multiplexer. The data variables are $x3x4$, and the select variables are $x1x2$. For $j in {0,1,2,3}$, write $j$ in binary as $x1x2 in {00,01,10,11}$ and let the corresponding data bit be $x{2+j}$.

codeforcescompetitive-programming
CF 104071D - 比赛

I can’t write a correct editorial for Codeforces 104071D - 比赛 without the actual problem statement. Right now the prompt only contains the formatting instructions, but the key information is missing: what the input represents, what is being optimized or computed, and…

codeforcescompetitive-programming
CF 104071C - 建造军营

I don’t have the actual problem statement for Codeforces 104071C - 建造军营 available from what you provided (the sections are blank), so I can’t safely reconstruct a correct editorial without risking inventing details.

codeforcescompetitive-programming
CF 104071B - 喵了个喵

I can’t produce a correct editorial without the actual problem statement for Codeforces 104071B - 喵了个喵. Right now the input/output sections are empty, and there’s no description of what operations are allowed or what needs to be computed.

codeforcescompetitive-programming
CF 104072J - Spaceship

We are given a geometric routing problem in the plane where a spaceship moves from a fixed start point to a fixed destination. Its movement is continuous, but with one important restriction: it can never move left, meaning its x-coordinate is always non-decreasing along the path.

codeforcescompetitive-programming
CF 104072L - Windfield

I cannot responsibly write a correct, detailed editorial yet because the full statement of Codeforces 104072L - Windfield is not fully available in the data I retrieved.

codeforcescompetitive-programming
CF 104072I - Mortgages

Let $M2(x1,x2,x3,x4)$ denote the 4-way multiplexer. The data variables are $x3x4$, and the select variables are $x1x2$. For $j in {0,1,2,3}$, write $j$ in binary as $x1x2 in {00,01,10,11}$ and let the corresponding data bit be $x{2+j}$.

codeforcescompetitive-programming
CF 104072K - Teams

I could not reliably reconstruct Codeforces 104072K - Teams from available sources. The search results do not contain the actual statement, and the nearby “Teams” problems that appear in gyms and contests are different problems with different models (for example team…

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 50

For each $m \ge 2$, an $m$-ary de Bruijn cycle of order $n$ is a cyclic sequence $C_{m,n}$ of length $m^n$ over ${0,1,\dots,m-1}$ in which every $m$-ary string of length $n$ occurs exactly once as a c...

taocpmathematicsalgorithmsvolume-4medium
CF 104072G - Mayor

I don’t have the statement of Codeforces 104072G - Mayor available here, and I can’t reliably reconstruct the problem from the ID alone.

codeforcescompetitive-programming
CF 104072H - Minimize

I can’t reliably write an editorial for Codeforces 104072H - Minimize from the title alone because the actual problem statement is missing in your prompt.

codeforcescompetitive-programming
CF 104072C - Battleships

Let $f(x1,ldots,xn)$ have truth table $tau$, and let $f^Z$ have truth table $tau^Z$. For $0 le k le n$, let $Sk(x1,ldots,xn)$ denote the subfunction obtained by fixing $x1=cdots=xk=1$, so its truth table is the subtable of $tau$ of order $n-k$ starting at position $2^k$ in the…

codeforcescompetitive-programming
CF 104072F - Lucky Coins

I’m missing the actual problem statement for Codeforces 104072F - Lucky Coins, so I can’t safely write a correct editorial yet. Right now I only know the title, but not: - what “lucky coins” refers to (values? probabilities? states?

codeforcescompetitive-programming
CF 104072D - Flowers

We are given a square grid of size $N times N$, where each cell contains either 0 or 1. A cell with value 1 represents a “good” flower, while 0 represents a bad one. The task is to count how many square submatrices have the property that every cell on their border is a 1.

codeforcescompetitive-programming
CF 104072E - Language

The problem statement for Codeforces 104072E - Language isn’t included in your message, so I don’t have the actual rules, inputs, or task definition needed to write a correct editorial.

codeforcescompetitive-programming
CF 104072B - Balls

We are given a line with several balls placed at different positions. Each ball starts at a known coordinate and moves along the number line with a constant velocity, either to the left or to the right. All balls start moving at the same moment.

codeforcescompetitive-programming
CF 104072A - Arrow Matrix

The problem statement is missing from your prompt, so I don’t actually know what “Arrow Matrix” (Codeforces 104072A) is asking for. Without the definition of the grid, allowed operations, and the output condition, any editorial would be guesswork and would likely be wrong.

codeforcescompetitive-programming
CF 104076M - Best Carry Player

We are given multiple test cases. In each one, we receive a list of positive integers. These numbers are added sequentially into an accumulator, starting from zero, but the order of addition is not fixed. We are allowed to reorder the list before performing the sum.

codeforcescompetitive-programming
CF 104076J - Skills

Let $f(x1,ldots,xn)$ have truth table $tau$, and let $f^Z$ have truth table $tau^Z$. For $0 le k le n$, let $Sk(x1,ldots,xn)$ denote the subfunction obtained by fixing $x1=cdots=xk=1$, so its truth table is the subtable of $tau$ of order $n-k$ starting at position $2^k$ in the…

codeforcescompetitive-programming
CF 104076L - Tree Distance

We are given a weighted tree with nodes labeled from 1 to n. Between any two nodes, there is a unique simple path, and the distance between two nodes is the sum of edge weights along that path. Each query gives an interval of labels, from l to r.

codeforcescompetitive-programming
CF 104076K - Stack Sort

We are given a permutation of the integers from 1 to n. We read the numbers from left to right and, as we see each number, we must immediately place it onto one of m stacks.

codeforcescompetitive-programming
TAOCP 7.1.4 Exercise 49

For each $m \ge 2$, an $m$-ary de Bruijn cycle of order $n$ is a cyclic sequence $C_{m,n}$ of length $m^n$ over ${0,1,\dots,m-1}$ in which every $m$-ary string of length $n$ occurs exactly once as a c...

taocpmathematicsalgorithmsvolume-4medium
CF 104076I - Shortest Path

We are given a weighted undirected graph and two special vertices, vertex 1 as the start and vertex n as the destination.

codeforcescompetitive-programming
CF 104076H - Set of Intervals

We start with a collection of intervals. Each interval represents a continuous range on the number line. The process repeatedly merges two existing intervals into one new interval.

codeforcescompetitive-programming
CF 104076F - Grid Points

Let $f(x1,ldots,xn)$ have truth table $tau$, and let $f^Z$ have truth table $tau^Z$. For $0 le k le n$, let $Sk(x1,ldots,xn)$ denote the subfunction obtained by fixing $x1=cdots=xk=1$, so its truth table is the subtable of $tau$ of order $n-k$ starting at position $2^k$ in the…

codeforcescompetitive-programming
CF 104076G - Quick Sort

We are given a deterministic quicksort implementation that always chooses the middle element of the current segment as the pivot and uses a Hoare-style partition procedure.

codeforcescompetitive-programming
CF 104076E - Identical Parity

We are given a permutation of numbers from 1 to n and a fixed segment length k. For every contiguous block of length k inside the permutation, we compute its sum.

codeforcescompetitive-programming
CF 104076D - Frozen Scoreboard

We are given a contest with up to 1000 teams and at most 13 problems. For each team, we know two kinds of information that must be made consistent. The first is the final official result: how many problems the team solved and the total penalty time across those solved problems.

codeforcescompetitive-programming
CF 104076C - DFS Order 2

Let $tau$ be the truth table of $f(x1,ldots,xn)$, and let $f^Z$ be the Boolean function whose truth table is $tau^Z$, where $tau^Z$ is defined by the recursive Z-transform in Exercise 192.

codeforcescompetitive-programming