Codeforces Round 298 (Div. 2)

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
534 Codeforces Round 298 (Div. 2) FINISHED False 9000 347551223 April 12, 2015, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 393 ) E Berland Local Positioning System PROGRAMMING constructive algorithms greedy hashing implementation 2600

In Berland a bus travels along the main street of the capital. The street begins from the main square and looks like a very long segment. There are n bus stops located along the street, the i -th of them is located at the distance a i from the central square, all distances are distinct, the stops are numbered in the order of increasing distance from the square, that is, a i < a i + 1 for all i from 1 to n - 1 . The bus starts its journey from the first stop, it passes stops 2 , 3 and so on. It reaches the stop number n , turns around and goes in the opposite direction to stop 1 , passing all the intermediate stops in the reverse order. After that, it again starts to move towards stop n . During the day, the bus runs non-stop on this route. The bus is equipped with the Berland local positioning system. When the bus passes a stop, the system notes down its number. One of the key features of the system is that it can respond to the queries about the distance covered by the bus for the parts of its path between some pair of stops. A special module of the system takes the input with the information about a set of stops on a segment of the path, a stop number occurs in the set as many times as the bus drove past it. This module returns the length of the traveled segment of the path (or -1 if it is impossible to determine the length uniquely). The operation of the module is complicated by the fact that stop numbers occur in the request not in the order they were visited but in the non-decreasing order . For example, if the number of stops is 6 , and the part of the bus path starts at the bus stop number 5 , ends at the stop number 3 and passes the stops as follows: , then the request about this segment of the path will have form: 3, 4, 5, 5, 6 . If the bus on the segment of the path from stop 5 to stop 3 has time to drive past the 1 -th stop (i.e., if we consider a segment that ends with the second visit to stop 3 on the way from 5 ), then the request will have f

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
10681911 TheHedgehog E April 12, 2015, 5:47 p.m. OK Delphi TESTS 103 108 31129600 2600
11197017 ez_cjb E May 22, 2015, 3:30 a.m. OK FPC TESTS 103 93 4812800 2600
10755596 moakhey E April 17, 2015, 4:59 p.m. OK FPC TESTS 103 156 4812800 2600
11384549 Dylans E June 2, 2015, 1:01 a.m. OK GNU C++ TESTS 103 46 2252800 2600
24910058 zhanglexing E Feb. 23, 2017, 7:01 a.m. OK GNU C++ TESTS 103 46 3481600 2600
10692186 qscqesze222 E April 13, 2015, 10:05 a.m. OK GNU C++ TESTS 103 46 3993600 2600
10690585 hzwer E April 13, 2015, 6:58 a.m. OK GNU C++ TESTS 103 46 3993600 2600
36533722 alan_cty E March 23, 2018, 2:37 p.m. OK GNU C++ TESTS 103 46 4915200 2600
10689084 zyfzyf E April 13, 2015, 3:07 a.m. OK GNU C++ TESTS 103 46 6041600 2600
14567139 OB.Zhou E Nov. 30, 2015, 8:16 a.m. OK GNU C++ TESTS 103 109 1433600 2600
13907190 130705009 E Oct. 28, 2015, 1:21 a.m. OK GNU C++ TESTS 103 109 1638400 2600
12563461 chemthan E Aug. 16, 2015, 4:28 p.m. OK GNU C++ TESTS 103 109 1638400 2600
11146056 jiangyoushizhe E May 19, 2015, 3:46 p.m. OK GNU C++ TESTS 103 109 2252800 2600
64445030 gn_wz E Nov. 7, 2019, 6:11 a.m. OK GNU C++11 TESTS 103 46 2457600 2600
40986766 ReaLNero1 E July 30, 2018, 8:44 p.m. OK GNU C++11 TESTS 103 46 2457600 2600
12877264 Duxar E Sept. 6, 2015, 8:36 p.m. OK GNU C++11 TESTS 103 46 2457600 2600
10689778 __math E April 13, 2015, 4:57 a.m. OK GNU C++11 TESTS 103 46 2457600 2600
11369922 mgch E May 31, 2015, 5:48 p.m. OK GNU C++11 TESTS 103 46 4812800 2600
11761981 amitsaharana E June 25, 2015, 2:32 p.m. OK GNU C++11 TESTS 103 46 8089600 2600
40105399 Big_black_jujube E July 9, 2018, 8:13 a.m. OK GNU C++11 TESTS 103 62 3481600 2600
10696529 tanphatls987 E April 13, 2015, 5 p.m. OK GNU C++11 TESTS 103 109 1638400 2600
10685582 -XraY- E April 12, 2015, 7:04 p.m. OK GNU C++11 TESTS 103 109 3174400 2600
10778770 vjudge4 E April 19, 2015, 8:33 a.m. OK GNU C++11 TESTS 103 109 3686400 2600
69515345 minyzero E Jan. 25, 2020, 11:48 a.m. OK GNU C++14 TESTS 103 155 1843200 2600
34251164 iqqsoszs E Jan. 17, 2018, 12:14 p.m. OK GNU C++14 TESTS 103 156 4300800 2600
29627469 toxzi E Aug. 20, 2017, 6:01 p.m. OK GNU C++14 TESTS 103 171 2457600 2600
48027848 KNB. E Jan. 6, 2019, 10:18 a.m. OK GNU C++14 TESTS 103 171 3993600 2600
30823988 AMnu E Sept. 29, 2017, 8:49 a.m. OK GNU C++14 TESTS 103 171 4812800 2600
27068967 MasterMind0108 E May 13, 2017, 5:46 a.m. OK GNU C++14 TESTS 103 171 12083200 2600
23405474 Ali.Pi E Dec. 29, 2016, 6:49 p.m. OK GNU C++14 TESTS 103 186 6656000 2600
31969006 -FizzyDavid E Nov. 2, 2017, 5:54 a.m. OK GNU C++14 TESTS 103 187 3584000 2600
24324088 ershivasoni E Jan. 31, 2017, 6:37 p.m. OK GNU C++14 TESTS 103 202 5120000 2600
27184116 satylogin E May 17, 2017, 5:06 p.m. OK GNU C++14 TESTS 103 265 46387200 2600
62608373 hjk1030 E Oct. 15, 2019, 8:44 a.m. OK GNU C++17 TESTS 103 156 3993600 2600
64188552 ruo E Nov. 4, 2019, 6:35 a.m. OK GNU C++17 TESTS 103 171 2457600 2600
49055079 Atreus E Jan. 27, 2019, 12:57 p.m. OK GNU C++17 TESTS 103 171 2662400 2600
56849713 QAQorz E July 11, 2019, 3:09 p.m. OK GNU C++17 TESTS 103 171 3993600 2600
60774387 TarekHelwani E Sept. 18, 2019, 1:49 p.m. OK GNU C++17 TESTS 103 1232 34099200 2600
10678569 uwi E April 12, 2015, 5:06 p.m. OK Java 7 TESTS 103 93 0 2600
10679699 plem E April 12, 2015, 5:18 p.m. OK Java 7 TESTS 103 124 0 2600
11327155 tehqin E May 28, 2015, 12:34 a.m. OK Java 7 TESTS 103 187 0 2600
10958835 ralonso E May 1, 2015, 3:44 a.m. OK Java 7 TESTS 103 202 63692800 2600
10742594 Ignatyev_Aleksey E April 16, 2015, 3:02 p.m. OK Java 7 TESTS 103 218 15667200 2600
12115748 mkirsche E July 19, 2015, 11 a.m. OK Java 7 TESTS 103 218 15769600 2600
10703291 jaw E April 14, 2015, 11:43 a.m. OK Java 7 TESTS 103 234 28672000 2600
10680450 mike239x E April 12, 2015, 5:27 p.m. OK Java 7 TESTS 103 935 0 2600
10826465 Zharaskhan E April 22, 2015, 5:15 p.m. OK Java 8 TESTS 103 124 28672000 2600
10826476 Zharaskhan E April 22, 2015, 5:15 p.m. OK Java 8 TESTS 103 140 28672000 2600
10841339 fmoraes E April 23, 2015, 9 p.m. OK Java 8 TESTS 103 249 45260800 2600
10728730 sievmi E April 15, 2015, 9:27 a.m. OK Java 8 TESTS 103 265 16691200 2600
10831038 DeJw E April 23, 2015, 5:59 a.m. OK Java 8 TESTS 103 280 55296000 2600
11128530 Pimpom E May 17, 2015, 4:49 p.m. OK Java 8 TESTS 103 358 11059200 2600
10746253 stan E April 16, 2015, 9:35 p.m. OK Java 8 TESTS 103 405 0 2600
10688717 azukun E April 13, 2015, 1:44 a.m. OK MS C# TESTS 103 218 48742400 2600
11196559 lz1199 E May 22, 2015, 1:49 a.m. OK MS C++ TESTS 103 124 2662400 2600
10769479 Bobrosoft E April 18, 2015, 3:27 p.m. OK MS C++ TESTS 103 124 3174400 2600
10769400 Bobrosoft E April 18, 2015, 3:18 p.m. OK MS C++ TESTS 103 124 3174400 2600
10705354 danilka.pro E April 14, 2015, 2:58 p.m. OK MS C++ TESTS 103 124 3993600 2600
10691775 AleksanderBalobanov E April 13, 2015, 9:20 a.m. OK MS C++ TESTS 103 124 7987200 2600
10705579 dotorya E April 14, 2015, 3:25 p.m. OK MS C++ TESTS 103 124 9625600 2600
12066654 Death_Knight_DK E July 15, 2015, 6:38 a.m. OK MS C++ TESTS 103 156 12697600 2600
10685306 FeS_21 E April 12, 2015, 6:55 p.m. OK MS C++ TESTS 103 233 2457600 2600
10774647 simpletest E April 19, 2015, 12:19 a.m. OK MS C++ TESTS 103 421 7475200 2600
10983024 Mano E May 3, 2015, 11:32 a.m. OK MS C++ TESTS 103 436 6041600 2600
10687431 Kelang E April 12, 2015, 9:47 p.m. OK PyPy 2 TESTS 103 218 21708800 2600
10698560 rarandomra E April 13, 2015, 9:24 p.m. OK PyPy 3 TESTS 103 779 31129600 2600
10687470 Kelang E April 12, 2015, 9:52 p.m. OK Python 2 TESTS 103 499 28262400 2600
10679994 nwi E April 12, 2015, 5:21 p.m. OK Python 2 TESTS 103 1435 25907200 2600
12215159 Vosatorp E July 24, 2015, 2:04 p.m. OK Python 3 TESTS 103 576 30003200 2600

remove filters

Back to search problems