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 |
---|---|---|---|---|---|---|
848 | Codeforces Round 431 (Div. 1) | FINISHED | False | 7200 | 232907063 | Sept. 1, 2017, 1:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1406 ) | C | Goodbye Souvenir | PROGRAMMING | data structures divide and conquer | 2800 |
B"I won't feel lonely, nor will I be sorrowful... not before everything is buried. A string of n beads is left as the message of leaving. The beads are numbered from 1 to n from left to right, each having a shape numbered by integers between 1 and n inclusive. Some beads may have the same shapes. The memory of a shape x in a certain subsegment of beads, is defined to be the difference between the last position and the first position that shape x appears in the segment. The memory of a subsegment is the sum of memories over all shapes that occur in it. From time to time, shapes of beads change as well as the memories. Sometimes, the past secreted in subsegments are being recalled, and you are to find the memory for each of them. The first line of input contains two space-separated integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of beads in the string, and the total number of changes and queries, respectively. The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the initial shapes of beads 1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89n, respectively. The following m lines each describes either a change in the beads or a query of subsegment. A line has one of the following formats: For each query, print one line with an integer -- the memory of the recalled subsegment. The initial string of beads has shapes (1, xe2 x80 x892, xe2 x80 x893, xe2 x80 x891, xe2 x80 x893, xe2 x80 x892, xe2 x80 x891). Consider the changes and queries in their order: "... |
Codeforces Round #431 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
29996957 | adkroxx | C | Sept. 1, 2017, 8:30 p.m. | OK | GNU C++ | TESTS | 90 | 248 | 8499200 | 2800 | |
40825307 | vjudge2 | C | July 27, 2018, 2:40 a.m. | OK | GNU C++ | TESTS | 90 | 280 | 40243200 | 2800 | |
40779833 | vjudge4 | C | July 26, 2018, 1:10 p.m. | OK | GNU C++ | TESTS | 90 | 311 | 40243200 | 2800 | |
40832038 | vjudge1 | C | July 27, 2018, 6:12 a.m. | OK | GNU C++ | TESTS | 90 | 327 | 34201600 | 2800 | |
40779854 | vjudge4 | C | July 26, 2018, 1:11 p.m. | OK | GNU C++ | TESTS | 90 | 327 | 40243200 | 2800 | |
29985145 | SkyDec | C | Sept. 1, 2017, 2:47 p.m. | OK | GNU C++ | TESTS | 90 | 374 | 88678400 | 2800 | |
33962737 | vjudge3 | C | Jan. 6, 2018, 12:38 p.m. | OK | GNU C++ | TESTS | 90 | 390 | 43929600 | 2800 | |
40832171 | vjudge2 | C | July 27, 2018, 6:15 a.m. | OK | GNU C++ | TESTS | 90 | 405 | 33792000 | 2800 | |
30199924 | Mcallor | C | Sept. 8, 2017, 10:26 a.m. | OK | GNU C++ | TESTS | 90 | 405 | 33792000 | 2800 | |
30013823 | gjghfd | C | Sept. 2, 2017, 1:34 p.m. | OK | GNU C++ | TESTS | 90 | 405 | 41881600 | 2800 | |
51558814 | wh_ZH | C | March 20, 2019, 7 a.m. | OK | GNU C++11 | TESTS | 90 | 187 | 21094400 | 2800 | |
51554364 | wh_ZH | C | March 20, 2019, 3:38 a.m. | OK | GNU C++11 | TESTS | 90 | 202 | 19968000 | 2800 | |
51558688 | luogu_bot3 | C | March 20, 2019, 6:55 a.m. | OK | GNU C++11 | TESTS | 90 | 202 | 21094400 | 2800 | |
56972536 | ff_666 | C | July 13, 2019, 10:53 a.m. | OK | GNU C++11 | TESTS | 90 | 233 | 34508800 | 2800 | |
40980035 | ReaLNero1 | C | July 30, 2018, 5:20 p.m. | OK | GNU C++11 | TESTS | 90 | 234 | 8499200 | 2800 | |
59697567 | rack_ny | C | Aug. 30, 2019, 9:12 a.m. | OK | GNU C++11 | TESTS | 90 | 265 | 33280000 | 2800 | |
40826411 | Zerokei | C | July 27, 2018, 3:17 a.m. | OK | GNU C++11 | TESTS | 90 | 312 | 34201600 | 2800 | |
29981930 | Aidos | C | Sept. 1, 2017, 2:22 p.m. | OK | GNU C++11 | TESTS | 90 | 342 | 22323200 | 2800 | |
58199661 | TianSunXing | C | Aug. 3, 2019, 3:17 a.m. | OK | GNU C++11 | TESTS | 90 | 343 | 30924800 | 2800 | |
52224982 | _Dispwnl | C | April 2, 2019, 8:53 a.m. | OK | GNU C++11 | TESTS | 90 | 343 | 30924800 | 2800 | |
58173983 | luogu_bot3 | C | Aug. 2, 2019, 12:24 p.m. | OK | GNU C++14 | TESTS | 90 | 233 | 34713600 | 2800 | |
56973164 | ff_666 | C | July 13, 2019, 11:08 a.m. | OK | GNU C++14 | TESTS | 90 | 233 | 34713600 | 2800 | |
30003249 | xsc | C | Sept. 2, 2017, 6:49 a.m. | OK | GNU C++14 | TESTS | 90 | 234 | 8704000 | 2800 | |
58599447 | luogu_bot5 | C | Aug. 11, 2019, 1:28 p.m. | OK | GNU C++14 | TESTS | 90 | 249 | 34713600 | 2800 | |
56972684 | ff_666 | C | July 13, 2019, 10:56 a.m. | OK | GNU C++14 | TESTS | 90 | 249 | 34713600 | 2800 | |
30171211 | Timsei | C | Sept. 7, 2017, 3:41 a.m. | OK | GNU C++14 | TESTS | 90 | 280 | 8704000 | 2800 | |
30089033 | mengrao | C | Sept. 5, 2017, 2:56 a.m. | OK | GNU C++14 | TESTS | 90 | 280 | 8704000 | 2800 | |
30089011 | mengrao | C | Sept. 5, 2017, 2:55 a.m. | OK | GNU C++14 | TESTS | 90 | 295 | 15872000 | 2800 | |
30089396 | mengrao | C | Sept. 5, 2017, 3:24 a.m. | OK | GNU C++14 | TESTS | 90 | 296 | 21504000 | 2800 | |
30089422 | mengrao | C | Sept. 5, 2017, 3:26 a.m. | OK | GNU C++14 | TESTS | 90 | 311 | 21504000 | 2800 | |
66774881 | hjk1030 | C | Dec. 13, 2019, 9:33 a.m. | OK | GNU C++17 | TESTS | 90 | 374 | 48332800 | 2800 | |
55212012 | codgician | C | June 6, 2019, 3:01 p.m. | OK | GNU C++17 | TESTS | 90 | 405 | 32768000 | 2800 | |
69844656 | RiverHamster | C | Jan. 30, 2020, 2:02 p.m. | OK | GNU C++17 | TESTS | 90 | 405 | 34816000 | 2800 | |
40834148 | XuZihan | C | July 27, 2018, 6:57 a.m. | OK | GNU C++17 | TESTS | 90 | 420 | 31027200 | 2800 | |
40834336 | vjudge4 | C | July 27, 2018, 7:01 a.m. | OK | GNU C++17 | TESTS | 90 | 452 | 31027200 | 2800 | |
40825225 | XuZihan | C | July 27, 2018, 2:38 a.m. | OK | GNU C++17 | TESTS | 90 | 483 | 41984000 | 2800 | |
56670605 | vjudge1 | C | July 7, 2019, 12:57 p.m. | OK | GNU C++17 | TESTS | 90 | 498 | 62361600 | 2800 | |
61791308 | vjudge1 | C | Oct. 3, 2019, 3:58 p.m. | OK | GNU C++17 | TESTS | 90 | 546 | 43110400 | 2800 | |
38208651 | 0w1 | C | May 14, 2018, 8 a.m. | OK | GNU C++17 | TESTS | 90 | 608 | 38400000 | 2800 | |
58197323 | TianZuiXing | C | Aug. 3, 2019, 1:42 a.m. | OK | GNU C++17 | TESTS | 90 | 623 | 36556800 | 2800 | |
29986936 | mmaxio | C | Sept. 1, 2017, 3:02 p.m. | OK | Java 8 | TESTS | 90 | 1029 | 107622400 | 2800 | |
29989043 | uwi | C | Sept. 1, 2017, 3:21 p.m. | OK | Java 8 | TESTS | 90 | 1528 | 6758400 | 2800 | |
30032070 | Slamur | C | Sept. 3, 2017, 11:36 a.m. | OK | Java 8 | TESTS | 90 | 2324 | 126771200 | 2800 | |
35564224 | tri | C | Feb. 22, 2018, 4:01 a.m. | OK | Java 8 | TESTS | 90 | 3697 | 268390400 | 2800 | |
30625936 | fetetriste | C | Sept. 22, 2017, 9:34 p.m. | OK | Java 8 | TESTS | 90 | 3900 | 147660800 | 2800 | |
29996789 | I_Need_Alex_R_Coleman | C | Sept. 1, 2017, 8:17 p.m. | OK | Java 8 | TESTS | 90 | 4602 | 26316800 | 2800 | |
29996764 | I_Need_Alex_R_Coleman | C | Sept. 1, 2017, 8:16 p.m. | OK | Java 8 | TESTS | 90 | 4976 | 26316800 | 2800 | |
29996694 | I_Need_Alex_R_Coleman | C | Sept. 1, 2017, 8:11 p.m. | OK | Java 8 | TESTS | 90 | 5148 | 26214400 | 2800 | |
29998550 | Taube | C | Sept. 1, 2017, 11:20 p.m. | OK | MS C++ | TESTS | 90 | 2995 | 14848000 | 2800 |
Back to search problems