Bubble Cup 11 - Finals [Online Mirror, Div. 1]

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
1045 Bubble Cup 11 - Finals [Online Mirror, Div. 1] FINISHED False 18000 194210699 Sept. 22, 2018, 10:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1687 ) G AI robots PROGRAMMING data structures 2200

B"In the last mission, MDCS has successfully shipped N AI robots to Mars. Before they start exploring, system initialization is required so they are arranged in a line. Every robot can be described with three numbers: position ( x_i ), radius of sight ( r_i ) and IQ ( q_i ). Since they are intelligent robots, some of them will talk if they see each other. Radius of sight is inclusive, so robot can see other all robots in range [x_i - r_i, x_i + r_i] . But they don't walk to talk with anybody, but only with robots who have similar IQ. By similar IQ we mean that their absolute difference isn't more than K . Help us and calculate how many pairs of robots are going to talk with each other, so we can timely update their software and avoid any potential quarrel. The first line contains two integers, numbers N (1 <= q N <= q 10^5) and K (0 <= q K <= q 20) . Next N lines contain three numbers each x_i, r_i, q_i (0 <= q x_i,r_i,q_i <= q 10^9) -- position, radius of sight and IQ of every robot respectively. Output contains only one number -- solution to the problem. The first robot can see the second, but not vice versa. The first robot can't even see the third. The second and the third robot can see each other and their IQs don't differ more than 2 so only one conversation will happen. "...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
43710338 genius77777 G Oct. 3, 2018, 3:06 a.m. OK GNU C++11 TESTS 30 156 8192000 2200
50554108 _Dispwnl G Feb. 27, 2019, 6:52 a.m. OK GNU C++11 TESTS 30 156 18022400 2200
48515483 luogu_bot2 G Jan. 18, 2019, 3:27 a.m. OK GNU C++11 TESTS 30 171 9523200 2200
47001493 vjudge3 G Dec. 14, 2018, 11:48 a.m. OK GNU C++11 TESTS 30 187 5836800 2200
50548299 Slr2002 G Feb. 27, 2019, 12:35 a.m. OK GNU C++11 TESTS 30 187 24064000 2200
46358680 Guozhicheng G Nov. 29, 2018, 9:51 a.m. OK GNU C++11 TESTS 30 202 8192000 2200
51283582 fzzsl G March 14, 2019, 5:54 a.m. OK GNU C++11 TESTS 30 202 8396800 2200
44751543 ReaLNero1 G Oct. 23, 2018, 8:12 p.m. OK GNU C++11 TESTS 30 218 8192000 2200
49754857 luogu_bot1 G Feb. 11, 2019, 5:39 a.m. OK GNU C++11 TESTS 30 218 8396800 2200
49754897 p_b_p_b G Feb. 11, 2019, 5:41 a.m. OK GNU C++11 TESTS 30 218 8499200 2200
46060611 Gazelle_ G Nov. 22, 2018, 1:08 p.m. OK GNU C++14 TESTS 30 218 7270400 2200
47168459 vjudge2 G Dec. 17, 2018, 1:42 p.m. OK GNU C++14 TESTS 30 265 9625600 2200
43591502 w446506278 G Sept. 30, 2018, 2:33 a.m. OK GNU C++14 TESTS 30 280 14950400 2200
46100714 Gazelle_ G Nov. 23, 2018, 5:36 a.m. OK GNU C++14 TESTS 30 311 60108800 2200
43288403 Avny G Sept. 23, 2018, 9:25 a.m. OK GNU C++14 TESTS 30 374 8192000 2200
43288325 Avny G Sept. 23, 2018, 9:22 a.m. OK GNU C++14 TESTS 30 374 8192000 2200
43248465 receed G Sept. 22, 2018, 11:50 a.m. OK GNU C++14 TESTS 30 389 9932800 2200
43263051 Shivram G Sept. 22, 2018, 3:23 p.m. OK GNU C++14 TESTS 30 390 8192000 2200
47179282 ArshiaDadras G Dec. 17, 2018, 7:28 p.m. OK GNU C++14 TESTS 30 405 16486400 2200
43255677 DongwonShin imeimi G Sept. 22, 2018, 1:27 p.m. OK GNU C++14 TESTS 30 436 10240000 2200
50712355 endereye G March 3, 2019, 7:11 a.m. OK GNU C++17 TESTS 30 218 6451200 2200
44620541 alpc_qleonardo G Oct. 21, 2018, 6:03 a.m. OK GNU C++17 TESTS 30 218 9932800 2200
46755604 mtmohim G Dec. 8, 2018, 11:33 a.m. OK GNU C++17 TESTS 30 233 7270400 2200
44620513 alpc_qleonardo G Oct. 21, 2018, 6:02 a.m. OK GNU C++17 TESTS 30 234 9932800 2200
43437147 DZYO G Sept. 26, 2018, 6:33 a.m. OK GNU C++17 TESTS 30 311 29593600 2200
50241774 nekko G Feb. 20, 2019, 1:15 p.m. OK GNU C++17 TESTS 30 327 3174400 2200
43254752 Golovanov399 G Sept. 22, 2018, 1:13 p.m. OK GNU C++17 TESTS 30 327 8192000 2200
50710384 Dup4 2017212212083 lts G March 3, 2019, 6:34 a.m. OK GNU C++17 TESTS 30 327 56115200 2200
45269995 F.J G Nov. 4, 2018, 8:04 a.m. OK GNU C++17 TESTS 30 374 8806400 2200
43505169 mitslll G Sept. 27, 2018, 6:56 p.m. OK GNU C++17 TESTS 30 374 9625600 2200
43592234 Ahmad G Sept. 30, 2018, 3:42 a.m. OK Java 8 TESTS 30 1528 17715200 2200
43252222 uwi G Sept. 22, 2018, 12:37 p.m. OK Java 8 TESTS 30 1621 14233600 2200
43576477 spar5h G Sept. 29, 2018, 3:10 p.m. OK Java 8 TESTS 30 1934 44236800 2200
43264414 Azat_Yusupov G Sept. 22, 2018, 3:48 p.m. OK Java 8 TESTS 30 1949 63795200 2200

remove filters

Back to search problems