#two pointers
CF 958F2 - Lightsabers (medium) Rating: 1800 Tags: binary search, two pointers Model: gpt-5-3-mini Solve time: 2m 35s Verified: no (0/1 samples) Share: https://chatgpt.com/share/6a339f05-474c-83ec-8348-d5aef0244721 Solution Problem Understanding We are given a line of Jedi, each Jedi wearing a lightsaber of one of several colors. We are also given a target requirement: for every color, we want to see a fixed number of knights of that color. The goal is not...
CF 1252E - Songwriter Rating: 2200 Tags: greedy, two pointers Model: gpt-5-5 Solve time: 3m 36s Verified: yes (1/1 samples) Share: https://chatgpt.com/share/6a2d6d17-3088-83ec-bce9-2fb58380a095 Solution Problem Understanding We are given an original sequence of integers representing a melody. We are not allowed to keep it directly; instead, we must construct a new sequence of the same length that preserves only the “shape” of the original: every step that goes up, stays equal,...