brain

tamnd's digital brain — notes, problems, research

43815 notes

CF 103409K - Tax

I can write the full editorial in exactly the style you want, but I’m missing the actual problem statement for Codeforces 103409K - Tax.

codeforcescompetitive-programming
CF 103409J - Suffix Automaton

I can write the full editorial in exactly the style you requested, but I’m missing the actual problem statement for Codeforces 103409J - Suffix Automaton.

codeforcescompetitive-programming
CF 103409C - AC Automaton

Let $a{s+t-1}dots a1a0$ be the binary representation of an $(s,t)$-combination, so each $ai in {0,1}$ and $sum ai = t$. A rotation of a prefix of length $j+1$ is the transformation $$aj a{j-1}dots a0 ;leftarrow; a{j-1}dots a0 aj,$$ with all other digits unchanged.

codeforcescompetitive-programming
CF 103409H - Popcount Words

We are given several integer intervals, and for each interval we construct a binary string by looking at every integer inside it and writing down a single bit derived from that integer.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 22

Let the degree-$t$ combinatorial representation (57) of $N$ be written in the form N = \binom{c_t}{t} + \binom{c_{t-1}}{t-1} + \cdots + \binom{c_1}{1}, where

taocpmathematicsalgorithmsvolume-4math-medium
CF 103409I - PTSD

I don’t have the actual statement for Codeforces 103409I “PTSD” available from your prompt, and without it I can’t responsibly derive the algorithm, constraints, or edge cases.

codeforcescompetitive-programming
CF 103409G - Occupy the Cities

I don’t have the actual statement for Codeforces 103409G - Occupy the Cities in your prompt, and I can’t reliably reconstruct it from the title alone without risking inventing details.

codeforcescompetitive-programming
CF 103409F - Illuminations II

I can’t reliably write a correct editorial for Codeforces 103409F - Illuminations II because the actual problem statement (input, output, constraints, and rules) isn’t included in your message, and I don’t have it available to reconstruct safely.

codeforcescompetitive-programming
CF 103409D - Assumption is All You Need

I can’t write a correct editorial for this yet because the problem statement section is empty. “Codeforces 103409D - Assumption is All You Need” isn’t enough to reconstruct the task reliably, and guessing would very likely produce a wrong solution and a misleading…

codeforcescompetitive-programming
CF 103409B - A Plus B Problem

This is the classic integer addition task framed in a competitive programming setting. The input consists of one or more pairs of integers, and for each pair we are expected to compute their arithmetic sum and output it independently.

codeforcescompetitive-programming
CF 103409A - A Hero Named Magnus

I’m missing the actual problem statement for Codeforces 103409A (“A Hero Named Magnus”). Without the statement, I can’t reliably reconstruct the intended model, constraints, or solution path, and I’d risk inventing a completely different problem.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 21

The exercise cannot be completed as stated because the statement of “the alternating combination law (30)” is not included in the provided material.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.3 Exercise 20

Let $G$ be a graph with $m = 10^6$ edges, and let $K_t(G)$ denote the number of $t$-cliques in $G$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.3 Exercise 19

The binomial tree $T_n$ used in this section has $2^n$ nodes, each node corresponding to a binary string of length $n$, and $T_\infty$ is the limiting structure in which nodes correspond to all finite...

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.3 Exercise 18

Write $N$ in binary form N = (a_m a_{m-1}\dots a_0)_2 = \sum_{i=0}^m a_i 2^i.

taocpmathematicsalgorithmsvolume-4medium
CF 103409E - Buy and Delete

We are given a directed graph with up to 2000 vertices and at most 5000 potential directed edges. Each edge has a cost, and Alice can pick any subset of edges whose total cost does not exceed a budget.

codeforcescompetitive-programming
CF 103411J - Juggle Sort

The problem statement for “Codeforces 103411J - Juggle Sort” is missing from your prompt, so there isn’t enough information to derive the algorithm, constraints, or even the core task.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 17

Write $N$ in binary form N = (a_m a_{m-1}\dots a_0)_2 = \sum_{i=0}^m a_i 2^i.

taocpmathematicsalgorithmsvolume-4hm-medium
CF 103411L - AGTC Matrix

I can’t reliably write a correct editorial for Codeforces 103411L - AGTC Matrix because the actual problem statement is missing from your prompt.

codeforcescompetitive-programming
CF 103411F - Раздача Фибоначчи

Let $G$ be the graph whose vertices are all permutations of the multiset ${s0cdot 0,ldots,sdcdot d}$, with edges given by adjacent interchanges $aj a{j-1} leftrightarrow a{j-1} aj$. Let $N$ be the number of vertices of $G$, so $$N = frac{(s0+s1+cdots+sd)!}{s0!,s1!cdots sd!}.

codeforcescompetitive-programming
CF 103411K - Shark Attack

We are given a line with several squids placed at integer positions. There is a shark at another position and a single shelter at a fixed coordinate. Every squid wants to reach the shelter, and once it arrives there safely it is protected forever.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 16

Algorithm L lists the $t$-combinations $c_t \dots c_2 c_1$ of ${0,1,\dots,n-1}$ in lexicographic order, starting from $c_j = j-1$ for $1 \le j \le t$.

taocpmathematicsalgorithmsvolume-4math-medium
CF 103411I - Determine The Lap Length

I can’t write a correct editorial for this yet because the actual problem content is missing. Right now I only have the title “Determine The Lap Length”, but no description of what a “lap”, the input, or the required computation actually are.

codeforcescompetitive-programming
CF 103411H - Гипноз

The problem gives two square matrices of size $n times n$, where $n$ is even. Each matrix represents a “lock”, but the actual structure we care about is not the matrix itself but a decomposition of it into concentric rectangular cycles, or “rings”.

codeforcescompetitive-programming
CF 103411G - Карты, числа, два заклинания

We are given a sequence of cards, each carrying a non-negative integer value representing its power. We also have a stream of operations, where each operation is one of two possible transformations applied to every card in the sequence.

codeforcescompetitive-programming
CF 103411E - Empires

I can write the full editorial in the exact format you requested, but I’m missing the actual problem statement for Codeforces 103411E - Empires.

codeforcescompetitive-programming
CF 103411C - Всеобъемлющая Галактическая Магистральная Сеть

We are given a network of $n$ star systems connected by exactly $n-1$ bidirectional highways, forming a tree. Between any two systems there is exactly one simple path.

codeforcescompetitive-programming
CF 103411B - Код от сейфа

Let $G$ be the Cayley graph whose vertices are the $N$ permutations of the multiset ${s0cdot 0,dots,sdcdot d}$ and whose edges correspond to adjacent interchanges $a{deltak}leftrightarrow a{deltak-1}$.

codeforcescompetitive-programming
CF 103411D - ДНК-палиндром

We are given a string over the alphabet {A, C, G, T} that represents a DNA strand. Each character has a fixed complement: A pairs with T, and C pairs with G.

codeforcescompetitive-programming
CF 103411A - Дистанционное обучение

We are organizing online classes using a fixed number of video conferences. Each conference has a hard cap on total participants, and inside every conference a fixed number of seats must be reserved for teachers. The remaining seats, if any, can be filled by students.

codeforcescompetitive-programming
CF 103414I - Third Group Exam

Let $G$ be the Cayley graph whose vertices are the $N$ permutations of the multiset ${s0cdot 0,dots,sdcdot d}$ and whose edges correspond to adjacent interchanges $a{deltak}leftrightarrow a{deltak-1}$.

codeforcescompetitive-programming
CF 103414K - Work or Sleep!

Let the multiset be ${s0 cdot 0,; s1 cdot 1,; ldots,; sd cdot d}, qquad s0 + s1 + cdots + sd = n.$ Let $V$ be the set of all distinct permutations of this multiset.

codeforcescompetitive-programming
CF 103414L - Permutation Transformation

I can write the full editorial in the exact format you requested, but I’m missing the actual problem statement for Codeforces 103414L - Permutation Transformation.

codeforcescompetitive-programming
CF 103414J - Computational ethnography

I can’t reliably write a correct editorial for “CF 103414J - Computational ethnography” because the actual problem statement (input/output definition and constraints) is missing from your prompt.

codeforcescompetitive-programming
CF 103414A - Friendly Rooks

Let the multiset be ${s0 cdot 0,; s1 cdot 1,; ldots,; sd cdot d}, qquad s0 + s1 + cdots + sd = n.$ Let $V$ be the set of all distinct permutations of this multiset.

codeforcescompetitive-programming
CF 103414H - Octopus Game

I’m missing the actual core of the task statement in your prompt, and without it I can’t produce a correct Codeforces editorial. The page I can access only shows the problem title and samples, not the full rules in a reliable structured way.

codeforcescompetitive-programming
CF 103414G - Maximaze XOR sum

The problem statement for Codeforces 103414G - Maximaze XOR sum is missing from your message, so I can’t reconstruct the actual task, constraints, or required algorithm yet.

codeforcescompetitive-programming
CF 103414F - Race

I’m missing the actual statement of Codeforces 103414F - Race in your prompt. Right now, the problem section is empty, so I don’t have enough information to correctly derive: - what the input represents, - what the output should compute, - or what algorithmic structure is…

codeforcescompetitive-programming
CF 103414E - Haiku

I’m missing the actual statement of Codeforces 103414E - Haiku, so I can’t safely derive the solution or write a correct editorial. Right now the only thing provided is the template, but no description of what the input/output means, constraints, or task definition.

codeforcescompetitive-programming
CF 103414B - Guess the Array

I can’t reliably write a correct editorial for this yet because the actual problem statement for Codeforces 103414B - “Guess the Array” isn’t included.

codeforcescompetitive-programming
CF 103414D - Army of Clones

I can’t write a correct editorial for this yet because the actual problem statement is missing. Right now I only see the title “Army of Clones”, but none of the key details: what the clones are, what operations are allowed, what the input describes, or what needs to be…

codeforcescompetitive-programming
CF 103414C - Moving Cells

I’m missing the actual problem statement for Codeforces 103414C - Moving Cells, so I can’t reliably reconstruct the task, constraints, or intended solution path.

codeforcescompetitive-programming
CF 103415J - Cafeteria

Let the multiset be ${s0 cdot 0,; s1 cdot 1,; ldots,; sd cdot d}, qquad s0 + s1 + cdots + sd = n.$ Let $V$ be the set of all distinct permutations of this multiset.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 15

Let $A$ be a family of $t$-combinations, and let $\partial A$ denote its shadow, the family of all $(t-1)$-combinations contained in members of $A$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.3 Exercise 14

Let $n = s + t$ and consider a binary string $a_{n-1}\dots a_0$ representing an $(s,t)$-combination, where exactly $t$ entries are $1$.

taocpmathematicsalgorithmsvolume-4hard
CF 103415K - Magus Night

Let $sigma$ and $tau$ be the two involutions on permutations of ${1,2,dots,n}$ given by adjacent transpositions on disjoint parity classes, in the standard TAOCP σ-τ framework, so that every step of a σ-τ walk applies either $sigma$ or $tau$, and each application changes…

codeforcescompetitive-programming
CF 103415L - Dynamic Convex Hull

We are maintaining a growing set of points in the plane. The structure starts empty and receives operations over time. Each operation is either the insertion of a new point or a query that asks for the point in the current set that is most extreme in a given direction.

codeforcescompetitive-programming
CF 103415I - Pudding Store

The problem statement section is empty, so there isn’t enough information to write a correct Codeforces-style editorial yet.

codeforcescompetitive-programming
CF 103415B - Sweeping Robots

Let $sigma$ and $tau$ be the two involutions on permutations of ${1,2,dots,n}$ given by adjacent transpositions on disjoint parity classes, in the standard TAOCP σ-τ framework, so that every step of a σ-τ walk applies either $sigma$ or $tau$, and each application changes…

codeforcescompetitive-programming
CF 103415F - Cactus

We are given a connected undirected graph that is guaranteed to be a cactus, meaning every edge belongs to at most one simple cycle. Some edges behave like tree edges, cutting them disconnects the graph, while others lie on exactly one simple cycle.

codeforcescompetitive-programming
CF 103415H - Three Integers

The problem statement section is empty, so there isn’t enough information to derive the solution or write a correct editorial for “Codeforces 103415H - Three Integers”. Right now I don’t know what the input represents, what is being asked, or even the constraints.

codeforcescompetitive-programming
CF 103415G - Slope

The problem statement is missing from your prompt (it’s blank under “Problem Statement”), so I don’t have enough information to reconstruct what Codeforces 103415G - Slope actually asks.

codeforcescompetitive-programming
CF 103415D - Unnamed Easy Problem

I can’t write a correct editorial yet because the actual problem statement is missing. Right now I only see the title “Codeforces 103415D - Unnamed Easy Problem”, but no description of the input, output, or what is being asked.

codeforcescompetitive-programming
CF 103415E - Mathlab

The problem statement section is empty, so there isn’t enough information to reconstruct what “Mathlab” (CF 103415E) is asking for.

codeforcescompetitive-programming
CF 103415A - Math Ball

I cannot reliably reconstruct Codeforces 103415A “Math Ball” from the information available in the problem stub you provided.

codeforcescompetitive-programming
CF 103415C - Necklace

I don’t have the actual statement of Codeforces 103415C - Necklace in your prompt, and I can’t reconstruct it reliably from the title alone without risking writing an incorrect editorial.

codeforcescompetitive-programming
CF 103416I - Restricted Track

Let $sigma$ and $tau$ be the two involutions on permutations of ${1,2,dots,n}$ given by adjacent transpositions on disjoint parity classes, in the standard TAOCP σ-τ framework, so that every step of a σ-τ walk applies either $sigma$ or $tau$, and each application changes…

codeforcescompetitive-programming
CF 103416J - Replace by sum

I can’t write a correct editorial for this yet because the actual problem statement for “103416J - Replace by sum” is missing from your prompt. Right now there is no definition of: what the array/structure is, what operation “replace by sum” means (neighbors? prefix?

codeforcescompetitive-programming
CF 103416H - Cheap Square

I’m missing the actual problem statement for Codeforces 103416H - Cheap Square, so I can’t safely derive or explain the solution yet.

codeforcescompetitive-programming
CF 103416G - Favorite Number

The problem statement for Codeforces 103416G - Favorite Number is missing from your prompt, so I don’t have enough information to write a correct editorial.

codeforcescompetitive-programming
CF 103416B - SNEK

Let $d ge 0$ and let $s0, dots, sd$ be nonnegative integers with total length $n = s0 + cdots + sd.$ Let $V$ be the set of all strings $an a{n-1} dots a1$ over the alphabet ${0,1,dots,d}$ such that each symbol $i$ occurs exactly $si$ times.

codeforcescompetitive-programming
CF 103416F - Delivery 2[D]

The problem statement is missing from your prompt, so I don’t have the actual task definition for Codeforces 103416F - Delivery 2[D]. Without the description, input/output format, and constraints, I can’t produce a correct editorial or derive the algorithm.

codeforcescompetitive-programming
CF 103416D - Delivery

The courier works on a rectangular grid where each cell is either blocked or usable. Movement is restricted to the four cardinal directions, and you can only traverse through usable cells.

codeforcescompetitive-programming
CF 103416E - Circular Graph

The problem statement section is empty, so there isn’t enough information to reconstruct what “Circular Graph” (Codeforces 103416E) is asking.

codeforcescompetitive-programming
CF 103416A - Planet Nine

I can’t write a correct editorial without the actual problem statement. Right now, the sections for Codeforces 103416A - Planet Nine are empty, so there’s no way to know what the task is (inputs, outputs, constraints, or intended solution).

codeforcescompetitive-programming
CF 103416C - Mura and love

I can’t produce a correct editorial for Codeforces 103416C - Mura and love because the problem statement is not included in your prompt, and I don’t have reliable access to reconstruct it.

codeforcescompetitive-programming
CF 103422C - Charity

Each vertex is a permutation of the multiset ${0,0,0,1,1,1}$, hence each vertex is uniquely represented by a strictly increasing triple $c3c2c1 quadtext{with}quad 5 ge c3 c2 c1 ge 0,$ where $cj$ are the positions of the $1$s in a binary string of length $6$.

codeforcescompetitive-programming
CF 103422B - Gorbachev Sort

We are given an array of values, where each value represents a “job difficulty” assigned to a person in a line.

codeforcescompetitive-programming
CF 103422A - MLCS

I can’t reliably write a correct editorial for “Codeforces 103422A - MLCS” because the actual problem statement is missing from your prompt.

codeforcescompetitive-programming
CF 103423B - Vacuum Cleaner

Each vertex is a permutation of the multiset ${0,0,0,1,1,1}$, hence each vertex is uniquely represented by a strictly increasing triple $c3c2c1 quadtext{with}quad 5 ge c3 c2 c1 ge 0,$ where $cj$ are the positions of the $1$s in a binary string of length $6$.

codeforcescompetitive-programming
CF 103423C - Birthday Nim

We are given several stacks of coins, each stack representing a pile with a fixed initial height. Two players play a turn-based game starting from these piles. On each turn, a player chooses some stacks and removes coins from them.

codeforcescompetitive-programming
CF 103423A - Bordered Subarrays

I don’t have the actual statement of Codeforces 103423A - Bordered Subarrays in your prompt, and I shouldn’t guess it because that would lead to a completely incorrect editorial.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 13

Let $\alpha$ be the $t$-combination $c_t \cdots c_1$ with $n > c_t > \cdots > c_1 \ge 0$, viewed as the $t$-element set ${c_1,\dots,c_t} \subseteq {0,1,\dots,n-1}$.

taocpmathematicsalgorithmsvolume-4medium
CF 103426A - Bananas Packing

Each vertex is a permutation of the multiset ${0,0,0,1,1,1}$, hence each vertex is uniquely represented by a strictly increasing triple $c3c2c1 quadtext{with}quad 5 ge c3 c2 c1 ge 0,$ where $cj$ are the positions of the $1$s in a binary string of length $6$.

codeforcescompetitive-programming
CF 103426E - Reconstructing Pairs

I can write the full editorial in the exact format you want, but the problem statement for CF 103426E - Reconstructing Pairs is missing from your prompt, and I can’t reliably infer it from the title alone without risking writing a completely incorrect solution.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 12

Let $[n]={1,2,\dots,n}$ and let $\mathcal{A}$ be a family of $r$-subsets of $[n]$ such that for all $\alpha,\beta\in\mathcal{A}$ one has $\alpha\cap\beta\neq\varnothing$.

taocpmathematicsalgorithmsvolume-4hm-hard
CF 103426B - Permutations

Each vertex is a permutation of the multiset ${0,0,0,1,1,1}$, hence each vertex is uniquely represented by a strictly increasing triple $c3c2c1 quadtext{with}quad 5 ge c3 c2 c1 ge 0,$ where $cj$ are the positions of the $1$s in a binary string of length $6$.

codeforcescompetitive-programming
TAOCP 7.2.1.3 Exercise 111

Let $[n]={1,2,\dots,n}$ and let $\mathcal{A}$ be a family of $r$-subsets of $[n]$ such that for all $\alpha,\beta\in\mathcal{A}$ one has $\alpha\cap\beta\neq\varnothing$.

taocpmathematicsalgorithmsvolume-4math-hard
CF 103426D - Fantastic Three

I can write the full editorial in the exact format you requested, but I am missing one critical piece: the actual problem statement of Codeforces 103426D “Fantastic Three”.

codeforcescompetitive-programming
CF 103426C - Equation

I can’t reliably write a correct editorial for this yet because the actual problem statement for Codeforces 103426C - Equation is missing from your prompt.

codeforcescompetitive-programming
CF 103427E - Edward Gaming, the Champion

We are given a single lowercase string and asked to count how many times a specific pattern, namely the string "edgnb", appears as a contiguous substring.

codeforcescompetitive-programming
CF 103427M - String Problem

We are given a single lowercase string. For every prefix of this string, we need to look at all possible contiguous substrings inside that prefix and pick the lexicographically largest one.

codeforcescompetitive-programming
CF 103427L - Perfect Matchings

We start with a complete graph on $2n$ vertices, so every pair of vertices is initially connected. Then we are given a set of $2n-1$ edges that form a tree, and those edges are removed.

codeforcescompetitive-programming
CF 103427K - Matrix Operations

We are working with an initially empty square grid of size $n times n$, where every cell starts at zero. Then we process exactly $n$ operations.

codeforcescompetitive-programming
CF 103427J - Luggage Lock

We are given a 4-digit lock. Each test case provides two states of this lock: a starting configuration and a target configuration. Each state consists of four digits in a fixed order, like a small array of length four.

codeforcescompetitive-programming
CF 103427I - Linear Fractional Transformation

We are given three input-output pairs of points on the extended complex plane, where each point is a complex number represented by its real and imaginary parts.

codeforcescompetitive-programming
CF 103427H - Line Graph Matching

We start with a connected undirected graph where each edge has a weight. From this graph, we construct another graph called the line graph. In this transformed graph, every original edge becomes a vertex.

codeforcescompetitive-programming
CF 103427G - Encoded Strings II

We are given a string of length $n$, where every character comes from a limited alphabet of size at most 20. From this string, we consider every nonempty subsequence.

codeforcescompetitive-programming
CF 103427F - Encoded Strings I

We are given a string of length $n$, and we look at every non-empty prefix of this string. For each prefix, we apply a deterministic transformation that depends on the positions of characters inside that prefix. The transformation works as follows.

codeforcescompetitive-programming
CF 103427D - Cross the Maze

We are given a small grid maze with dimensions up to 100 by 100, and inside this grid there are exactly n adventurers and n escape ropes. Each adventurer starts at a unique cell, and each rope is also placed at a unique cell.

codeforcescompetitive-programming
CF 103427C - Cards of Magic

We are simulating a turn-based fight where a monster starts with a given amount of health, and each turn you receive exactly one random card. The card is uniformly chosen among three types.

codeforcescompetitive-programming
CF 103427A - A Bite of Teyvat

We are given a sequence of circles placed one by one on a horizontal line. Each circle is fully determined by its center position on the x-axis and its radius, so every circle lies in the plane with center at $(xi, 0)$ and radius $ri$.

codeforcescompetitive-programming
CF 103488D - Diseased String

Let $q$ be a primitive $m$th root of unity and let $$N = n1 + cdots + nt.$$ Write each index in base $m$ form $$ni = m ai + ri,qquad 0 le ri < m,$$ and define $$A = a1 + cdots + at,qquad R = r1 + cdots + rt,$$ so that $N = mA + R$.

codeforcescompetitive-programming
CF 103488F - Future Vision

We are given a grid maze where some cells are walls and others are empty. A character starts from a fixed cell marked H at time zero and can move each minute to any of the four adjacent cells or stay in place. Movement is blocked by walls.

codeforcescompetitive-programming
CF 103488E - Equality

We are given an array and a fixed window size. In one move, we choose a contiguous segment of exactly length k and overwrite every element in that segment with the minimum value currently inside that segment.

codeforcescompetitive-programming
CF 103430E - Request Throttling

Let $q$ be a primitive $m$th root of unity and let $$N = n1 + cdots + nt.$$ Write each index in base $m$ form $$ni = m ai + ri,qquad 0 le ri < m,$$ and define $$A = a1 + cdots + at,qquad R = r1 + cdots + rt,$$ so that $N = mA + R$.

codeforcescompetitive-programming
CF 103430C - Athletes

We are given two independent groups of athletes, one group for sport A and one group for sport B. Each athlete has a numerical skill value, and every athlete must stay in their own sport unless we explicitly decide to “swap” them, meaning they compete in the other sport…

codeforcescompetitive-programming
CF 103428M - 810975

The problem statement is missing, so there’s no way to reconstruct the actual task, constraints, or required algorithm.

codeforcescompetitive-programming
CF 103428F - Stone

Let $q$ be a primitive $m$th root of unity and let $$N = n1 + cdots + nt.$$ Write each index in base $m$ form $$ni = m ai + ri,qquad 0 le ri < m,$$ and define $$A = a1 + cdots + at,qquad R = r1 + cdots + rt,$$ so that $N = mA + R$.

codeforcescompetitive-programming
CF 103428L - shake hands

The problem statement for Codeforces 103428L - shake hands is missing in your prompt (it’s empty after “Problem Statement / Input / Output”).

codeforcescompetitive-programming