Grakn Forces 2020

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
1408 Grakn Forces 2020 FINISHED False 9900 135703463 Sept. 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8933 ) C Discrete Acceleration PROGRAMMING binary search implementation math two pointers

B"There is a road with length l meters. The start of the road has coordinate 0 , the end of the road has coordinate l . There are two cars, the first standing at the start of the road and the second standing at the end of the road. They will start driving simultaneously. The first car will drive from the start to the end and the second car will drive from the end to the start. Initially, they will drive with a speed of 1 meter per second. There are n flags at different coordinates a_1, a_2, ldots, a_n . Each time when any of two cars drives through a flag, the speed of that car increases by 1 meter per second. Find how long will it take for cars to meet (to reach the same coordinate). The first line contains one integer t ( 1 <= q t <= q 10^4 ): the number of test cases. The first line of each test case contains two integers n , l ( 1 <= q n <= q 10^5 , 1 <= q l <= q 10^9 ): the number of flags and the length of the road. The second line contains n integers a_1, a_2, ldots, a_n in the increasing order ( 1 <= q a_1 < a_2 < ldots < a_n < l ). It is guaranteed that the sum of n among all test cases does not exceed 10^5 . For each test case print a single real number: the time required for cars to meet. Your answer will be considered correct, if its absolute or relative error does not exceed 10^{-6} . More formally, if your answer is a and jury's answer is b , your answer will be considered correct if frac{|a-b|}{ max{(1, b)}} <= q 10^{-6} . In the first test case cars will meet in the coordinate 5 . The first car will be in the coordinate 1 in 1 second and after that its speed will increase by 1 and will be equal to 2 meters per second. After 2 more seconds it will be in the coordinate 5 . So, it will be in the coordinate 5 in 3 seconds. The second car will be in the coordinate 9 in $"...

Tutorials

Grakn Forces -- Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
94350441 Ros9 C Sept. 30, 2020, 6:09 p.m. OK Clang++17 Diagnostics TESTS 14 452 4096000
94335499 hos.lyric C Sept. 30, 2020, 4:23 p.m. OK D TESTS 14 62 13516800
94334670 Wenbo888 C Sept. 30, 2020, 4:19 p.m. OK GNU C11 TESTS 14 93 2048000
94371520 fr200110217102 C Oct. 1, 2020, 3:47 a.m. OK GNU C++11 TESTS 14 31 1638400
94372483 vectorwyx C Oct. 1, 2020, 4:10 a.m. OK GNU C++11 TESTS 14 31 2048000
94335703 nnez_xiaoliwei C Sept. 30, 2020, 4:24 p.m. OK GNU C++11 TESTS 14 31 2048000
94334211 autistic_boy C Sept. 30, 2020, 4:17 p.m. OK GNU C++11 TESTS 14 31 3788800
94337850 2019wangminxiao C Sept. 30, 2020, 4:35 p.m. OK GNU C++11 TESTS 14 46 204800
94376602 CCPSDCGK C Oct. 1, 2020, 5:30 a.m. OK GNU C++11 TESTS 14 46 204800
94335065 ghj1222 C Sept. 30, 2020, 4:21 p.m. OK GNU C++11 TESTS 14 46 204800
94365624 luckAC C Oct. 1, 2020, 12:57 a.m. OK GNU C++11 TESTS 14 46 409600
94366581 Rainbow_sjy C Oct. 1, 2020, 1:33 a.m. OK GNU C++11 TESTS 14 46 409600
94364590 LYC_music C Oct. 1, 2020, 12:16 a.m. OK GNU C++11 TESTS 14 46 409600
94354258 dhritishman22 C Sept. 30, 2020, 7:03 p.m. OK GNU C++14 TESTS 14 46 409600
94366095 ntdung C Oct. 1, 2020, 1:17 a.m. OK GNU C++14 TESTS 14 46 409600
94364126 nomiku99 C Sept. 30, 2020, 11:52 p.m. OK GNU C++14 TESTS 14 46 409600
94333341 satya1998 C Sept. 30, 2020, 4:13 p.m. OK GNU C++14 TESTS 14 46 409600
94356132 hdilantha C Sept. 30, 2020, 7:37 p.m. OK GNU C++14 TESTS 14 46 819200
94378543 hdilantha C Oct. 1, 2020, 6:01 a.m. OK GNU C++14 TESTS 14 46 819200
94358610 ritulaggarwal C Sept. 30, 2020, 8:28 p.m. OK GNU C++14 TESTS 14 46 819200
94351520 h1teshtr1path1 C Sept. 30, 2020, 6:23 p.m. OK GNU C++14 TESTS 14 46 819200
94340479 hackerspring C Sept. 30, 2020, 4:48 p.m. OK GNU C++14 TESTS 14 46 1536000
94371751 Zetr0 C Oct. 1, 2020, 3:53 a.m. OK GNU C++14 TESTS 14 46 1638400
94342070 mahapatraakash C Sept. 30, 2020, 4:57 p.m. OK GNU C++17 TESTS 14 46 409600
94377809 hoshyarchand C Oct. 1, 2020, 5:50 a.m. OK GNU C++17 TESTS 14 46 409600
94377249 gameface_123 C Oct. 1, 2020, 5:41 a.m. OK GNU C++17 TESTS 14 46 409600
94376442 KaranKaira C Oct. 1, 2020, 5:28 a.m. OK GNU C++17 TESTS 14 46 409600
94374372 Abhay278 C Oct. 1, 2020, 4:51 a.m. OK GNU C++17 TESTS 14 46 409600
94365808 ask_a_question C Oct. 1, 2020, 1:06 a.m. OK GNU C++17 TESTS 14 46 409600
94364120 iit_yt_28 C Sept. 30, 2020, 11:52 p.m. OK GNU C++17 TESTS 14 46 409600
94356186 ShuvoMalakar C Sept. 30, 2020, 7:38 p.m. OK GNU C++17 TESTS 14 46 409600
94344476 Gandji C Sept. 30, 2020, 5:10 p.m. OK GNU C++17 TESTS 14 46 409600
94340696 hrdirector C Sept. 30, 2020, 4:50 p.m. OK GNU C++17 TESTS 14 46 409600
94363989 keepers C Sept. 30, 2020, 11:46 p.m. OK GNU C++17 (64) TESTS 14 31 2048000
94348323 H4Wk3ye C Sept. 30, 2020, 5:49 p.m. OK GNU C++17 (64) TESTS 14 31 3993600
94369383 CodingKnight C Oct. 1, 2020, 2:52 a.m. OK GNU C++17 (64) TESTS 14 46 409600
94368692 CodingKnight C Oct. 1, 2020, 2:34 a.m. OK GNU C++17 (64) TESTS 14 46 409600
94368628 DanielMontes C Oct. 1, 2020, 2:32 a.m. OK GNU C++17 (64) TESTS 14 46 409600
94362179 samchen123 C Sept. 30, 2020, 10:22 p.m. OK GNU C++17 (64) TESTS 14 46 409600
94361676 ankushkhanna C Sept. 30, 2020, 10 p.m. OK GNU C++17 (64) TESTS 14 46 409600
94355542 madlogic C Sept. 30, 2020, 7:26 p.m. OK GNU C++17 (64) TESTS 14 46 409600
94360916 tyler C Sept. 30, 2020, 9:31 p.m. OK GNU C++17 (64) TESTS 14 46 409600
94369789 CodingKnight C Oct. 1, 2020, 3:04 a.m. OK GNU C++17 (64) TESTS 14 46 409600
94341929 NoDesire C Sept. 30, 2020, 4:56 p.m. OK Go TESTS 14 46 6041600
94357654 smalex69 C Sept. 30, 2020, 8:06 p.m. OK Go TESTS 14 92 4915200
94340031 takezawa C Sept. 30, 2020, 4:46 p.m. OK Go TESTS 14 124 5222400
94365071 Russell_Emerine C Oct. 1, 2020, 12:36 a.m. OK Haskell TESTS 14 343 51507200
94337582 RuthlessAggression C Sept. 30, 2020, 4:34 p.m. OK Java 11 TESTS 14 187 0
94365535 tigershark22 C Oct. 1, 2020, 12:54 a.m. OK Java 11 TESTS 14 187 0
94349427 saikaushik C Sept. 30, 2020, 5:58 p.m. OK Java 11 TESTS 14 202 0
94339178 rreeennnnn C Sept. 30, 2020, 4:42 p.m. OK Java 11 TESTS 14 202 0
94374766 srjvastri8 C Oct. 1, 2020, 4:58 a.m. OK Java 11 TESTS 14 202 0
94340312 Raj9400 C Sept. 30, 2020, 4:48 p.m. OK Java 11 TESTS 14 218 0
94356396 singhdhanwant C Sept. 30, 2020, 7:41 p.m. OK Java 11 TESTS 14 218 0
94342005 vineet_001 C Sept. 30, 2020, 4:57 p.m. OK Java 11 TESTS 14 218 0
94335660 sam_code C Sept. 30, 2020, 4:24 p.m. OK Java 11 TESTS 14 218 102400
94351046 sam_code C Sept. 30, 2020, 6:16 p.m. OK Java 11 TESTS 14 218 102400
94331708 sizzula C Sept. 30, 2020, 4:05 p.m. OK Java 8 TESTS 14 109 6246400
94339003 RockStar_14 C Sept. 30, 2020, 4:41 p.m. OK Java 8 TESTS 14 140 0
94336783 arun07 C Sept. 30, 2020, 4:30 p.m. OK Java 8 TESTS 14 140 0
94359550 __goku__ C Sept. 30, 2020, 8:51 p.m. OK Java 8 TESTS 14 140 0
94333381 pili C Sept. 30, 2020, 4:13 p.m. OK Java 8 TESTS 14 140 5836800
94333901 mamant C Sept. 30, 2020, 4:15 p.m. OK Java 8 TESTS 14 155 0
94359076 polyakoff C Sept. 30, 2020, 8:39 p.m. OK Java 8 TESTS 14 155 0
94344403 Aabhas99 C Sept. 30, 2020, 5:10 p.m. OK Java 8 TESTS 14 155 0
94341671 Hemose C Sept. 30, 2020, 4:55 p.m. OK Java 8 TESTS 14 171 0
94339226 lzhang C Sept. 30, 2020, 4:42 p.m. OK Java 8 TESTS 14 186 0
94340766 chanter C Sept. 30, 2020, 4:50 p.m. OK Kotlin TESTS 14 436 8192000
94338058 0Mordecai0 C Sept. 30, 2020, 4:36 p.m. OK MS C++ 2017 TESTS 14 61 3993600
94353242 rafle C Sept. 30, 2020, 6:47 p.m. OK MS C++ 2017 TESTS 14 62 2048000
94337791 hruif C Sept. 30, 2020, 4:35 p.m. OK MS C++ 2017 TESTS 14 109 819200
94358843 xsc C Sept. 30, 2020, 8:34 p.m. OK MS C++ 2017 TESTS 14 109 1024000
94376085 songjunwei C Oct. 1, 2020, 5:22 a.m. OK MS C++ 2017 TESTS 14 109 1228800
94342035 dominotim C Sept. 30, 2020, 4:57 p.m. OK MS C++ 2017 TESTS 14 109 4403200
94332770 devooox C Sept. 30, 2020, 4:10 p.m. OK MS C++ 2017 TESTS 14 124 409600
94334016 rhksdn6227 C Sept. 30, 2020, 4:16 p.m. OK MS C++ 2017 TESTS 14 124 409600
94331891 carlo.collodel C Sept. 30, 2020, 4:06 p.m. OK MS C++ 2017 TESTS 14 124 819200
94348049 ustaritz C Sept. 30, 2020, 5:47 p.m. OK MS C++ 2017 TESTS 14 124 5222400
94346295 trucker C Sept. 30, 2020, 5:18 p.m. OK .NET Core C# TESTS 14 155 10137600
94331877 MyEighthName C Sept. 30, 2020, 4:06 p.m. OK .NET Core C# TESTS 14 156 13107200
94345228 sanori C Sept. 30, 2020, 5:14 p.m. OK Node.js TESTS 14 343 16691200
94361226 mrinal2233 C Sept. 30, 2020, 9:43 p.m. OK PyPy 2 TESTS 14 171 8499200
94331912 Mukundan314 C Sept. 30, 2020, 4:06 p.m. OK PyPy 2 TESTS 14 217 8192000
94342815 raj1307 C Sept. 30, 2020, 5:01 p.m. OK PyPy 2 TESTS 14 233 10137600
94340510 beethoven97 C Sept. 30, 2020, 4:49 p.m. OK PyPy 2 TESTS 14 249 23654400
94345365 mo-hit C Sept. 30, 2020, 5:14 p.m. OK PyPy 2 TESTS 14 265 18227200
94355131 upadhyay.aaditya2001 C Sept. 30, 2020, 7:18 p.m. OK PyPy 2 TESTS 14 295 6553600
94332826 bazzyadb C Sept. 30, 2020, 4:11 p.m. OK PyPy 2 TESTS 14 327 7987200
94348348 ap1008 C Sept. 30, 2020, 5:49 p.m. OK PyPy 2 TESTS 14 529 8704000
94357865 alexwice C Sept. 30, 2020, 8:11 p.m. OK PyPy 2 TESTS 14 654 9420800
94373825 rajbit C Oct. 1, 2020, 4:40 a.m. OK PyPy 3 TESTS 14 202 9113600
94361214 mrinal2233 C Sept. 30, 2020, 9:42 p.m. OK PyPy 3 TESTS 14 217 9420800
94378243 2019ucp1350 C Oct. 1, 2020, 5:56 a.m. OK PyPy 3 TESTS 14 249 13004800
94342293 akshitm16 C Sept. 30, 2020, 4:58 p.m. OK PyPy 3 TESTS 14 264 13926400
94337446 takayg C Sept. 30, 2020, 4:33 p.m. OK PyPy 3 TESTS 14 280 15462400
94369926 pavanbsp C Oct. 1, 2020, 3:07 a.m. OK PyPy 3 TESTS 14 295 13004800
94354796 UTMoonlight C Sept. 30, 2020, 7:12 p.m. OK PyPy 3 TESTS 14 296 9728000
94371546 TheVan C Oct. 1, 2020, 3:48 a.m. OK PyPy 3 TESTS 14 296 12083200
94342071 silentone C Sept. 30, 2020, 4:57 p.m. OK PyPy 3 TESTS 14 311 21708800
94370524 programmer_neo C Oct. 1, 2020, 3:21 a.m. OK PyPy 3 TESTS 14 312 75673600
94338358 shubhankarsharma00 C Sept. 30, 2020, 4:37 p.m. OK Python 2 TESTS 14 373 6144000
94344996 r-tron18 C Sept. 30, 2020, 5:13 p.m. OK Python 3 TESTS 14 233 8089600
94353923 prayashverma007 C Sept. 30, 2020, 6:57 p.m. OK Python 3 TESTS 14 233 8192000
94348091 dude_code C Sept. 30, 2020, 5:47 p.m. OK Python 3 TESTS 14 248 8192000
94349562 sh1194 C Sept. 30, 2020, 5:59 p.m. OK Python 3 TESTS 14 249 8089600
94338176 essi C Sept. 30, 2020, 4:36 p.m. OK Python 3 TESTS 14 249 8192000
94343704 deeppathak2808 C Sept. 30, 2020, 5:06 p.m. OK Python 3 TESTS 14 265 8601600
94374584 a4aakash C Oct. 1, 2020, 4:55 a.m. OK Python 3 TESTS 14 280 8192000
94360198 mrblood C Sept. 30, 2020, 9:08 p.m. OK Python 3 TESTS 14 280 8192000
94356964 heisenberg_17 C Sept. 30, 2020, 7:52 p.m. OK Python 3 TESTS 14 280 8192000
94345859 ss057 C Sept. 30, 2020, 5:16 p.m. OK Python 3 TESTS 14 280 8192000
94332417 zheland C Sept. 30, 2020, 4:08 p.m. OK Rust TESTS 14 124 5939200
94349485 bqn C Sept. 30, 2020, 5:58 p.m. OK Rust TESTS 14 1528 11161600

remove filters

Back to search problems