#data structures
CF 958C3 - Encryption (hard) Rating: 2500 Tags: data structures, dp Model: gpt-5-3-mini Solve time: 4m 21s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a339db1-3c50-83ec-9b14-c27aeee268ad Solution Problem Understanding We are given a long sequence of positive integers and asked to cut it into exactly k contiguous segments. Each segment must be non-empty and every element must belong to exactly one segment. For any segment, we compute its sum, then reduce that sum...
CF 983D - Arkady and Rectangles Rating: 3300 Tags: data structures Model: gpt-5-3-mini Solve time: 3m 22s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a33a72f-4124-83ec-bf18-f5d71d97cab4 Solution Problem Understanding We are given a plane that starts completely white, meaning every point initially has color 0. Then we place up to 100,000 axis-aligned rectangles one after another. Each rectangle is painted with a unique color equal to its index in the input order, and...
CF 960F - Pathwalks Rating: 2100 Tags: data structures, dp, graphs Model: gpt-5-3-mini Solve time: 4m 24s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a33a06c-a550-83ec-baf9-e569323b4a6a Solution Problem Understanding We are given a directed graph where each edge has an associated weight and also an implicit position given by its order in the input. A valid path is not constrained to be simple; vertices may repeat, and we may traverse edges multiple times...
CF 1070E - Getting Deals Done Rating: 2100 Tags: binary search, data structures Model: gpt-5-3-mini Solve time: 1m 33s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a33bee1-54b8-83ec-8078-dc30aeae57f9 Solution Problem Understanding We are given a sequence of tasks, each with a processing time. Polycarp scans tasks from left to right and decides whether to execute or skip each one based on a threshold value $d$. Any task with duration greater than $d$ is...
CF 932B - Recursive Queries Rating: 1300 Tags: binary search, data structures, dfs and similar Model: gpt-5-3-mini Solve time: 1m 34s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a32e3b7-e7dc-83ec-a17b-6d7184217e41 Solution Problem Understanding We are given a function defined on positive integers that repeatedly transforms a number by taking its digit product and then collapsing it again in a recursive way until a single digit remains. That final digit is what we call...
CF 960H - Santa's Gift Rating: 3100 Tags: data structures, trees Model: gpt-5-3-mini Solve time: 1m 41s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a33a0ca-b98c-83ec-bcc1-c68b68835be7 Solution Problem Understanding We are working on a rooted tree where each vertex contains exactly one candy, and each candy has a flavour. The tree structure is fixed, but the flavours change over time through updates. For a fixed flavour $k$, imagine we repeatedly pick a vertex...
CF 930D - Game with Tokens Rating: 2500 Tags: data structures, games, implementation Model: gpt-5-3-mini Solve time: 1m 49s Verified: yes (1/1 samples) Share: https://chatgpt.com/share/6a32759f-eca8-83ec-8ce0-6915f5e36d45 Solution Problem Understanding We are given a set of black tokens placed at distinct integer grid points. There is also a single white token whose starting position is not fixed. The game proceeds in alternating turns: white moves first, and on each turn a player...
CF 1322E - Median Mountain Range Rating: 3300 Tags: data structures Model: gpt-5-3-mini Solve time: 3m 56s Verified: yes (1/1 samples) Share: https://chatgpt.com/share/6a2debd3-ee88-83ec-81ed-e884ff76ac48 Solution Problem Understanding We are given an array representing heights placed along a straight line. Each day, every interior position updates simultaneously: a position looks at itself and its two neighbors, takes the median of those three values, and becomes that median in the next configuration. The...
CF 1322B - Present Rating: 2100 Tags: binary search, bitmasks, constructive algorithms, data structures, math, sortings Model: gpt-5-3-mini Solve time: 1m 28s Verified: yes (1/1 samples) Share: https://chatgpt.com/share/6a2deae4-fc9c-83ec-aeba-66f8cbbf4563 Solution Problem Understanding We are given an array of integers, and we consider every unordered pair of distinct elements. For each pair, we compute their sum. After collecting all these pairwise sums, instead of summing or minimizing them, we combine them using...
CF 1320E - Treeland and Viruses Rating: 3000 Tags: data structures, dfs and similar, dp, shortest paths, trees Model: gpt-5-5 Solve time: 7m 20s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a2de8a4-e50c-83ec-a13a-1c80b9179d39 Solution Problem Understanding The process happens on a tree of cities. In each scenario, several infection sources are placed on different nodes, each source belonging to a distinct virus type and having a propagation strength. Viruses spread in rounds, and...
CF 1320A - Journey Planning Rating: 1400 Tags: data structures, dp, greedy, math, sortings Model: gpt-5-5 Solve time: 4m 27s Verified: yes (1/1 samples) Share: https://chatgpt.com/share/6a2de6ec-99fc-83ec-9276-106005ae8eca Solution Problem Understanding We are given a line of cities, each with an index from left to right and an associated beauty value. We need to choose a sequence of cities to visit such that indices strictly increase. The key restriction is that consecutive...