Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
1740 | Codeforces Round 831 (Div. 1 + Div. 2) | FINISHED | False | 9900 | 70231762 | Oct. 29, 2022, 9:10 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 115 ) | I | Arranging Crystal Balls | PROGRAMMING | data structures divide and conquer divide and conquer dp geometry graphs number theory | 3500 |
B"In the world of Compfestnesia, Pak Chanek discovers a secret underground dungeon. Inside it, there is a treasure chest that is surrounded by n statues that are arranged in a circular manner. The statues are numbered from 0 to n-1 with statue i being to the left of statue i+1 and statue n-1 being to the left of statue 0 . Pak Chanek observes that each statue is holding a crystal ball with an integer between 0 and m-1 inclusive. Let's say the integer in the crystal ball of statue i is a_i . The dungeon provides instructions that every integer in the crystal balls must be 0 in order to open the treasure chest. To achieve that, Pak Chanek is given an integer k , and he can do zero or more operations. In a single operation, Pak Chanek does the following: Help Pak Chanek find the minimum possible number of operations to open the treasure chest. The first line contains three integers n , m , and k ( 2 <= q n,m <= q 10^6 , nm <= q 2 cdot 10^6 , 1 <= q k < n ) -- the number of statues, the bound of the integers in the crystal balls, and the number of statues that can be operated in a single operation. The second line contains n integers a_0,a_1, ldots,a_{n-1} ( 0 <= q a_i < m ) -- the integers in the crystal balls. If it is possible to perform zero or more operations so that a_0=a_1= ldots=a_{n-1}=0 , output the minimum number of operations required. Otherwise, output -1 . In the first example, Pak Chanek can do the following operations: "... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
178459561 | Radewoosh | I | Oct. 29, 2022, 11:13 p.m. | OK | GNU C++17 | TESTS | 249 | 1699 | 60928000 | 3500 | |
178444492 | Benq | I | Oct. 29, 2022, 6:54 p.m. | OK | GNU C++17 (64) | TESTS | 249 | 514 | 19148800 | 3500 | |
178468008 | MiracleFaFa | I | Oct. 30, 2022, 4:04 a.m. | OK | GNU C++17 (64) | TESTS | 249 | 545 | 153190400 | 3500 | |
178465343 | MiracleFaFa | I | Oct. 30, 2022, 2:51 a.m. | OK | GNU C++17 (64) | TESTS | 249 | 2979 | 129228800 | 3500 | |
178465256 | MiracleFaFa | I | Oct. 30, 2022, 2:48 a.m. | OK | GNU C++17 (64) | TESTS | 249 | 2979 | 129228800 | 3500 |
Back to search problems