Codeforces Round 481 (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
978 Codeforces Round 481 (Div. 3) FINISHED False 9000 211236887 May 13, 2018, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8468 ) F Mentors PROGRAMMING binary search data structures implementation 1500

B'In BerSoft n programmers work, the programmer i is characterized by a skill r_i . A programmer a can be a mentor of a programmer b if and only if the skill of the programmer a is strictly greater than the skill of the programmer b (r_a > r_b) and programmers a and b are not in a quarrel. You are given the skills of each programmers and a list of k pairs of the programmers, which are in a quarrel (pairs are unordered). For each programmer i , find the number of programmers, for which the programmer i can be a mentor. The first line contains two integers n and k (2 <= n <= 2 cdot 10^5 , 0 <= k <= min(2 cdot 10^5, frac{n cdot (n - 1)}{2})) -- total number of programmers and number of pairs of programmers which are in a quarrel. The second line contains a sequence of integers r_1, r_2, ... , r_n (1 <= r_i <= 10^{9}) , where r_i equals to the skill of the i -th programmer. Each of the following k lines contains two distinct integers x , y (1 <= x, y <= n , x ne y) -- pair of programmers in a quarrel. The pairs are unordered, it means that if x is in a quarrel with y then y is in a quarrel with x . Guaranteed, that for each pair (x, y) there are no other pairs (x, y) and (y, x) in the input. Print n integers, the i -th number should be equal to the number of programmers, for which the i -th programmer can be a mentor. Programmers are numbered in the same order that their skills are given in the input. In the first example, the first programmer can not be mentor of any other (because only the second programmer has a skill, lower than first programmer skill, but they are in a quarrel). The second programmer can not be mentor of any other programmer, because his skill is minimal among others. The third programmer can be a mentor of the second pro'...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40508763 chaorenhaha F July 18, 2018, 9:50 a.m. OK FPC TESTS 41 514 6041600 1500
47682435 andreumat F Dec. 29, 2018, 12:48 p.m. OK FPC TESTS 41 717 3174400 1500
43016269 LMOliver F Sept. 17, 2018, 11:18 p.m. OK FPC TESTS 41 732 3174400 1500
38641458 MYNAMEISSHARIFUL F May 26, 2018, 6:28 p.m. OK GNU C TESTS 41 202 3993600 1500
38890589 C1ariS F June 2, 2018, 12:33 p.m. OK GNU C TESTS 41 218 15564800 1500
39275780 Siyuan F June 15, 2018, 10:22 p.m. OK GNU C++ TESTS 41 77 3993600 1500
40932225 ReaLNero1 F July 30, 2018, 1:39 a.m. OK GNU C++ TESTS 41 78 3993600 1500
41258695 Scut82 F Aug. 6, 2018, 12:29 a.m. OK GNU C++ TESTS 41 93 2662400 1500
42257908 luogu_bot4 F Aug. 30, 2018, midnight OK GNU C++ TESTS 41 93 3174400 1500
42234786 HNYLMS_Tea xszq F Aug. 29, 2018, 8:54 a.m. OK GNU C++ TESTS 41 109 3174400 1500
39346230 vjudge2 F June 18, 2018, 3:14 a.m. OK GNU C++ TESTS 41 124 2457600 1500
41260398 Scut82 F Aug. 6, 2018, 2:14 a.m. OK GNU C++ TESTS 41 156 3276800 1500
41623988 jangjie F Aug. 15, 2018, 1:20 p.m. OK GNU C++ TESTS 41 171 2252800 1500
39798188 zhouqiuchen F June 30, 2018, 12:50 p.m. OK GNU C++ TESTS 41 171 3072000 1500
39785846 luogu_bot1 F June 30, 2018, 2:19 a.m. OK GNU C++ TESTS 41 171 3072000 1500
69217951 mth1908 F Jan. 21, 2020, 2:31 a.m. OK GNU C11 TESTS 41 795 3174400 1500
69221189 mth1908 F Jan. 21, 2020, 4:45 a.m. OK GNU C11 TESTS 41 811 2457600 1500
43547988 dalek_cos F Sept. 28, 2018, 8:34 p.m. OK GNU C11 TESTS 41 1013 3993600 1500
40166187 AkaneSasu F July 10, 2018, 9:59 a.m. OK GNU C++11 TESTS 41 78 3276800 1500
39016016 A.Freeman F June 7, 2018, 10:29 a.m. OK GNU C++11 TESTS 41 93 2355200 1500
39015913 A.Freeman F June 7, 2018, 10:25 a.m. OK GNU C++11 TESTS 41 93 2457600 1500
39341024 bcku1 F June 17, 2018, 5:43 p.m. OK GNU C++11 TESTS 41 109 3072000 1500
65414060 Heartbeat666 F Nov. 20, 2019, 6 a.m. OK GNU C++11 TESTS 41 109 3174400 1500
41243930 DragoonKiller F Aug. 5, 2018, 12:01 p.m. OK GNU C++11 TESTS 41 124 3276800 1500
38651183 tqltqltqltql F May 27, 2018, 8:35 a.m. OK GNU C++11 TESTS 41 124 7065600 1500
51927804 Disappointment F March 28, 2019, 8:42 a.m. OK GNU C++11 TESTS 41 124 7270400 1500
59219389 vjudge4 F Aug. 21, 2019, 11:39 a.m. OK GNU C++11 TESTS 41 155 3993600 1500
46928151 Bohoty F Dec. 12, 2018, 10:04 a.m. OK GNU C++11 TESTS 41 155 4710400 1500
53733605 vjudge1 F May 4, 2019, 8:23 a.m. OK GNU C++14 TESTS 41 171 3174400 1500
40232782 worldedi DivisionOfficer hojoon0205 F July 12, 2018, 1:01 p.m. OK GNU C++14 TESTS 41 171 3174400 1500
45199436 vjudge1 F Nov. 2, 2018, 9:05 a.m. OK GNU C++14 TESTS 41 171 3379200 1500
43005938 joey161 F Sept. 17, 2018, 3:54 p.m. OK GNU C++14 TESTS 41 186 3788800 1500
47870051 threepebbles F Jan. 3, 2019, 12:19 p.m. OK GNU C++14 TESTS 41 187 2969600 1500
47900174 NotIdeal F Jan. 4, 2019, 1:36 p.m. OK GNU C++14 TESTS 41 187 3174400 1500
40695308 arnold518 F July 24, 2018, 7:44 a.m. OK GNU C++14 TESTS 41 187 3174400 1500
45199610 vjudge2 F Nov. 2, 2018, 9:10 a.m. OK GNU C++14 TESTS 41 187 3174400 1500
67050175 vjudge3 F Dec. 17, 2019, 3:23 a.m. OK GNU C++14 TESTS 41 202 2355200 1500
52072761 abgupta531 F March 31, 2019, 8:34 a.m. OK GNU C++14 TESTS 41 202 2355200 1500
58239465 cader F Aug. 3, 2019, 10:31 p.m. OK GNU C++17 TESTS 41 140 4198400 1500
56870243 Raiden F July 12, 2019, 6:02 a.m. OK GNU C++17 TESTS 41 171 4812800 1500
47867796 define_chan F Jan. 3, 2019, 10:58 a.m. OK GNU C++17 TESTS 41 186 3174400 1500
49181914 wdyd2004 dreamr F Jan. 30, 2019, 2:34 a.m. OK GNU C++17 TESTS 41 187 3174400 1500
44486374 neko7baka F Oct. 18, 2018, 12:38 p.m. OK GNU C++17 TESTS 41 187 3481600 1500
48459303 fakhoury F Jan. 16, 2019, 1:55 p.m. OK GNU C++17 TESTS 41 187 3481600 1500
58128293 vjudge3 F Aug. 1, 2019, 1:22 p.m. OK GNU C++17 TESTS 41 187 3993600 1500
57479673 Benboby0523 F July 22, 2019, 1:37 a.m. OK GNU C++17 TESTS 41 187 3993600 1500
41279648 tjpuxgg F Aug. 6, 2018, 3:23 p.m. OK GNU C++17 TESTS 41 202 2355200 1500
58944918 Peter.Park F Aug. 17, 2019, 8:31 a.m. OK GNU C++17 TESTS 41 202 2457600 1500
38553450 only_methol F May 23, 2018, 6:52 a.m. OK Go TESTS 41 763 29593600 1500
42914207 Marii F Sept. 16, 2018, 8:49 a.m. OK Go TESTS 41 1232 5324800 1500
38706301 megaspazz F May 29, 2018, 12:12 a.m. OK Java 8 TESTS 41 280 0 1500
38706040 megaspazz F May 28, 2018, 11:38 p.m. OK Java 8 TESTS 41 295 3584000 1500
38595372 yashk F May 24, 2018, 7:28 p.m. OK Java 8 TESTS 41 311 0 1500
54027352 mufaddalnaya F May 12, 2019, 1:30 p.m. OK Java 8 TESTS 41 311 4403200 1500
48371566 rogernadal F Jan. 14, 2019, 4:46 a.m. OK Java 8 TESTS 41 326 0 1500
39816353 umang._.panchal F July 1, 2018, 8:45 a.m. OK Java 8 TESTS 41 327 0 1500
39816601 umang._.panchal F July 1, 2018, 8:56 a.m. OK Java 8 TESTS 41 342 5017600 1500
69565798 luchy0120 F Jan. 26, 2020, 12:22 p.m. OK Java 8 TESTS 41 342 5324800 1500
62638322 o.radwan F Oct. 15, 2019, 5:26 p.m. OK Java 8 TESTS 41 342 7884800 1500
65574479 maheshwari29 F Nov. 23, 2019, 8:55 a.m. OK Java 8 TESTS 41 343 3072000 1500
39074470 ahmad.soliman F June 9, 2018, 4:45 p.m. OK JavaScript TESTS 41 967 61132800 1500
41249866 stepanovep F Aug. 5, 2018, 3:25 p.m. OK Kotlin TESTS 41 2354 34304000 1500
60298317 nadilk F Sept. 9, 2019, 11:11 a.m. OK Mono C# TESTS 41 436 47616000 1500
68644725 hibatibati F Jan. 12, 2020, 8:41 a.m. OK Mono C# TESTS 41 670 50892800 1500
50074073 _SHREDDER_ F Feb. 17, 2019, 7:43 p.m. OK Mono C# TESTS 41 951 39628800 1500
50067485 _SHREDDER_ F Feb. 17, 2019, 3:37 p.m. OK Mono C# TESTS 41 967 39628800 1500
50468585 VKoshkarev F Feb. 24, 2019, 9:40 p.m. OK Mono C# TESTS 41 982 46796800 1500
58989033 vjudge3 F Aug. 18, 2019, 8:24 a.m. OK MS C++ TESTS 41 156 3174400 1500
58998570 vjudge3 F Aug. 18, 2019, 12:37 p.m. OK MS C++ TESTS 41 156 3174400 1500
68694896 vjudge4 F Jan. 13, 2020, 7:34 a.m. OK MS C++ TESTS 41 171 2457600 1500
38631009 vjudge4 F May 26, 2018, 10:30 a.m. OK MS C++ TESTS 41 171 2457600 1500
59087599 vjudge5 F Aug. 19, 2019, 11:35 a.m. OK MS C++ TESTS 41 171 3174400 1500
59086845 vjudge5 F Aug. 19, 2019, 11:20 a.m. OK MS C++ TESTS 41 171 3174400 1500
50162648 scorpiowf F Feb. 19, 2019, 1:17 p.m. OK MS C++ TESTS 41 171 3174400 1500
59088203 vjudge5 F Aug. 19, 2019, 11:49 a.m. OK MS C++ TESTS 41 171 3174400 1500
45137469 vjudge4 F Oct. 31, 2018, 1 p.m. OK MS C++ TESTS 41 171 3379200 1500
68339741 vjudge2 F Jan. 7, 2020, 2:22 a.m. OK MS C++ TESTS 41 186 2457600 1500
58986530 vjudge5 F Aug. 18, 2019, 7:20 a.m. OK MS C++ 2017 TESTS 41 233 3379200 1500
59086354 vjudge5 F Aug. 19, 2019, 11:11 a.m. OK MS C++ 2017 TESTS 41 249 2457600 1500
59086019 vjudge5 F Aug. 19, 2019, 11:05 a.m. OK MS C++ 2017 TESTS 41 249 3174400 1500
51110039 NPUlzh F March 10, 2019, 3:34 a.m. OK MS C++ 2017 TESTS 41 265 3993600 1500
63224676 AleksanderBalobanov F Oct. 23, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 41 295 32153600 1500
50592641 work_hard. F Feb. 28, 2019, 8:21 a.m. OK MS C++ 2017 TESTS 41 296 2457600 1500
54836687 0-jij-0 F May 30, 2019, 11:11 a.m. OK MS C++ 2017 TESTS 41 701 9830400 1500
67051565 itskamee F Dec. 17, 2019, 4:26 a.m. OK MS C++ 2017 TESTS 41 748 10956800 1500
57507648 Still_Theory F July 22, 2019, 12:35 p.m. OK MS C++ 2017 TESTS 41 935 17715200 1500
39797383 mayakin F June 30, 2018, 12:18 p.m. OK PHP TESTS 41 951 54169600 1500
41758583 Onesh0t F Aug. 18, 2018, 1:23 p.m. OK PyPy 2 TESTS 41 1216 49766400 1500
38786912 frmsaul F May 31, 2018, 12:09 a.m. OK PyPy 2 TESTS 41 1559 48435200 1500
58570854 brosucks F Aug. 11, 2019, 10:07 a.m. OK PyPy 3 TESTS 41 873 24371200 1500
51148370 H4Wk3ye F March 11, 2019, 5:49 a.m. OK PyPy 3 TESTS 41 966 28672000 1500
46042748 LordVader F Nov. 21, 2018, 9:22 p.m. OK PyPy 3 TESTS 41 1294 85299200 1500
46042677 LordVader F Nov. 21, 2018, 9:18 p.m. OK PyPy 3 TESTS 41 1356 102297600 1500
54960746 cavi4762 F June 2, 2019, 3:34 a.m. OK PyPy 3 TESTS 41 1949 23142400 1500
60368463 Black_Fregat F Sept. 10, 2019, 11:06 p.m. OK PyPy 3 TESTS 41 2012 23449600 1500
62385019 ashok123 F Oct. 11, 2019, 8:50 p.m. OK PyPy 3 TESTS 41 2028 18944000 1500
38757259 cabaleirog F May 30, 2018, 2:56 a.m. OK PyPy 3 TESTS 41 2043 80486400 1500
38757210 cabaleirog F May 30, 2018, 2:53 a.m. OK PyPy 3 TESTS 41 2058 85913600 1500
39445852 kevinsogo F June 20, 2018, 8:39 p.m. OK PyPy 3 TESTS 41 2090 22425600 1500
48940497 noob77777 F Jan. 25, 2019, 4:16 p.m. OK Python 2 TESTS 41 1092 28057600 1500
41758597 Onesh0t F Aug. 18, 2018, 1:23 p.m. OK Python 2 TESTS 41 1684 59596800 1500
49239743 bor4eg F Jan. 31, 2019, 9:43 a.m. OK Python 3 TESTS 41 1060 39628800 1500
60154428 inglar F Sept. 6, 2019, 6:05 a.m. OK Python 3 TESTS 41 1185 61542400 1500
56308825 tushartyagi8750 F June 30, 2019, 1:35 p.m. OK Python 3 TESTS 41 1262 16793600 1500
45031182 a01234223 F Oct. 29, 2018, 4:07 a.m. OK Python 3 TESTS 41 1262 24780800 1500
47771814 nowyyz F Dec. 30, 2018, 10:12 p.m. OK Python 3 TESTS 41 1310 30822400 1500
46847791 nani_7 F Dec. 10, 2018, 10:35 a.m. OK Python 3 TESTS 41 1325 16486400 1500
68012993 alexara1123 F Dec. 31, 2019, 4:50 p.m. OK Python 3 TESTS 41 1325 36659200 1500
65693937 Annvv F Nov. 25, 2019, 6:48 a.m. OK Python 3 TESTS 41 1372 22630400 1500
40645190 tebba F July 22, 2018, 3:29 p.m. OK Python 3 TESTS 41 1419 25600000 1500
47009020 michael.43ru1 F Dec. 14, 2018, 3:26 p.m. OK Python 3 TESTS 41 1482 24268800 1500
38562174 blazeva1 F May 23, 2018, 12:44 p.m. OK Rust TESTS 41 436 21299200 1500
41547503 kobae964 F Aug. 13, 2018, 6:16 a.m. OK Rust TESTS 41 451 116633600 1500
46716472 yakamoto F Dec. 7, 2018, 11:30 a.m. OK Scala TESTS 41 686 19456000 1500

remove filters

Back to search problems