Codeforces Round 776 (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
1650 Codeforces Round 776 (Div. 3) FINISHED False 8100 85073099 March 8, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16838 ) C Weight of the System of Nested Segments PROGRAMMING greedy hashing implementation sortings

B'On the number line there are m points, i -th of which has integer coordinate x_i and integer weight w_i . The coordinates of all points are different, and the points are numbered from 1 to m . A sequence of n segments [l_1, r_1], [l_2, r_2], ... , [l_n, r_n] is called system of nested segments if for each pair i, j ( 1 <= i < j <= n ) the condition l_i < l_j < r_j < r_i is satisfied. In other words, the second segment is strictly inside the first one, the third segment is strictly inside the second one, and so on. For a given number n , find a system of nested segments such that: For example, let m = 8 . The given points are marked in the picture, their weights are marked in red, their coordinates are marked in blue. Make a system of three nested segments: The first line of input data contains an integer t ( 1 <= t <= 10^4 ) --the number of input test cases. An empty line is written before each test case. The first line of each test case contains two positive integers n ( 1 <= n <= 10^5 ) and m ( 2 cdot n <= m <= 2 cdot 10^5 ). The next m lines contain pairs of integers x_i ( -10^9 <= x_i <= 10^9 ) and w_i ( -10^4 <= w_i <= 10^4 ) -- coordinate and weight of point number i ( 1 <= i <= m ) respectively. All x_i are different. It is guaranteed that the sum of m values over all test cases does not exceed 2 cdot 10^5 . For each test case, output n + 1 lines: in the first of them, output the weight of the composed system, and in the next n lines output exactly two numbers -- the indices of the points which are the endpoints of the i -th segment ( 1 <= i <= n ). The order in which you output the endpoints of a segment is not important -- you can output the index of the left endpoint first and then the number of the right endpoint, or the other way around. If ther'...

Tutorials

100712

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
148938788 nhanhoang510 C March 9, 2022, 2:29 a.m. OK FPC TESTS 8 405 2457600
148917298 fctee C March 8, 2022, 6:06 p.m. OK GNU C11 TESTS 5 514 2457600
148946090 Salfi_Sabit C March 9, 2022, 4:55 a.m. OK GNU C++14 TESTS 8 124 7372800
148944037 jarven C March 9, 2022, 4:18 a.m. OK GNU C++14 TESTS 8 140 2457600
148948527 ryanright C March 9, 2022, 5:31 a.m. OK GNU C++14 TESTS 8 140 2457600
148948490 yiwu C March 9, 2022, 5:31 a.m. OK GNU C++14 TESTS 8 140 2457600
148947073 594188 C March 9, 2022, 5:09 a.m. OK GNU C++14 TESTS 8 140 2457600
148948655 aman_5311 C March 9, 2022, 5:33 a.m. OK GNU C++14 TESTS 8 140 5632000
148945529 Salfi_Sabit C March 9, 2022, 4:45 a.m. OK GNU C++14 TESTS 8 140 7372800
148937152 _jhq C March 9, 2022, 1:45 a.m. OK GNU C++14 TESTS 8 140 13209600
148947421 zxz__ C March 9, 2022, 5:15 a.m. OK GNU C++14 TESTS 8 155 2457600
148944608 cynefin2020 C March 9, 2022, 4:28 a.m. OK GNU C++14 TESTS 8 155 2457600
148950491 xyl1234 C March 9, 2022, 5:57 a.m. OK GNU C++17 TESTS 8 109 7987200
148943304 qwertyyuu C March 9, 2022, 4:04 a.m. OK GNU C++17 TESTS 8 139 2457600
148904847 usx21423 C March 8, 2022, 4:44 p.m. OK GNU C++17 TESTS 5 139 7168000
148946248 abhishek1102 C March 9, 2022, 4:57 a.m. OK GNU C++17 TESTS 8 140 2355200
148946050 Flatday C March 9, 2022, 4:54 a.m. OK GNU C++17 TESTS 8 140 2457600
148937512 jhc_123 C March 9, 2022, 1:56 a.m. OK GNU C++17 TESTS 8 140 2662400
148927978 misbah C March 8, 2022, 8:47 p.m. OK GNU C++17 TESTS 6 140 3993600
148917785 Bruce12138 C March 8, 2022, 6:11 p.m. OK GNU C++17 TESTS 5 140 3993600
148939216 dybala21 C March 9, 2022, 2:40 a.m. OK GNU C++17 TESTS 8 140 4300800
148943251 ashish2201 C March 9, 2022, 4:03 a.m. OK GNU C++17 TESTS 8 155 2355200
148947251 GreyHatRR17 C March 9, 2022, 5:12 a.m. OK GNU C++17 (64) TESTS 8 108 7987200
148935763 lovezah C March 9, 2022, 1:03 a.m. OK GNU C++17 (64) TESTS 8 109 2457600
148934646 Artemis_Bow C March 9, 2022, 12:28 a.m. OK GNU C++17 (64) TESTS 8 109 4812800
148909389 virt_contest_taker C March 8, 2022, 4:58 p.m. OK GNU C++17 (64) TESTS 5 109 5120000
148912779 atanughosh01 C March 8, 2022, 5:22 p.m. OK GNU C++17 (64) TESTS 5 109 5632000
148904692 SorryMateWrongPath C March 8, 2022, 4:43 p.m. OK GNU C++17 (64) TESTS 5 109 6656000
148918198 pranay.2 C March 8, 2022, 6:16 p.m. OK GNU C++17 (64) TESTS 5 109 6656000
148916554 rgnerdplayer C March 8, 2022, 5:57 p.m. OK GNU C++17 (64) TESTS 5 124 2355200
148936064 fxhd C March 9, 2022, 1:12 a.m. OK GNU C++17 (64) TESTS 8 124 2457600
148947189 rat_mir C March 9, 2022, 5:11 a.m. OK GNU C++17 (64) TESTS 8 124 2457600
148936850 justcode C March 9, 2022, 1:35 a.m. OK GNU C++20 (64) TESTS 8 93 2355200
148919361 Denisov C March 8, 2022, 6:30 p.m. OK GNU C++20 (64) TESTS 5 93 2457600
148935446 qhnana7mi C March 9, 2022, 12:54 a.m. OK GNU C++20 (64) TESTS 8 93 2457600
148922352 danwuSBU C March 8, 2022, 7:12 p.m. OK GNU C++20 (64) TESTS 6 93 2457600
148920120 mihneacazan C March 8, 2022, 6:40 p.m. OK GNU C++20 (64) TESTS 5 93 2457600
148941343 Porag_2742 C March 9, 2022, 3:24 a.m. OK GNU C++20 (64) TESTS 8 93 2457600
148941018 Edric_Albert C March 9, 2022, 3:18 a.m. OK GNU C++20 (64) TESTS 8 93 2457600
148939889 downpour C March 9, 2022, 2:55 a.m. OK GNU C++20 (64) TESTS 8 93 2457600
148938639 HolyK C March 9, 2022, 2:26 a.m. OK GNU C++20 (64) TESTS 8 93 2457600
148936161 lissl123 C March 9, 2022, 1:15 a.m. OK GNU C++20 (64) TESTS 8 93 2457600
148943640 codekhan29 C March 9, 2022, 4:10 a.m. OK Java 11 TESTS 8 342 1433600
148925124 S-A-I-T-A-M-A C March 8, 2022, 7:55 p.m. OK Java 11 TESTS 6 373 5836800
148944991 aman_0 C March 9, 2022, 4:35 a.m. OK Java 11 TESTS 8 389 6963200
148941522 __Serendipity C March 9, 2022, 3:28 a.m. OK Java 11 TESTS 8 421 2764800
148941235 ytripathi891 C March 9, 2022, 3:22 a.m. OK Java 11 TESTS 8 421 16691200
148918586 SaberXpro C March 8, 2022, 6:20 p.m. OK Java 11 TESTS 5 436 5017600
148915384 adnan84 C March 8, 2022, 5:46 p.m. OK Java 11 TESTS 5 436 5222400
148921916 Andwerp C March 8, 2022, 7:06 p.m. OK Java 11 TESTS 6 436 6451200
148950548 ayush__1411 C March 9, 2022, 5:58 a.m. OK Java 11 TESTS 8 451 6041600
148902913 prabhask C March 8, 2022, 4:39 p.m. OK Java 11 TESTS 5 451 14950400
148928970 DEMO23 C March 8, 2022, 9:07 p.m. OK Java 8 TESTS 6 312 5324800
148919217 priority_is_greedy C March 8, 2022, 6:28 p.m. OK Java 8 TESTS 5 327 2969600
148929339 sky9313 C March 8, 2022, 9:16 p.m. OK Java 8 TESTS 6 327 5734400
148934535 KhadijaBadrawy C March 9, 2022, 12:25 a.m. OK Java 8 TESTS 8 358 2457600
148941801 ak_ankit C March 9, 2022, 3:34 a.m. OK Java 8 TESTS 8 373 5734400
148906904 honeysingh18 C March 8, 2022, 4:48 p.m. OK Java 8 TESTS 5 373 10649600
148918828 kocko C March 8, 2022, 6:23 p.m. OK Java 8 TESTS 5 389 1843200
148919144 fyseus C March 8, 2022, 6:27 p.m. OK Java 8 TESTS 5 405 5017600
148948984 govindrajput C March 9, 2022, 5:37 a.m. OK Java 8 TESTS 8 421 6451200
148921841 KritarthaCF C March 8, 2022, 7:05 p.m. OK Java 8 TESTS 6 451 2355200
148930253 PavelChadnov C March 8, 2022, 9:36 p.m. OK Kotlin 1.4 TESTS 8 857 19456000
148923782 Golovanov399 C March 8, 2022, 7:34 p.m. OK Kotlin 1.5 TESTS 6 1247 7475200
148902987 3blue3brown C March 8, 2022, 4:39 p.m. OK MS C++ 2017 TESTS 5 186 2355200
148908874 hyp0crite152 C March 8, 2022, 4:56 p.m. OK MS C++ 2017 TESTS 5 187 2355200
148926706 zuev93 C March 8, 2022, 8:23 p.m. OK MS C++ 2017 TESTS 6 187 2457600
148943092 RealStarlight C March 9, 2022, 4 a.m. OK MS C++ 2017 TESTS 8 436 2457600
148927172 Dead_InsideZXC C March 8, 2022, 8:32 p.m. OK MS C++ 2017 TESTS 6 670 24473600
148916601 w0wch1que C March 8, 2022, 5:58 p.m. OK MS C++ 2017 TESTS 5 780 7168000
148920071 Viktor36 C March 8, 2022, 6:40 p.m. OK MS C++ 2017 TESTS 5 826 9625600
148948730 cernlhcalpha123 C March 9, 2022, 5:34 a.m. OK MS C++ 2017 TESTS 8 857 14950400
148949146 lhcalphaA C March 9, 2022, 5:39 a.m. OK MS C++ 2017 TESTS 8 857 14950400
148903619 Wannes C March 8, 2022, 4:41 p.m. OK MS C++ 2017 TESTS 5 1138 17715200
148932985 qihto C March 8, 2022, 11:04 p.m. OK .NET Core C# TESTS 8 249 19763200
148933152 qihto C March 8, 2022, 11:33 p.m. OK .NET Core C# TESTS 8 560 19968000
148919430 orloffm C March 8, 2022, 6:31 p.m. OK .NET Core C# TESTS 5 592 23040000
148909225 suraj C March 8, 2022, 4:57 p.m. OK .NET Core C# TESTS 5 764 35328000
148903455 roshogolla C March 8, 2022, 4:41 p.m. OK PyPy 3 TESTS 5 935 24268800
148940559 toam C March 9, 2022, 3:09 a.m. OK PyPy 3 TESTS 8 1185 33894400
148946531 MistaAsh C March 9, 2022, 5:01 a.m. OK PyPy 3 TESTS 8 1200 29593600
148940435 toam C March 9, 2022, 3:07 a.m. OK PyPy 3 TESTS 8 1200 31129600
148940397 toam C March 9, 2022, 3:06 a.m. OK PyPy 3 TESTS 8 1248 35635200
148934837 michael.g.pan C March 9, 2022, 12:34 a.m. OK PyPy 3 TESTS 8 1263 36864000
148949431 kuanc C March 9, 2022, 5:43 a.m. OK PyPy 3 TESTS 8 1325 37273600
148904316 kate_py C March 8, 2022, 4:43 p.m. OK PyPy 3 TESTS 5 1418 35430400
148907896 xuhao95 C March 8, 2022, 4:51 p.m. OK PyPy 3 TESTS 5 1450 31539200
148918821 majay1638 C March 8, 2022, 6:23 p.m. OK PyPy 3 TESTS 5 1559 33996800
148909797 Nipun_Jugran C March 8, 2022, 5:01 p.m. OK PyPy 3-64 TESTS 5 623 59801600
148912858 bjy C March 8, 2022, 5:23 p.m. OK PyPy 3-64 TESTS 5 732 34816000
148916093 tyzzi C March 8, 2022, 5:53 p.m. OK PyPy 3-64 TESTS 5 857 52531200
148946432 _N_0_0_B_ C March 9, 2022, 5 a.m. OK PyPy 3-64 TESTS 8 966 57344000
148912280 bjy C March 8, 2022, 5:18 p.m. OK PyPy 3-64 TESTS 5 967 55398400
148918195 Harshwardhan_Yadav C March 8, 2022, 6:16 p.m. OK PyPy 3-64 TESTS 5 1060 63385600
148920539 kboi C March 8, 2022, 6:46 p.m. OK PyPy 3-64 TESTS 5 1075 79769600
148919840 wskhanh C March 8, 2022, 6:36 p.m. OK PyPy 3-64 TESTS 5 1216 49664000
148947194 mnkp C March 9, 2022, 5:11 a.m. OK PyPy 3-64 TESTS 8 1216 65536000
148940581 toam C March 9, 2022, 3:09 a.m. OK PyPy 3-64 TESTS 8 1247 63795200
148910250 bjy C March 8, 2022, 5:04 p.m. OK Python 3 TESTS 5 779 24166400
148909441 GtandM C March 8, 2022, 4:59 p.m. OK Python 3 TESTS 5 1091 26726400
148905737 bomul1128 C March 8, 2022, 4:46 p.m. OK Python 3 TESTS 5 1107 27033600
148939023 abhijeet.panihar.cse20 C March 9, 2022, 2:35 a.m. OK Python 3 TESTS 8 1122 23961600
148910150 akshat11 C March 8, 2022, 5:03 p.m. OK Python 3 TESTS 5 1153 32768000
148923461 mihir111p C March 8, 2022, 7:29 p.m. OK Python 3 TESTS 6 1170 24473600
148920045 DikShU_ C March 8, 2022, 6:39 p.m. OK Python 3 TESTS 5 1185 26112000
148910859 srinu879033 C March 8, 2022, 5:08 p.m. OK Python 3 TESTS 5 1231 30515200
148920261 amarbudhiraja C March 8, 2022, 6:42 p.m. OK Python 3 TESTS 5 1231 34816000
148922047 logolica99 C March 8, 2022, 7:07 p.m. OK Python 3 TESTS 6 1263 25702400
148914264 euwbah C March 8, 2022, 5:35 p.m. OK Rust 2021 TESTS 5 794 15155200

remove filters

Back to search problems