8VC Venture Cup 2017 - Final Round

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
756 8VC Venture Cup 2017 - Final Round FINISHED False 7200 291296723 Jan. 22, 2017, 6:15 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 4530 ) B Travel Card PROGRAMMING binary search dp 1700

A new innovative ticketing systems for public transport is introduced in Bytesburg. Now there is a single travel card for all transport. To make a trip a passenger scan his card and then he is charged according to the fare. The fare is constructed in the following manner. There are three types of tickets: a ticket for one trip costs 20 byteland rubles, a ticket for 90 minutes costs 50 byteland rubles, a ticket for one day ( 1440 minutes) costs 120 byteland rubles. Note that a ticket for x minutes activated at time t can be used for trips started in time range from t to t + x - 1 , inclusive. Assume that all trips take exactly one minute. To simplify the choice for the passenger, the system automatically chooses the optimal tickets. After each trip starts, the system analyses all the previous trips and the current trip and chooses a set of tickets for these trips with a minimum total cost. Let the minimum total cost of tickets to cover all trips from the first to the current is a , and the total sum charged before is b . Then the system charges the passenger the sum a - b . You have to write a program that, for given trips made by a passenger, calculates the sum the passenger is charged after each trip. The first line of input contains integer number n ( 1 ≤ n ≤ 10 5 ) — the number of trips made by passenger. Each of the following n lines contains the time of trip t i ( 0 ≤ t i ≤ 10 9 ), measured in minutes from the time of starting the system. All t i are different, given in ascending order, i. e. t i + 1 > t i holds for all 1 ≤ i < n . Output n integers. For each trip, print the sum the passenger is charged after it. In the first example, the system works as follows: for the first and second trips it is cheaper to pay for two one-trip tickets, so each time 20 rubles is charged, after the third trip the system understands that it would be cheaper to buy a ticket for 90 minutes. This ticket costs 50 rubles, and the passenger had already paid 40 rubles, so i

Tutorials

8VC Venture Cup 2017 — Final Round and Codeforces Round #393 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
24039438 Gassa B Jan. 22, 2017, 6:32 p.m. OK D TESTS 31 1747 7168000 1700
25541724 Varzar_Veronika B March 16, 2017, 8:03 a.m. OK Delphi TESTS 31 46 4198400 1700
25566332 VladProg B March 17, 2017, 7:37 a.m. OK FPC TESTS 31 202 2457600 1700
24098201 devuu B Jan. 24, 2017, 6:52 p.m. OK GNU C TESTS 31 77 4300800 1700
39463065 Siyuan B June 21, 2018, 1:12 p.m. OK GNU C++ TESTS 31 31 1638400 1700
34604297 _O.O_ B Jan. 27, 2018, 11:47 a.m. OK GNU C++ TESTS 31 31 2867200 1700
24060683 xzyxzy B Jan. 23, 2017, 12:53 a.m. OK GNU C++ TESTS 31 31 2867200 1700
40299983 vjudge1 B July 14, 2018, 1:07 a.m. OK GNU C++ TESTS 31 46 614400 1700
40299967 vjudge4 B July 14, 2018, 1:06 a.m. OK GNU C++ TESTS 31 46 614400 1700
40299961 Peter_Z B July 14, 2018, 1:06 a.m. OK GNU C++ TESTS 31 46 614400 1700
40300028 vjudge3 B July 14, 2018, 1:09 a.m. OK GNU C++ TESTS 31 46 1228800 1700
26090305 vjudge4 B April 3, 2017, 4:18 a.m. OK GNU C++ TESTS 31 46 2662400 1700
24960829 vjudge4 B Feb. 24, 2017, 10 a.m. OK GNU C++ TESTS 31 46 2662400 1700
29047303 vjudge5 B July 31, 2017, 11:54 a.m. OK GNU C++ TESTS 31 46 2867200 1700
24041019 Al.Cash B Jan. 22, 2017, 6:41 p.m. OK GNU C++11 TESTS 31 30 2867200 1700
24092948 ShiroyashaGintoki B Jan. 24, 2017, 2:06 p.m. OK GNU C++11 TESTS 31 31 2867200 1700
57877507 lopare B July 28, 2019, 6:12 a.m. OK GNU C++11 TESTS 31 46 614400 1700
52669238 vjudge5 B April 13, 2019, 6:37 a.m. OK GNU C++11 TESTS 31 46 614400 1700
46189243 luogu_bot1 B Nov. 25, 2018, 3:03 a.m. OK GNU C++11 TESTS 31 46 819200 1700
30878283 edytr B Sept. 30, 2017, 5:58 p.m. OK GNU C++11 TESTS 31 46 819200 1700
46189467 vjudge6 B Nov. 25, 2018, 3:20 a.m. OK GNU C++11 TESTS 31 46 1228800 1700
27330603 MB1151 B May 25, 2017, 6:39 a.m. OK GNU C++11 TESTS 31 46 1228800 1700
30795596 UltimateSeiji B Sept. 28, 2017, 5:36 a.m. OK GNU C++11 TESTS 31 46 1740800 1700
46188809 luogu_bot2 B Nov. 25, 2018, 2:30 a.m. OK GNU C++11 TESTS 31 46 1843200 1700
32780745 platypus179 B Nov. 29, 2017, 12:47 p.m. OK GNU C++14 TESTS 31 15 3276800 1700
69199935 adiah B Jan. 20, 2020, 4:10 p.m. OK GNU C++14 TESTS 31 46 819200 1700
68035053 MarwanNabil B Jan. 1, 2020, 11:33 a.m. OK GNU C++14 TESTS 31 46 819200 1700
52740537 xyw5vplus1 B April 14, 2019, 8:46 a.m. OK GNU C++14 TESTS 31 46 819200 1700
40982755 ReaLNero1 B July 30, 2018, 6:33 p.m. OK GNU C++14 TESTS 31 46 819200 1700
30872000 itsStrobe B Sept. 30, 2017, 4:38 p.m. OK GNU C++14 TESTS 31 46 819200 1700
26995577 xiaokeai B May 10, 2017, 12:11 p.m. OK GNU C++14 TESTS 31 46 819200 1700
40485171 mahabir10 B July 17, 2018, 4:12 p.m. OK GNU C++14 TESTS 31 46 1228800 1700
24820917 leoly B Feb. 20, 2017, 11:38 a.m. OK GNU C++14 TESTS 31 46 2662400 1700
24689185 NiroBC B Feb. 15, 2017, 8:03 a.m. OK GNU C++14 TESTS 31 46 2662400 1700
51806823 NelsonGomesNeto B March 24, 2019, 10:50 p.m. OK GNU C++17 TESTS 31 46 819200 1700
41747888 bktl1love B Aug. 18, 2018, 8:19 a.m. OK GNU C++17 TESTS 31 46 1228800 1700
46038341 CaNDidaTE_FaSTer B Nov. 21, 2018, 5:47 p.m. OK GNU C++17 TESTS 31 46 14848000 1700
56834280 julianfernando B July 11, 2019, 8:21 a.m. OK GNU C++17 TESTS 31 61 819200 1700
51806815 NelsonGomesNeto B March 24, 2019, 10:50 p.m. OK GNU C++17 TESTS 31 61 819200 1700
46189240 FakeTeeth B Nov. 25, 2018, 3:03 a.m. OK GNU C++17 TESTS 31 61 819200 1700
48541018 neeleshsinha B Jan. 18, 2019, 4:43 p.m. OK GNU C++17 TESTS 31 61 1024000 1700
66629231 KingInTheNorth_ B Dec. 11, 2019, 10:29 a.m. OK GNU C++17 TESTS 31 62 819200 1700
65572891 liweihang B Nov. 23, 2019, 8:27 a.m. OK GNU C++17 TESTS 31 62 819200 1700
63204301 yuhta B Oct. 22, 2019, 10:32 p.m. OK GNU C++17 TESTS 31 62 819200 1700
57732432 JCKG B July 25, 2019, 8:57 a.m. OK Java 8 TESTS 31 139 0 1700
62681888 saurabhs1206 B Oct. 16, 2019, 1:04 p.m. OK Java 8 TESTS 31 140 0 1700
54385769 bedantagarwal9 B May 19, 2019, 1:17 p.m. OK Java 8 TESTS 31 140 0 1700
45316886 bhavyashah9873 B Nov. 5, 2018, 8:31 a.m. OK Java 8 TESTS 31 155 0 1700
44902671 Srinivasa_Ramanujan B Oct. 26, 2018, 9:51 a.m. OK Java 8 TESTS 31 155 0 1700
24037248 Egor B Jan. 22, 2017, 6:24 p.m. OK Java 8 TESTS 31 170 20582400 1700
24037838 VArtem B Jan. 22, 2017, 6:26 p.m. OK Java 8 TESTS 31 171 20480000 1700
24571019 U_Square B Feb. 10, 2017, 2:03 p.m. OK Java 8 TESTS 31 171 20582400 1700
24063464 poikniok B Jan. 23, 2017, 5:48 a.m. OK Java 8 TESTS 31 171 20582400 1700
24044475 qwerty787788 B Jan. 22, 2017, 7:05 p.m. OK Java 8 TESTS 31 186 20480000 1700
30794270 jemsz95 B Sept. 28, 2017, 3:49 a.m. OK Kotlin TESTS 31 639 0 1700
27681013 FallingStar B June 9, 2017, 1:57 a.m. OK MS C# TESTS 31 514 7065600 1700
27681004 FallingStar B June 9, 2017, 1:56 a.m. OK MS C# TESTS 31 514 7168000 1700
37505746 vjudge3 B April 21, 2018, 6:56 a.m. OK MS C++ TESTS 31 61 5427200 1700
24292067 Rafaaaaaaaaaaaam B Jan. 31, 2017, 2:05 p.m. OK MS C++ TESTS 31 62 2867200 1700
24039631 Milanin B Jan. 22, 2017, 6:33 p.m. OK MS C++ TESTS 31 62 2867200 1700
24038741 amethyst0 B Jan. 22, 2017, 6:29 p.m. OK MS C++ TESTS 31 62 3686400 1700
24038390 RAD B Jan. 22, 2017, 6:28 p.m. OK MS C++ TESTS 31 62 10854400 1700
24038491 bayleef B Jan. 22, 2017, 6:28 p.m. OK MS C++ TESTS 31 77 4505600 1700
24039189 sdya B Jan. 22, 2017, 6:31 p.m. OK MS C++ TESTS 31 109 4710400 1700
24040540 Trumen B Jan. 22, 2017, 6:38 p.m. OK MS C++ TESTS 31 217 9011200 1700
24080595 vlad8 B Jan. 23, 2017, 9:06 p.m. OK MS C++ TESTS 31 218 10137600 1700
24451856 K38 B Feb. 5, 2017, 1:11 p.m. OK MS C++ TESTS 31 343 2867200 1700
50767970 homoeconomicus B March 4, 2019, 12:49 a.m. OK PyPy 3 TESTS 31 982 9728000 1700
32320346 mpcque B Nov. 14, 2017, 9:01 p.m. OK PyPy 3 TESTS 31 1716 11980800 1700
31601421 yugle7 B Oct. 22, 2017, 11:06 a.m. OK Python 3 TESTS 31 452 15667200 1700
30793077 davila.jose23 B Sept. 28, 2017, 2:02 a.m. OK Python 3 TESTS 31 810 5939200 1700
24400943 vjudge3 B Feb. 3, 2017, 3:48 a.m. OK Python 3 TESTS 31 811 10854400 1700
24631184 max_hha B Feb. 13, 2017, 3:44 p.m. OK Python 3 TESTS 31 826 8499200 1700
38002293 naruto B May 7, 2018, 4:43 p.m. OK Python 3 TESTS 31 857 12492800 1700
32496111 Mourad_Mallek B Nov. 20, 2017, 10:35 a.m. OK Python 3 TESTS 31 1450 5836800 1700
32321560 ipeisahmed B Nov. 14, 2017, 11:22 p.m. OK Python 3 TESTS 31 1450 5836800 1700
42129476 Mk_Python_v1 B Aug. 26, 2018, 5:28 p.m. OK Python 3 TESTS 31 1513 6041600 1700
31818113 maratonando3 B Oct. 27, 2017, 7:54 p.m. OK Python 3 TESTS 31 1528 6144000 1700

remove filters

Back to search problems