Educational Codeforces Round 115 (Rated for 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
1598 Educational Codeforces Round 115 (Rated for Div. 2) FINISHED False 7200 97966499 Oct. 10, 2021, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8774 ) D Training Session PROGRAMMING combinatorics math

B"Monocarp is the coach of the Berland State University programming teams. He decided to compose a problemset for a training session for his teams. Monocarp has n problems that none of his students have seen yet. The i -th problem has a topic a_i (an integer from 1 to n ) and a difficulty b_i (an integer from 1 to n ). All problems are different, that is, there are no two tasks that have the same topic and difficulty at the same time. Monocarp decided to select exactly 3 problems from n problems for the problemset. The problems should satisfy at least one of two conditions (possibly, both): Your task is to determine the number of ways to select three problems for the problemset. The first line contains a single integer t ( 1 <= t <= 50000 ) -- the number of testcases. The first line of each testcase contains an integer n ( 3 <= n <= 2 cdot 10^5 ) -- the number of problems that Monocarp have. In the i -th of the following n lines, there are two integers a_i and b_i ( 1 <= a_i, b_i <= n ) -- the topic and the difficulty of the i -th problem. It is guaranteed that there are no two problems that have the same topic and difficulty at the same time. The sum of n over all testcases doesn't exceed 2 cdot 10^5 . Print the number of ways to select three training problems that meet either of the requirements described in the statement. In the first example, you can take the following sets of three problems: Thus, the number of ways is equal to three. "...

Tutorials

95890

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
131504207 RealArtist D Oct. 10, 2021, 11:23 p.m. OK GNU C11 TESTS 49 218 8499200
131490212 rainboy D Oct. 10, 2021, 5:52 p.m. OK GNU C11 TESTS 49 233 6860800
131473572 lelouch-of-the-code D Oct. 10, 2021, 2:25 p.m. OK GNU C11 TESTS 49 233 10137600
131469916 misaka18931 D Oct. 10, 2021, 1:45 p.m. OK GNU C++14 TESTS 49 31 23756800
131517884 YangTY D Oct. 11, 2021, 5:43 a.m. OK GNU C++14 TESTS 49 31 25292800
131456519 YRL D Oct. 10, 2021, 11:27 a.m. OK GNU C++14 TESTS 49 31 51200000
131511271 q0000000 D Oct. 11, 2021, 3:49 a.m. OK GNU C++14 TESTS 49 77 6963200
131463867 ZCETHAN D Oct. 10, 2021, 12:41 p.m. OK GNU C++14 TESTS 49 78 8499200
131451905 GB11 D Oct. 10, 2021, 11:01 a.m. OK GNU C++14 TESTS 49 93 6144000
131509412 XueYJ D Oct. 11, 2021, 3:11 a.m. OK GNU C++14 TESTS 49 93 6963200
131511792 XZC__Bobby D Oct. 11, 2021, 3:58 a.m. OK GNU C++14 TESTS 49 93 6963200
131511691 childofcuriosity D Oct. 11, 2021, 3:56 a.m. OK GNU C++14 TESTS 49 93 6963200
131511552 qlwpc D Oct. 11, 2021, 3:53 a.m. OK GNU C++14 TESTS 49 93 6963200
131475377 TimWang D Oct. 10, 2021, 2:44 p.m. OK GNU C++17 TESTS 49 31 7987200
131450789 fansoffans D Oct. 10, 2021, 10:58 a.m. OK GNU C++17 TESTS 49 78 10956800
131463905 jxust_hzf D Oct. 10, 2021, 12:41 p.m. OK GNU C++17 TESTS 49 93 6963200
131477328 Mahm2od D Oct. 10, 2021, 3:06 p.m. OK GNU C++17 TESTS 49 93 6963200
131484108 Pedestrian1 D Oct. 10, 2021, 4:28 p.m. OK GNU C++17 TESTS 49 108 6963200
131480554 LptN21 D Oct. 10, 2021, 3:45 p.m. OK GNU C++17 TESTS 49 108 6963200
131513653 ________________ D Oct. 11, 2021, 4:33 a.m. OK GNU C++17 TESTS 49 108 10137600
131452538 dhruva_shashi D Oct. 10, 2021, 11:03 a.m. OK GNU C++17 TESTS 49 109 6860800
131512391 ZDF2021 D Oct. 11, 2021, 4:09 a.m. OK GNU C++17 TESTS 49 109 6963200
131478854 luatngu D Oct. 10, 2021, 3:24 p.m. OK GNU C++17 TESTS 49 109 6963200
131507544 _Isaunoya_ D Oct. 11, 2021, 2:26 a.m. OK GNU C++17 (64) TESTS 49 31 8601600
131478384 BrokenCrayon D Oct. 10, 2021, 3:19 p.m. OK GNU C++17 (64) TESTS 49 62 7577600
131459196 LushCat D Oct. 10, 2021, 11:50 a.m. OK GNU C++17 (64) TESTS 49 77 7475200
131477816 ZhuaBa D Oct. 10, 2021, 3:12 p.m. OK GNU C++17 (64) TESTS 49 77 7475200
131494708 PyPcDeV D Oct. 10, 2021, 7:04 p.m. OK GNU C++17 (64) TESTS 49 77 7475200
131500330 Pa_sha D Oct. 10, 2021, 8:57 p.m. OK GNU C++17 (64) TESTS 49 77 7475200
131511343 moo. D Oct. 11, 2021, 3:50 a.m. OK GNU C++17 (64) TESTS 49 77 7577600
131514297 simply_hooman D Oct. 11, 2021, 4:46 a.m. OK GNU C++17 (64) TESTS 49 77 7577600
131514250 Kuroni D Oct. 11, 2021, 4:45 a.m. OK GNU C++17 (64) TESTS 49 77 7577600
131511962 TAoz1 D Oct. 11, 2021, 4:01 a.m. OK GNU C++17 (64) TESTS 49 77 7577600
131506054 _Body D Oct. 11, 2021, 12:59 a.m. OK Java 11 TESTS 49 218 23859200
131512936 sumitchavan D Oct. 11, 2021, 4:19 a.m. OK Java 11 TESTS 49 249 23859200
131493760 procrastinate7 D Oct. 10, 2021, 6:48 p.m. OK Java 11 TESTS 49 249 23859200
131476641 SaberXpro D Oct. 10, 2021, 2:59 p.m. OK Java 11 TESTS 49 296 30003200
131454309 ayush__1411 D Oct. 10, 2021, 11:11 a.m. OK Java 11 TESTS 49 296 30105600
131484018 aayushdhakad D Oct. 10, 2021, 4:27 p.m. OK Java 11 TESTS 49 436 29798400
131462896 ayush__1411 D Oct. 10, 2021, 12:30 p.m. OK Java 11 TESTS 49 452 40960000
131507695 the_unseen D Oct. 11, 2021, 2:31 a.m. OK Java 11 TESTS 49 514 38092800
131458434 MrOtter D Oct. 10, 2021, 11:43 a.m. OK Java 11 TESTS 49 514 39014400
131515568 Avatar D Oct. 11, 2021, 5:08 a.m. OK Java 11 TESTS 49 545 23859200
131467524 medude D Oct. 10, 2021, 1:20 p.m. OK Java 8 TESTS 49 187 20480000
131489258 Swapniltri D Oct. 10, 2021, 5:38 p.m. OK Java 8 TESTS 49 233 20582400
131470413 201502010200 D Oct. 10, 2021, 1:51 p.m. OK Java 8 TESTS 49 358 36454400
131516968 SlowLegendaryNoobMaster D Oct. 11, 2021, 5:30 a.m. OK Java 8 TESTS 49 389 52224000
131512743 priyam_anand D Oct. 11, 2021, 4:16 a.m. OK Java 8 TESTS 49 420 38604800
131470342 201502010200 D Oct. 10, 2021, 1:50 p.m. OK Java 8 TESTS 49 451 38297600
131458643 201502010200 D Oct. 10, 2021, 11:45 a.m. OK Java 8 TESTS 49 467 38297600
131457512 Faangsexual D Oct. 10, 2021, 11:35 a.m. OK Java 8 TESTS 49 483 37683200
131466955 SadFriedRice D Oct. 10, 2021, 1:15 p.m. OK Java 8 TESTS 49 499 27852800
131492945 pras7946 D Oct. 10, 2021, 6:35 p.m. OK Java 8 TESTS 49 530 61747200
131502334 pallav12 D Oct. 10, 2021, 10:01 p.m. OK Kotlin 1.5 TESTS 49 670 75980800
131483761 Xeniya D Oct. 10, 2021, 4:24 p.m. OK MS C++ 2017 TESTS 49 312 10137600
131514708 UnHingedFrog D Oct. 11, 2021, 4:54 a.m. OK MS C++ 2017 TESTS 49 327 10137600
131456522 sendol D Oct. 10, 2021, 11:27 a.m. OK MS C++ 2017 TESTS 49 343 15052800
131495905 grey D Oct. 10, 2021, 7:24 p.m. OK MS C++ 2017 TESTS 49 421 10137600
131495518 grey D Oct. 10, 2021, 7:17 p.m. OK MS C++ 2017 TESTS 49 451 10137600
131465351 Tangerine D Oct. 10, 2021, 12:57 p.m. OK MS C++ 2017 TESTS 49 483 10035200
131456989 ILMS D Oct. 10, 2021, 11:30 a.m. OK MS C++ 2017 TESTS 49 639 13414400
131451686 r57shell D Oct. 10, 2021, 11:01 a.m. OK MS C++ 2017 TESTS 49 655 18534400
131494790 shehebe D Oct. 10, 2021, 7:05 p.m. OK PyPy 2 TESTS 49 1450 37785600
131472871 hxu10 D Oct. 10, 2021, 2:18 p.m. OK PyPy 3 TESTS 49 233 40243200
131478603 Het_Fadia D Oct. 10, 2021, 3:21 p.m. OK PyPy 3 TESTS 49 249 42086400
131475261 not_tehlka D Oct. 10, 2021, 2:43 p.m. OK PyPy 3 TESTS 49 280 39014400
131515123 Nemisis2.O D Oct. 11, 2021, 5 a.m. OK PyPy 3 TESTS 49 343 44134400
131456366 9.86960440109 D Oct. 10, 2021, 11:26 a.m. OK PyPy 3 TESTS 49 373 53964800
131453035 neterukun D Oct. 10, 2021, 11:04 a.m. OK PyPy 3 TESTS 49 404 47206400
131456893 prackode D Oct. 10, 2021, 11:29 a.m. OK PyPy 3 TESTS 49 405 49971200
131478504 Het_Fadia D Oct. 10, 2021, 3:20 p.m. OK PyPy 3 TESTS 49 420 52121600
131452040 sk_loves_Ritika D Oct. 10, 2021, 11:02 a.m. OK PyPy 3 TESTS 49 421 50176000
131454901 nitish420 D Oct. 10, 2021, 11:15 a.m. OK PyPy 3 TESTS 49 436 42803200
131514225 singh.tarun.iit D Oct. 11, 2021, 4:45 a.m. OK Python 3 TESTS 49 624 27955200
131466574 Seoul D Oct. 10, 2021, 1:10 p.m. OK Python 3 TESTS 49 639 27648000
131478720 FrozenKandy D Oct. 10, 2021, 3:22 p.m. OK Python 3 TESTS 49 655 34304000
131466530 Seoul D Oct. 10, 2021, 1:10 p.m. OK Python 3 TESTS 49 686 29286400
131478446 armsusman D Oct. 10, 2021, 3:19 p.m. OK Python 3 TESTS 49 764 32256000
131468367 Bambam_Shivam D Oct. 10, 2021, 1:28 p.m. OK Python 3 TESTS 49 842 35328000
131487305 sPARTY D Oct. 10, 2021, 5:12 p.m. OK Python 3 TESTS 49 904 34816000
131515850 KeiTsukishima D Oct. 11, 2021, 5:12 a.m. OK Python 3 TESTS 49 967 25804800
131479458 Mystic_heap D Oct. 10, 2021, 3:31 p.m. OK Python 3 TESTS 49 998 20684800
131451747 YellowFlash20 D Oct. 10, 2021, 11:01 a.m. OK Python 3 TESTS 49 1028 29286400
131465215 sansen D Oct. 10, 2021, 12:56 p.m. OK Rust TESTS 49 46 12800000
131457255 togatoga D Oct. 10, 2021, 11:32 a.m. OK Rust TESTS 49 592 14028800

remove filters

Back to search problems