Codeforces Round 515 (Div. 3)

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
1066 Codeforces Round 515 (Div. 3) FINISHED False 7200 192468299 Oct. 12, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14604 ) A Vova and Train PROGRAMMING math 1100

B"Vova plans to go to the conference by train. Initially, the train is at the point 1 and the destination point of the path is the point L . The speed of the train is 1 length unit per minute (i.e. at the first minute the train is at the point 1 , at the second minute -- at the point 2 and so on). There are lanterns on the path. They are placed at the points with coordinates divisible by v (i.e. the first lantern is at the point v , the second is at the point 2v and so on). There is also exactly one standing train which occupies all the points from l to r inclusive. Vova can see the lantern at the point p if p is divisible by v and there is no standing train at this position ( p not in [l; r] ). Thus, if the point with the lantern is one of the points covered by the standing train, Vova can't see this lantern. Your problem is to say the number of lanterns Vova will see during the path. Vova plans to go to t different conferences, so you should answer t independent queries. The first line of the input contains one integer t ( 1 <= t <= 10^4 ) -- the number of queries. Then t lines follow. The i -th line contains four integers L_i, v_i, l_i, r_i ( 1 <= L, v <= 10^9 , 1 <= l <= r <= L ) -- destination point of the i -th path, the period of the lantern appearance and the segment occupied by the standing train. Print t lines. The i -th line should contain one integer -- the answer for the i -th query. For the first example query, the answer is 3 . There are lanterns at positions 2 , 4 , 6 , 8 and 10 , but Vova didn't see the lanterns at positions 4 and 6 because of the standing train. For the second example query, the answer is 0 because the only lantern is at the point 51 and there is also a standing train at this point. For the third example query, t"...

Tutorials

62419

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
51273692 kalyan_being A March 13, 2019, 7:30 p.m. OK Clang++17 Diagnostics TESTS 14 46 0 1100
52079657 Joker623 A March 31, 2019, 11:39 a.m. OK Clang++17 Diagnostics TESTS 14 46 0 1100
44282089 vjudge2 A Oct. 14, 2018, 5:28 a.m. OK Clang++17 Diagnostics TESTS 14 46 0 1100
44697769 kvnt20 A Oct. 22, 2018, 1:37 p.m. OK Clang++17 Diagnostics TESTS 14 46 0 1100
49202430 amruth_kumar A Jan. 30, 2019, 12:53 p.m. OK Clang++17 Diagnostics TESTS 14 61 0 1100
48899113 DTUPIS A Jan. 24, 2019, 5:13 p.m. OK Clang++17 Diagnostics TESTS 14 61 0 1100
45982612 vjudge4 A Nov. 20, 2018, 2:39 a.m. OK Clang++17 Diagnostics TESTS 14 296 0 1100
44762585 vjudge1 A Oct. 24, 2018, 8:01 a.m. OK FPC TESTS 14 46 0 1100
44759752 simoncatcity A Oct. 24, 2018, 6:20 a.m. OK FPC TESTS 14 46 0 1100
44762071 vjudge5 A Oct. 24, 2018, 7:44 a.m. OK FPC TESTS 14 46 0 1100
44623471 vjudge2 A Oct. 21, 2018, 7:50 a.m. OK FPC TESTS 14 46 0 1100
44623025 vjudge4 A Oct. 21, 2018, 7:35 a.m. OK FPC TESTS 14 46 0 1100
44622762 vjudge3 A Oct. 21, 2018, 7:24 a.m. OK FPC TESTS 14 46 0 1100
44621791 vjudge1 A Oct. 21, 2018, 6:51 a.m. OK FPC TESTS 14 46 0 1100
44621387 vjudge1 A Oct. 21, 2018, 6:36 a.m. OK FPC TESTS 14 46 0 1100
44466292 vjudge1 A Oct. 18, 2018, 2:39 a.m. OK FPC TESTS 14 46 0 1100
44388507 _Time_Lord_ A Oct. 16, 2018, 7:13 a.m. OK FPC TESTS 14 46 0 1100
52666707 qwerty2k A April 13, 2019, 5:09 a.m. OK GNU C11 TESTS 14 30 204800 1100
52661185 thevillain A April 12, 2019, 11:12 p.m. OK GNU C11 TESTS 14 31 102400 1100
52661208 adarshsiva A April 12, 2019, 11:13 p.m. OK GNU C11 TESTS 14 31 102400 1100
52661595 008_pranjal A April 12, 2019, 11:53 p.m. OK GNU C11 TESTS 14 31 102400 1100
44363247 wu1013an A Oct. 15, 2018, 3:30 p.m. OK GNU C11 TESTS 14 31 204800 1100
61903950 vjudge4 A Oct. 5, 2019, 9:15 a.m. OK GNU C11 TESTS 14 46 0 1100
65298196 vjudge5 A Nov. 18, 2019, 12:18 p.m. OK GNU C11 TESTS 14 46 0 1100
65731857 yigezhe A Nov. 26, 2019, 5:34 a.m. OK GNU C11 TESTS 14 46 0 1100
66528628 Revanth27 A Dec. 9, 2019, 6:32 a.m. OK GNU C11 TESTS 14 46 0 1100
67688341 vjudge3 A Dec. 27, 2019, 9:56 a.m. OK GNU C11 TESTS 14 46 0 1100
44280176 xxii A Oct. 14, 2018, 3:36 a.m. OK GNU C++11 TESTS 14 15 0 1100
44345157 vincentalfred A Oct. 15, 2018, 6:47 a.m. OK GNU C++11 TESTS 14 15 0 1100
44402043 julianfernando A Oct. 16, 2018, 1:14 p.m. OK GNU C++11 TESTS 14 15 0 1100
44481688 KishMish A Oct. 18, 2018, 10:39 a.m. OK GNU C++11 TESTS 14 15 0 1100
44718260 codefield A Oct. 23, 2018, 12:36 a.m. OK GNU C++11 TESTS 14 15 0 1100
44844841 vjudge1 A Oct. 25, 2018, 2:06 p.m. OK GNU C++11 TESTS 14 15 0 1100
45790514 than_duran98 A Nov. 16, 2018, 6:39 a.m. OK GNU C++11 TESTS 14 15 0 1100
46430592 luogu_bot4 A Dec. 1, 2018, 5:19 a.m. OK GNU C++11 TESTS 14 15 0 1100
49974153 vjudge1 A Feb. 16, 2019, 4:51 a.m. OK GNU C++11 TESTS 14 15 0 1100
50589643 vjudge3 A Feb. 28, 2019, 6:37 a.m. OK GNU C++11 TESTS 14 15 0 1100
50302533 vjudge3 A Feb. 22, 2019, 3:32 a.m. OK GNU C++14 TESTS 14 15 0 1100
58118431 aj4941 A Aug. 1, 2019, 9:43 a.m. OK GNU C++14 TESTS 14 15 0 1100
56009186 MikeMR A June 24, 2019, 5:11 p.m. OK GNU C++14 TESTS 14 15 0 1100
53034273 SumaiyaAny A April 20, 2019, 5:32 a.m. OK GNU C++14 TESTS 14 15 0 1100
49677775 Aldir A Feb. 9, 2019, 9:07 p.m. OK GNU C++14 TESTS 14 15 0 1100
47812616 gaurav2k1 A Jan. 1, 2019, 12:23 p.m. OK GNU C++14 TESTS 14 15 0 1100
46714441 AMnu A Dec. 7, 2018, 10:16 a.m. OK GNU C++14 TESTS 14 15 0 1100
45790390 Naim_Hasan A Nov. 16, 2018, 6:34 a.m. OK GNU C++14 TESTS 14 15 0 1100
45233588 VLADO A Nov. 3, 2018, 8:15 a.m. OK GNU C++14 TESTS 14 15 0 1100
45196758 VladMatei A Nov. 2, 2018, 7:34 a.m. OK GNU C++14 TESTS 14 15 0 1100
52072579 vjudge5 A March 31, 2019, 8:30 a.m. OK GNU C++17 TESTS 14 15 0 1100
53476795 vjudge3 A April 28, 2019, 4:07 p.m. OK GNU C++17 TESTS 14 15 0 1100
54010815 alfarelzaki A May 12, 2019, 2:07 a.m. OK GNU C++17 TESTS 14 15 0 1100
52665972 Chaithu007 A April 13, 2019, 4:42 a.m. OK GNU C++17 TESTS 14 15 0 1100
47000911 Mercury_Lc A Dec. 14, 2018, 11:31 a.m. OK GNU C++17 TESTS 14 15 0 1100
49987009 vjudge5 A Feb. 16, 2019, 11 a.m. OK GNU C++17 TESTS 14 15 0 1100
47658790 sicon54 A Dec. 28, 2018, 5:51 p.m. OK GNU C++17 TESTS 14 15 102400 1100
45040716 bommie1005 A Oct. 29, 2018, 10:08 a.m. OK GNU C++17 TESTS 14 15 204800 1100
45750407 vjudge2 A Nov. 15, 2018, 12:17 a.m. OK GNU C++17 TESTS 14 15 204800 1100
48885672 vjudge1 A Jan. 24, 2019, 12:12 p.m. OK GNU C++17 TESTS 14 15 204800 1100
47493950 zstu_jack A Dec. 25, 2018, 1:54 p.m. OK Go TESTS 14 62 0 1100
44339890 ADJA A Oct. 15, 2018, 2:22 a.m. OK Go TESTS 14 62 0 1100
44259084 lvs7k A Oct. 13, 2018, 1:39 p.m. OK Haskell TESTS 14 30 8499200 1100
50247193 vjudge3 A Feb. 20, 2019, 3:29 p.m. OK Haskell TESTS 14 46 102400 1100
44474197 qpalzmwoskxn A Oct. 18, 2018, 7:58 a.m. OK Java 8 TESTS 14 108 0 1100
44235344 aman28rwt A Oct. 13, 2018, 4:10 a.m. OK Java 8 TESTS 14 108 0 1100
44227345 DeadPillow A Oct. 12, 2018, 8:22 p.m. OK Java 8 TESTS 14 108 0 1100
67147798 bluesky111 A Dec. 18, 2019, 9:33 a.m. OK Java 8 TESTS 14 109 0 1100
56008363 foreverlearner A June 24, 2019, 4:46 p.m. OK Java 8 TESTS 14 109 0 1100
54356978 Hemose A May 18, 2019, 6:08 p.m. OK Java 8 TESTS 14 109 0 1100
52340732 CharlesDai A April 5, 2019, 10:22 a.m. OK Java 8 TESTS 14 109 0 1100
51217009 rishz A March 12, 2019, 11 a.m. OK Java 8 TESTS 14 109 0 1100
51213628 rishz A March 12, 2019, 9:16 a.m. OK Java 8 TESTS 14 109 0 1100
49889371 Ahmed_Nasr A Feb. 14, 2019, 1:51 a.m. OK Java 8 TESTS 14 109 0 1100
45241474 exsandebest A Nov. 3, 2018, 11:49 a.m. OK JavaScript TESTS 14 77 2355200 1100
44415431 HassanAzzam A Oct. 16, 2018, 6:48 p.m. OK JavaScript TESTS 14 77 2355200 1100
50591206 SergeySh A Feb. 28, 2019, 7:34 a.m. OK JavaScript TESTS 14 93 2560000 1100
45957065 Killer45 A Nov. 19, 2018, 9:49 a.m. OK Kotlin TESTS 14 124 0 1100
44588988 Azazello A Oct. 20, 2018, 10:28 a.m. OK Kotlin TESTS 14 124 0 1100
44489878 stepanovep A Oct. 18, 2018, 2:04 p.m. OK Kotlin TESTS 14 186 0 1100
56286908 stepanovep A June 29, 2019, 8:13 p.m. OK Kotlin TESTS 14 202 0 1100
44326147 Numbers6uy A Oct. 14, 2018, 4:09 p.m. OK Kotlin TESTS 14 264 204800 1100
44325784 Numbers6uy A Oct. 14, 2018, 4 p.m. OK Kotlin TESTS 14 264 204800 1100
44326060 Numbers6uy A Oct. 14, 2018, 4:06 p.m. OK Kotlin TESTS 14 280 0 1100
44389929 vansang1706 A Oct. 16, 2018, 8 a.m. OK Mono C# TESTS 14 61 1638400 1100
54440163 og.kostya A May 21, 2019, 8:11 a.m. OK Mono C# TESTS 14 62 307200 1100
68839036 mban259 A Jan. 15, 2020, 4:56 a.m. OK Mono C# TESTS 14 62 3174400 1100
44255507 azukun A Oct. 13, 2018, 12:11 p.m. OK Mono C# TESTS 14 77 4710400 1100
44219286 kyosuke0924 A Oct. 12, 2018, 4:48 p.m. OK Mono C# TESTS 14 93 3072000 1100
44559540 Zaczero A Oct. 19, 2018, 6:57 p.m. OK Mono C# TESTS 14 93 3072000 1100
44286097 Ruban_Denic A Oct. 14, 2018, 7:33 a.m. OK Mono C# TESTS 14 109 3072000 1100
44410239 nemars A Oct. 16, 2018, 4:27 p.m. OK Mono C# TESTS 14 109 3072000 1100
44389196 vansang1706 A Oct. 16, 2018, 7:36 a.m. OK Mono C# TESTS 14 124 2969600 1100
44927443 I_love_albeXL A Oct. 26, 2018, 8:57 p.m. OK Mono C# TESTS 14 124 3072000 1100
45695696 vjudge5 A Nov. 14, 2018, 3:01 a.m. OK MS C++ TESTS 14 15 0 1100
45678070 vjudge2 A Nov. 13, 2018, 2:03 p.m. OK MS C++ TESTS 14 15 0 1100
44836915 vjudge2 A Oct. 25, 2018, 11:17 a.m. OK MS C++ TESTS 14 15 0 1100
44739859 vjudge1 A Oct. 23, 2018, 2:15 p.m. OK MS C++ TESTS 14 15 0 1100
44733133 vjudge4 A Oct. 23, 2018, 11:37 a.m. OK MS C++ TESTS 14 15 0 1100
44315419 anlen A Oct. 14, 2018, 12:02 p.m. OK MS C++ TESTS 14 15 0 1100
63247656 vjudge5 A Oct. 23, 2019, 3:06 p.m. OK MS C++ TESTS 14 15 0 1100
66011956 ylqq6800 A Nov. 30, 2019, 3:06 a.m. OK MS C++ TESTS 14 30 0 1100
52489982 vjudge3 A April 8, 2019, 11:11 a.m. OK MS C++ TESTS 14 30 0 1100
52267730 vjudge2 A April 3, 2019, noon OK MS C++ TESTS 14 30 0 1100
63762723 vjudge1 A Oct. 30, 2019, 4:50 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
65631658 vjudge1 A Nov. 24, 2019, 8:25 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
66569814 vjudge4 A Dec. 10, 2019, 3:20 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
67442004 vjudge4 A Dec. 22, 2019, 7:46 p.m. OK MS C++ 2017 TESTS 14 31 0 1100
69163495 vjudge1 A Jan. 20, 2020, 2:07 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
58886271 vjudge4 A Aug. 16, 2019, 2:24 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
50777277 work_hard. A March 4, 2019, 9:16 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
61830905 vjudge1 A Oct. 4, 2019, 6:31 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
55230506 hwangganzi A June 7, 2019, 5:19 a.m. OK MS C++ 2017 TESTS 14 31 0 1100
51324695 NPUlzh A March 15, 2019, 9:08 a.m. OK MS C++ 2017 TESTS 14 31 409600 1100
49767219 vjudge5 A Feb. 11, 2019, 12:12 p.m. OK Node.js TESTS 14 374 5324800 1100
44621599 vjudge3 A Oct. 21, 2018, 6:44 a.m. OK PascalABC.NET TESTS 14 171 3072000 1100
44454495 VLA_DA_DA A Oct. 17, 2018, 5:19 p.m. OK PascalABC.NET TESTS 14 186 3072000 1100
44979896 cube-R A Oct. 28, 2018, 8:06 a.m. OK PascalABC.NET TESTS 14 186 3072000 1100
44255115 Andinevsky A Oct. 13, 2018, 12:03 p.m. OK PascalABC.NET TESTS 14 186 3072000 1100
44423048 qrlk A Oct. 17, 2018, 1:18 a.m. OK PascalABC.NET TESTS 14 187 3072000 1100
44416285 cristi17 A Oct. 16, 2018, 7:14 p.m. OK PascalABC.NET TESTS 14 187 3072000 1100
54420780 Houy3 A May 20, 2019, 3:18 p.m. OK PascalABC.NET TESTS 14 545 0 1100
44223411 0x2f8f A Oct. 12, 2018, 6:16 p.m. OK PHP TESTS 14 62 0 1100
44224608 mayakin A Oct. 12, 2018, 6:49 p.m. OK PHP TESTS 14 62 409600 1100
59533495 iamprayush A Aug. 26, 2019, 3:58 p.m. OK PyPy 2 TESTS 14 202 2969600 1100
44280140 SerChirag A Oct. 14, 2018, 3:34 a.m. OK PyPy 2 TESTS 14 233 2355200 1100
45178151 jhilary A Nov. 1, 2018, 3:46 p.m. OK PyPy 2 TESTS 14 249 921600 1100
44251995 cielavenir A Oct. 13, 2018, 10:53 a.m. OK PyPy 2 TESTS 14 249 1331200 1100
44415252 FatherofBenoni A Oct. 16, 2018, 6:43 p.m. OK PyPy 2 TESTS 14 296 1740800 1100
44266239 nealzane A Oct. 13, 2018, 4:46 p.m. OK PyPy 2 TESTS 14 296 2150400 1100
53428415 yfo A April 27, 2019, 2:53 p.m. OK PyPy 3 TESTS 14 171 2457600 1100
45583792 cpicard443 A Nov. 12, 2018, 6:49 a.m. OK PyPy 3 TESTS 14 202 3993600 1100
44403446 ARSHIA A Oct. 16, 2018, 1:52 p.m. OK PyPy 3 TESTS 14 280 5939200 1100
65331001 akymaster007 A Nov. 19, 2019, 6:04 a.m. OK PyPy 3 TESTS 14 280 6860800 1100
44330720 ulyabelyaeva A Oct. 14, 2018, 6:16 p.m. OK PyPy 3 TESTS 14 311 4915200 1100
45373399 insane_n00b A Nov. 6, 2018, 11:08 a.m. OK PyPy 3 TESTS 14 312 4812800 1100
44622705 yuzining A Oct. 21, 2018, 7:23 a.m. OK PyPy 3 TESTS 14 312 4915200 1100
47085399 limabeans A Dec. 16, 2018, 1:50 a.m. OK PyPy 3 TESTS 14 312 5222400 1100
47715718 madhav47 A Dec. 30, 2018, 7:32 a.m. OK PyPy 3 TESTS 14 326 4915200 1100
44477218 D_J_Z A Oct. 18, 2018, 9:38 a.m. OK PyPy 3 TESTS 14 327 4812800 1100
44273576 elistark A Oct. 13, 2018, 7:44 p.m. OK Python 2 TESTS 14 171 0 1100
44286130 khasam A Oct. 14, 2018, 7:35 a.m. OK Python 2 TESTS 14 186 204800 1100
45838697 th3_5had0w A Nov. 16, 2018, 4:49 p.m. OK Python 2 TESTS 14 187 0 1100
44276319 EoinDavey A Oct. 13, 2018, 10:01 p.m. OK Python 2 TESTS 14 187 0 1100
51390445 vjudge2 A March 16, 2019, 10 p.m. OK Python 2 TESTS 14 187 204800 1100
44450275 Envyte A Oct. 17, 2018, 3:34 p.m. OK Python 2 TESTS 14 187 204800 1100
44221703 simransainijjr A Oct. 12, 2018, 5:31 p.m. OK Python 2 TESTS 14 187 204800 1100
44727254 youRooock A Oct. 23, 2018, 8:37 a.m. OK Python 2 TESTS 14 187 1638400 1100
44428971 franckmy A Oct. 17, 2018, 6:35 a.m. OK Python 2 TESTS 14 202 0 1100
44380103 entri A Oct. 16, 2018, 2:51 a.m. OK Python 2 TESTS 14 202 0 1100
49669089 chaudhary_19 A Feb. 9, 2019, 3:52 p.m. OK Python 3 TESTS 14 140 819200 1100
44388462 bluered A Oct. 16, 2018, 7:12 a.m. OK Python 3 TESTS 14 140 819200 1100
44294852 quandum A Oct. 14, 2018, 10:15 a.m. OK Python 3 TESTS 14 140 1024000 1100
44476380 sergovoy A Oct. 18, 2018, 9:11 a.m. OK Python 3 TESTS 14 140 2662400 1100
45697234 AlexPahanov A Nov. 14, 2018, 4:57 a.m. OK Python 3 TESTS 14 155 409600 1100
44837964 bergus A Oct. 25, 2018, 11:43 a.m. OK Python 3 TESTS 14 155 409600 1100
44690903 hillhost A Oct. 22, 2018, 11:59 a.m. OK Python 3 TESTS 14 155 409600 1100
44229485 IonicStrenth A Oct. 12, 2018, 9:58 p.m. OK Python 3 TESTS 14 155 409600 1100
44218660 bharagvi540 A Oct. 12, 2018, 4:42 p.m. OK Python 3 TESTS 14 155 409600 1100
45566465 PinkUnicorn A Nov. 11, 2018, 2:50 p.m. OK Python 3 TESTS 14 155 512000 1100
44252271 Vec A Oct. 13, 2018, 10:59 a.m. OK Ruby TESTS 14 93 204800 1100
44494015 laminh711 A Oct. 18, 2018, 3:54 p.m. OK Ruby TESTS 14 109 102400 1100
44225720 clupasq A Oct. 12, 2018, 7:24 p.m. OK Ruby TESTS 14 109 102400 1100
45678709 saurabh7717 A Nov. 13, 2018, 2:21 p.m. OK Ruby TESTS 14 139 307200 1100
44283468 Dx18 A Oct. 14, 2018, 6:13 a.m. OK Rust TESTS 14 124 0 1100

remove filters

Back to search problems