Codeforces Round 672 (Div. 2)

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
1420 Codeforces Round 672 (Div. 2) FINISHED False 7200 136394711 Sept. 24, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7731 ) D Rescue Nibel! PROGRAMMING combinatorics data structures sortings

B"Ori and Sein have overcome many difficult challenges. They finally lit the Shrouded Lantern and found Gumon Seal, the key to the Forlorn Ruins. When they tried to open the door to the ruins... nothing happened. Ori was very surprised, but Sein gave the explanation quickly: clever Gumon decided to make an additional defence for the door. There are n lamps with Spirit Tree's light. Sein knows the time of turning on and off for the i -th lamp -- l_i and r_i respectively. To open the door you have to choose k lamps in such a way that there will be a moment of time when they all will be turned on. While Sein decides which of the k lamps to pick, Ori is interested: how many ways there are to pick such k lamps that the door will open? It may happen that Sein may be wrong and there are no such k lamps. The answer might be large, so print it modulo 998 ,244 ,353 . First line contains two integers n and k ( 1 <= n <= 3 cdot 10^5 , 1 <= k <= n ) -- total number of lamps and the number of lamps that must be turned on simultaneously. Next n lines contain two integers l_i ans r_i ( 1 <= l_i <= r_i <= 10^9 ) -- period of time when i -th lamp is turned on. Print one integer -- the answer to the task modulo 998 ,244 ,353 . In first test case there are nine sets of k lamps: (1, 2, 3) , (1, 2, 4) , (1, 2, 5) , (1, 2, 6) , (1, 3, 6) , (1, 4, 6) , (2, 3, 6) , (2, 4, 6) , (2, 6, 7) . In second test case k=1 , so the answer is 3. In third test case there are no such pairs of lamps. In forth test case all lamps are turned on in a time 3 , so the answer is 1. In fifth test case there are seven sets of k lamps: (1, 2) , (1, 3) , (2, 3) , (2, 4) , (3, 4) , (3, 5) , (4, 5) . "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
93744607 gxlois D Sept. 25, 2020, 3:04 a.m. OK D TESTS 99 717 65638400
93744899 gxlois D Sept. 25, 2020, 3:11 a.m. OK D TESTS 99 717 81715200
93744280 gxlois D Sept. 25, 2020, 2:56 a.m. OK D TESTS 99 732 65638400
93744227 gxlois D Sept. 25, 2020, 2:55 a.m. OK D TESTS 99 733 76390400
93744388 gxlois D Sept. 25, 2020, 2:59 a.m. OK D TESTS 99 763 68096000
93744107 gxlois D Sept. 25, 2020, 2:52 a.m. OK D TESTS 99 763 93696000
93743979 gxlois D Sept. 25, 2020, 2:49 a.m. OK D TESTS 99 857 63283200
93723727 cheese-cracker D Sept. 24, 2020, 6:19 p.m. OK D TESTS 99 904 40140800
93743858 gxlois D Sept. 25, 2020, 2:46 a.m. OK D TESTS 99 951 50790400
93738476 ruban D Sept. 24, 2020, 11:53 p.m. OK FPC TESTS 99 1247 180736000
93738317 ruban D Sept. 24, 2020, 11:45 p.m. OK FPC TESTS 99 1887 157900800
93714632 pengin_2000 D Sept. 24, 2020, 4:26 p.m. OK GNU C11 TESTS 99 873 19251200
93739572 Leidaxxb D Sept. 25, 2020, 12:39 a.m. OK GNU C++11 TESTS 99 109 17408000
93742958 WaluntOvO D Sept. 25, 2020, 2:24 a.m. OK GNU C++11 TESTS 99 124 28672000
93712431 Yukikaze_ D Sept. 24, 2020, 4:20 p.m. OK GNU C++11 TESTS 99 124 28876800
93740767 Contna D Sept. 25, 2020, 1:21 a.m. OK GNU C++11 TESTS 99 156 12083200
93711763 aa___ D Sept. 24, 2020, 4:18 p.m. OK GNU C++11 TESTS 99 171 7065600
93726365 LKPl D Sept. 24, 2020, 6:46 p.m. OK GNU C++11 TESTS 99 171 17408000
93711257 DarkoLoveRuby D Sept. 24, 2020, 4:17 p.m. OK GNU C++11 TESTS 99 186 7065600
93713048 wssstc D Sept. 24, 2020, 4:22 p.m. OK GNU C++11 TESTS 99 187 10342400
93734509 Zihad_Bd D Sept. 24, 2020, 9:10 p.m. OK GNU C++11 TESTS 99 187 15052800
93716900 Mario_SZ D Sept. 24, 2020, 4:32 p.m. OK GNU C++11 TESTS 99 202 12083200
93753045 willingox D Sept. 25, 2020, 5:45 a.m. OK GNU C++14 TESTS 99 202 9830400
93750980 ylycjh D Sept. 25, 2020, 5:12 a.m. OK GNU C++14 TESTS 99 218 12288000
93714765 Shoom1 D Sept. 24, 2020, 4:27 p.m. OK GNU C++14 TESTS 99 249 8704000
93713957 zhz520 D Sept. 24, 2020, 4:24 p.m. OK GNU C++14 TESTS 99 249 11059200
93738307 Trys_Like_Buffalo D Sept. 24, 2020, 11:45 p.m. OK GNU C++14 TESTS 99 249 12185600
93716483 lvlouhss D Sept. 24, 2020, 4:31 p.m. OK GNU C++14 TESTS 99 249 12288000
93741761 elitedj D Sept. 25, 2020, 1:51 a.m. OK GNU C++14 TESTS 99 249 15257600
93724041 0o_o0 D Sept. 24, 2020, 6:22 p.m. OK GNU C++14 TESTS 99 249 15360000
93740556 Rebro D Sept. 25, 2020, 1:14 a.m. OK GNU C++14 TESTS 99 249 17715200
93738157 SuperJ6 D Sept. 24, 2020, 11:36 p.m. OK GNU C++14 TESTS 99 249 19456000
93744231 starve_to_death D Sept. 25, 2020, 2:55 a.m. OK GNU C++17 TESTS 99 217 17510400
93740592 SPOON796 D Sept. 25, 2020, 1:15 a.m. OK GNU C++17 TESTS 99 218 9625600
93737469 caoduy73 D Sept. 24, 2020, 11:02 p.m. OK GNU C++17 TESTS 99 218 14438400
93751549 zstu_jack D Sept. 25, 2020, 5:22 a.m. OK GNU C++17 TESTS 99 218 16281600
93724923 Geek_Lord D Sept. 24, 2020, 6:30 p.m. OK GNU C++17 TESTS 99 218 17510400
93748159 sauravsihag D Sept. 25, 2020, 4:20 a.m. OK GNU C++17 TESTS 99 233 10444800
93724400 pkj D Sept. 24, 2020, 6:25 p.m. OK GNU C++17 TESTS 99 233 19865600
93748815 GoogleBot D Sept. 25, 2020, 4:32 a.m. OK GNU C++17 TESTS 99 233 23859200
93713803 WO_OD D Sept. 24, 2020, 4:24 p.m. OK GNU C++17 TESTS 99 234 9625600
93739928 Wonsei D Sept. 25, 2020, 12:53 a.m. OK GNU C++17 TESTS 99 249 7270400
93717169 tanimania D Sept. 24, 2020, 4:33 p.m. OK GNU C++17 (64) TESTS 99 186 10854400
93737206 kessido D Sept. 24, 2020, 10:49 p.m. OK GNU C++17 (64) TESTS 99 186 13312000
93721745 marmot0814 D Sept. 24, 2020, 6:06 p.m. OK GNU C++17 (64) TESTS 99 186 20889600
93738598 Gats D Sept. 24, 2020, 11:58 p.m. OK GNU C++17 (64) TESTS 99 187 14643200
93732916 pizdato D Sept. 24, 2020, 8:32 p.m. OK GNU C++17 (64) TESTS 99 187 18432000
93712969 De-Bug D Sept. 24, 2020, 4:22 p.m. OK GNU C++17 (64) TESTS 99 202 12083200
93729135 hltk D Sept. 24, 2020, 7:23 p.m. OK GNU C++17 (64) TESTS 99 202 21708800
93732624 pizdato D Sept. 24, 2020, 8:26 p.m. OK GNU C++17 (64) TESTS 99 202 25702400
93749078 R.Anwar D Sept. 25, 2020, 4:38 a.m. OK GNU C++17 (64) TESTS 99 202 31129600
93736498 TomazGomes D Sept. 24, 2020, 10:18 p.m. OK GNU C++17 (64) TESTS 99 202 31129600
93737022 clyring D Sept. 24, 2020, 10:41 p.m. OK Haskell TESTS 99 1465 47411200
93727646 clyring D Sept. 24, 2020, 7:03 p.m. OK Haskell TESTS 99 1809 84172800
93742603 Abhay278 D Sept. 25, 2020, 2:14 a.m. OK Java 11 TESTS 99 592 0
93735708 aimeemontero D Sept. 24, 2020, 9:48 p.m. OK Java 11 TESTS 99 623 24268800
93754099 nirvana_rsc D Sept. 25, 2020, 6 a.m. OK Java 11 TESTS 99 670 32153600
93745272 qlf9 D Sept. 25, 2020, 3:19 a.m. OK Java 11 TESTS 99 904 24576000
93727021 tech_night D Sept. 24, 2020, 6:55 p.m. OK Java 11 TESTS 99 982 19456000
93733299 blackBird D Sept. 24, 2020, 8:41 p.m. OK Java 11 TESTS 99 998 32870400
93711971 PratyushS7 D Sept. 24, 2020, 4:19 p.m. OK Java 11 TESTS 99 1029 17305600
93752579 shrey_shreyansh D Sept. 25, 2020, 5:38 a.m. OK Java 11 TESTS 99 1029 17305600
93713359 adarsh000321 D Sept. 24, 2020, 4:23 p.m. OK Java 11 TESTS 99 1075 5324800
93730809 Lior D Sept. 24, 2020, 7:50 p.m. OK Java 11 TESTS 99 1185 38092800
93723089 TheSawan D Sept. 24, 2020, 6:14 p.m. OK Java 8 TESTS 99 701 25702400
93734250 Jevin D Sept. 24, 2020, 9:04 p.m. OK Java 8 TESTS 99 748 14233600
93711599 kishankumar001122 D Sept. 24, 2020, 4:18 p.m. OK Java 8 TESTS 99 842 33689600
93723267 AnandOza D Sept. 24, 2020, 6:16 p.m. OK Java 8 TESTS 99 857 15155200
93749905 punit31 D Sept. 25, 2020, 4:53 a.m. OK Java 8 TESTS 99 857 16691200
93724355 pupil_forever D Sept. 24, 2020, 6:25 p.m. OK Java 8 TESTS 99 888 17305600
93724398 ShesMyNerd D Sept. 24, 2020, 6:25 p.m. OK Java 8 TESTS 99 888 32870400
93737376 desp__beginner D Sept. 24, 2020, 10:58 p.m. OK Java 8 TESTS 99 904 23142400
93722189 kostasanemozalis D Sept. 24, 2020, 6:08 p.m. OK Java 8 TESTS 99 919 20070400
93733283 desp__beginner D Sept. 24, 2020, 8:40 p.m. OK Java 8 TESTS 99 951 23142400
93722821 ostroumov D Sept. 24, 2020, 6:12 p.m. OK Kotlin TESTS 99 1403 42086400
93737368 little_lion D Sept. 24, 2020, 10:57 p.m. OK MS C++ 2017 TESTS 99 1060 4812800
93716553 rhksdn6227 D Sept. 24, 2020, 4:31 p.m. OK MS C++ 2017 TESTS 99 1091 26726400
93741792 huhao441 D Sept. 25, 2020, 1:52 a.m. OK MS C++ 2017 TESTS 99 1341 115507200
93727650 EvgeniusASPX D Sept. 24, 2020, 7:03 p.m. OK MS C++ 2017 TESTS 99 1497 28876800
93728338 EvgeniusASPX D Sept. 24, 2020, 7:12 p.m. OK MS C++ 2017 TESTS 99 1575 28979200
93724965 EvgeniusASPX D Sept. 24, 2020, 6:31 p.m. OK MS C++ 2017 TESTS 99 1918 33177600
93714345 mban259 D Sept. 24, 2020, 4:25 p.m. OK .NET Core C# TESTS 99 483 59289600
93730401 realnimish D Sept. 24, 2020, 7:43 p.m. OK PyPy 2 TESTS 99 873 61952000
93727123 Hitikkumar D Sept. 24, 2020, 6:56 p.m. OK PyPy 2 TESTS 99 1388 37376000
93742197 c1729 D Sept. 25, 2020, 2:04 a.m. OK PyPy 2 TESTS 99 1418 105676800
93721933 Hitikkumar D Sept. 24, 2020, 6:07 p.m. OK PyPy 2 TESTS 99 1544 37683200
93730340 realnimish D Sept. 24, 2020, 7:42 p.m. OK PyPy 2 TESTS 99 1559 42496000
93726423 Hitikkumar D Sept. 24, 2020, 6:47 p.m. OK PyPy 2 TESTS 99 1560 37376000
93736970 beethoven97 D Sept. 24, 2020, 10:39 p.m. OK PyPy 2 TESTS 99 1840 158412800
93736939 beethoven97 D Sept. 24, 2020, 10:38 p.m. OK PyPy 2 TESTS 99 1872 158515200
93734083 FlakeLCR D Sept. 24, 2020, 9 p.m. OK PyPy 3 TESTS 99 576 65126400
93729753 throwawayatcoder D Sept. 24, 2020, 7:32 p.m. OK PyPy 3 TESTS 99 577 65126400
93734096 FlakeLCR D Sept. 24, 2020, 9 p.m. OK PyPy 3 TESTS 99 608 65126400
93728277 brthyyjp D Sept. 24, 2020, 7:11 p.m. OK PyPy 3 TESTS 99 623 40243200
93744379 Code_Breaker D Sept. 25, 2020, 2:59 a.m. OK PyPy 3 TESTS 99 686 87756800
93741717 taoboquan1 D Sept. 25, 2020, 1:50 a.m. OK PyPy 3 TESTS 99 686 87756800
93736263 conqueror_of_tourist D Sept. 24, 2020, 10:08 p.m. OK PyPy 3 TESTS 99 686 87756800
93721356 throwawayatcoder D Sept. 24, 2020, 6:05 p.m. OK PyPy 3 TESTS 99 716 84377600
93753619 saharshr D Sept. 25, 2020, 5:54 a.m. OK PyPy 3 TESTS 99 780 79052800
93753931 saharshr D Sept. 25, 2020, 5:58 a.m. OK PyPy 3 TESTS 99 780 79360000
93714522 nwi D Sept. 24, 2020, 4:26 p.m. OK Python 2 TESTS 99 1310 32460800
93723238 sh1194 D Sept. 24, 2020, 6:16 p.m. OK Python 3 TESTS 99 1840 70553600
93721887 FlakeLCR D Sept. 24, 2020, 6:07 p.m. OK Python 3 TESTS 99 1964 26931200
93753880 Gokulav D Sept. 25, 2020, 5:57 a.m. OK Python 3 TESTS 99 1965 37171200
93738431 sansen D Sept. 24, 2020, 11:51 p.m. OK Rust TESTS 99 140 23961600
93722243 bqn D Sept. 24, 2020, 6:09 p.m. OK Rust TESTS 99 249 24883200
93738148 o2c D Sept. 24, 2020, 11:36 p.m. OK Rust TESTS 99 296 25804800

remove filters

Back to search problems