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 |
---|---|---|---|---|---|---|
1063 | Codeforces Round 516 (Div. 1, by Moscow Team Olympiad) | FINISHED | False | 7200 | 197668463 | Oct. 14, 2018, 10:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 441 ) | D | Candies for Children | PROGRAMMING | brute force math | 2800 |
B'At the children 's festival, children were dancing in a circle. When music stopped playing, the children were still standing in a circle. Then Lena remembered, that her parents gave her a candy box with exactly k candies "Wilky May". Lena is not a greedy person, so she decided to present all her candies to her friends in the circle. Lena knows, that some of her friends have a sweet tooth and others do not. Sweet tooth takes out of the box two candies, if the box has at least two candies, and otherwise takes one. The rest of Lena 's friends always take exactly one candy from the box. Before starting to give candies, Lena step out of the circle, after that there were exactly n people remaining there. Lena numbered her friends in a clockwise order with positive integers starting with 1 in such a way that index 1 was assigned to her best friend Roma. Initially, Lena gave the box to the friend with number l , after that each friend (starting from friend number l ) took candies from the box and passed the box to the next friend in clockwise order. The process ended with the friend number r taking the last candy (or two, who knows) and the empty box. Please note that it is possible that some of Lena 's friends took candy from the box several times, that is, the box could have gone several full circles before becoming empty. Lena does not know which of her friends have a sweet tooth, but she is interested in the maximum possible number of friends that can have a sweet tooth. If the situation could not happen, and Lena have been proved wrong in her observations, please tell her about this. The only line contains four integers n , l , r and k ( 1 <= n, k <= 10^{11} , 1 <= l, r <= n ) -- the number of children in the circle, the number of friend, who was given a box with candies, the number of friend, who has taken last candy and the initial number of candies in the box respectively. Print exa'... |
Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
69878552 | WZYYN | D | Jan. 31, 2020, 5:22 a.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
67856766 | mlby | D | Dec. 29, 2019, 6:25 a.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
66551792 | vjudge3 | D | Dec. 9, 2019, 3:12 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
66550164 | vjudge5 | D | Dec. 9, 2019, 2:35 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
66550093 | cjrzn | D | Dec. 9, 2019, 2:34 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
66547223 | zzy2005 | D | Dec. 9, 2019, 1:39 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
66547215 | vjudge5 | D | Dec. 9, 2019, 1:39 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
64724813 | vjudge4 | D | Nov. 12, 2019, 6 a.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
60848808 | vjudge2 | D | Sept. 19, 2019, 1:23 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
60848795 | vjudge1 | D | Sept. 19, 2019, 1:23 p.m. | OK | GNU C++11 | TESTS | 54 | 31 | 0 | 2800 | |
44398550 | cfjjs | D | Oct. 16, 2018, 11:56 a.m. | OK | GNU C++14 | TESTS | 54 | 15 | 0 | 2800 | |
44470028 | ZqlwMatt | D | Oct. 18, 2018, 5:46 a.m. | OK | GNU C++14 | TESTS | 54 | 30 | 0 | 2800 | |
44361136 | tmwilliamlin168 | D | Oct. 15, 2018, 2:36 p.m. | OK | GNU C++14 | TESTS | 54 | 30 | 0 | 2800 | |
44351939 | ankeshgupta007 | D | Oct. 15, 2018, 10:36 a.m. | OK | GNU C++14 | TESTS | 54 | 30 | 0 | 2800 | |
44322227 | NoLongerRed | D | Oct. 14, 2018, 2:35 p.m. | OK | GNU C++14 | TESTS | 54 | 30 | 0 | 2800 | |
44321773 | briansu | D | Oct. 14, 2018, 2:25 p.m. | OK | GNU C++14 | TESTS | 54 | 30 | 0 | 2800 | |
44314135 | ez_zjt | D | Oct. 14, 2018, 11:55 a.m. | OK | GNU C++14 | TESTS | 54 | 30 | 0 | 2800 | |
66467617 | tzaph_ | D | Dec. 7, 2019, 5:07 p.m. | OK | GNU C++14 | TESTS | 54 | 31 | 0 | 2800 | |
60925572 | CGKirito | D | Sept. 20, 2019, 12:09 p.m. | OK | GNU C++14 | TESTS | 54 | 31 | 0 | 2800 | |
58249672 | Scut82 | D | Aug. 4, 2019, 7:15 a.m. | OK | GNU C++14 | TESTS | 54 | 31 | 0 | 2800 | |
44774969 | dx007 | D | Oct. 24, 2018, 1:57 p.m. | OK | GNU C++17 | TESTS | 54 | 30 | 307200 | 2800 | |
44600387 | SheepRanger | D | Oct. 20, 2018, 2:06 p.m. | OK | GNU C++17 | TESTS | 54 | 30 | 307200 | 2800 | |
68991469 | hjk1030 | D | Jan. 17, 2020, 3:23 p.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
53464204 | Kmcode | D | April 28, 2019, 9:05 a.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
53464182 | Kmcode | D | April 28, 2019, 9:04 a.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
46987472 | KrK | D | Dec. 13, 2018, 9:46 p.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
46987460 | KrK | D | Dec. 13, 2018, 9:44 p.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
46639165 | Cueball1234 | D | Dec. 5, 2018, 8:37 a.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
44388651 | LiChenKoh | D | Oct. 16, 2018, 7:17 a.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
44388585 | LiChenKoh | D | Oct. 16, 2018, 7:16 a.m. | OK | GNU C++17 | TESTS | 54 | 31 | 0 | 2800 | |
44324390 | fetetriste | D | Oct. 14, 2018, 3:23 p.m. | OK | Java 8 | TESTS | 54 | 124 | 0 | 2800 | |
44315663 | mmaxio | D | Oct. 14, 2018, 12:03 p.m. | OK | Java 8 | TESTS | 54 | 124 | 0 | 2800 | |
68047585 | dalt | D | Jan. 1, 2020, 5:10 p.m. | OK | Java 8 | TESTS | 54 | 124 | 19558400 | 2800 | |
68045481 | dalt | D | Jan. 1, 2020, 4:15 p.m. | OK | Java 8 | TESTS | 54 | 139 | 19456000 | 2800 | |
68048156 | dalt | D | Jan. 1, 2020, 5:27 p.m. | OK | Java 8 | TESTS | 54 | 217 | 19558400 | 2800 |
Back to search problems