Educational Codeforces Round 165 (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
1969 Educational Codeforces Round 165 (Rated for Div. 2) FINISHED False 7200 17421899 April 29, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19971 ) A Two Friends PROGRAMMING constructive algorithms implementation math 800

B"Monocarp wants to throw a party. He has n friends, and he wants to have at least 2 of them at his party. The i -th friend's best friend is p_i . All p_i are distinct, and for every i in [1, n] , p_i ne i . Monocarp can send invitations to friends. The i -th friend comes to the party if both the i -th friend and the p_i -th friend receive an invitation (note that the p_i -th friend doesn't have to actually come to the party). Each invitation is sent to exactly one of the friends. For example, if p = [3, 1, 2, 5, 4] , and Monocarp sends invitations to the friends [1, 2, 4, 5] , then the friends [2, 4, 5] will come to the party. The friend 1 won't come since his best friend didn't receive an invitation; the friend 3 won't come since he didn't receive an invitation. Calculate the minimum number of invitations Monocarp has to send so that at least 2 friends come to the party. The first line contains one integer t ( 1 <= t <= 5000 ) -- the number of test cases. Each test case consists of two lines: Print one integer -- the minimum number of invitations Monocarp has to send. In the first testcase, Monocarp can send invitations to friends 4 and 5 . Both of them will come to the party since they are each other's best friends, and both of them have invitations. In the second testcase, Monocarp can send invitations to friends 1, 2 and 3 , for example. Then friends 1 and 2 will attend: friend 1 and his best friend 2 have invitations, friend 2 and his best friend 3 have invitations. Friend 3 won't attend since his friend 4 doesn't have an invitation. It's impossible to send invitations to fewer than 3 friends in such a way that at least 2 come. In the third testcase, Monocarp can send invitations to both friends 1 and 2 , and both of them will attend. "...

Tutorials

Educational Codeforces Round 165 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
263336507 justunderdog A May 30, 2024, 3:51 p.m. OK C# 10 TESTS 35 140 3686400 800
261586307 A1ternate A May 19, 2024, 12:03 a.m. OK C# 10 TESTS 35 155 3276800 800
260660996 NoobGraph A May 12, 2024, 12:28 p.m. OK C# 10 TESTS 35 155 3276800 800
263221028 luogu_bot5 A May 30, 2024, 10:20 a.m. OK C++14 (GCC 6-32) TESTS 35 77 0 800
263222531 luogu_bot4 A May 30, 2024, 10:32 a.m. OK C++14 (GCC 6-32) TESTS 35 78 0 800
263218776 luogu_bot4 A May 30, 2024, 9:53 a.m. OK C++14 (GCC 6-32) TESTS 35 78 0 800
263592342 tzy_tmy A June 1, 2024, 7:33 a.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
263215225 luogu_bot1 A May 30, 2024, 9:07 a.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
263213829 luogu_bot2 A May 30, 2024, 8:51 a.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
263192020 amrakmal_ A May 30, 2024, 12:08 a.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
263139489 leafone A May 29, 2024, 12:21 p.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
263028867 Cinnaki A May 28, 2024, 2:58 p.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
262819420 rudrakshsattabhayya A May 27, 2024, 3:46 a.m. OK C++14 (GCC 6-32) TESTS 35 93 0 800
261927286 Jimishp6600 A May 20, 2024, 7:04 p.m. OK C++17 (GCC 7-32) TESTS 35 77 0 800
260719345 suraiyamim38 A May 12, 2024, 11 p.m. OK C++17 (GCC 7-32) TESTS 35 77 0 800
261107288 itx.darks A May 15, 2024, 9:56 p.m. OK C++17 (GCC 7-32) TESTS 35 78 0 800
260722170 Caowo0 A May 13, 2024, 12:35 a.m. OK C++17 (GCC 7-32) TESTS 35 78 0 800
260063971 bqlp A May 9, 2024, 3:04 a.m. OK C++17 (GCC 7-32) TESTS 35 78 0 800
259938165 J0hn_W1ck A May 8, 2024, 1:37 a.m. OK C++17 (GCC 7-32) TESTS 35 78 0 800
259934950 ahmed_rabie28 A May 8, 2024, 12:09 a.m. OK C++17 (GCC 7-32) TESTS 35 78 0 800
263695234 Farid22807 A June 2, 2024, 3:30 a.m. OK C++17 (GCC 7-32) TESTS 35 78 819200 800
263099332 Kareem_AlGazery A May 29, 2024, 6:58 a.m. OK C++17 (GCC 7-32) TESTS 35 92 0 800
263090114 cabron111 A May 29, 2024, 5:32 a.m. OK C++17 (GCC 7-32) TESTS 35 92 0 800
260722495 gaga999 A May 13, 2024, 12:47 a.m. OK C++20 (GCC 13-64) TESTS 35 61 102400 800
262256921 UltramanDecker A May 23, 2024, 12:28 p.m. OK C++20 (GCC 13-64) TESTS 35 62 102400 800
263162529 dsyz A May 29, 2024, 3:28 p.m. OK C++20 (GCC 13-64) TESTS 35 77 0 800
262316746 Taher_jr A May 23, 2024, 10:40 p.m. OK C++20 (GCC 13-64) TESTS 35 77 0 800
261722187 prakhars3010 A May 20, 2024, 4:48 a.m. OK C++20 (GCC 13-64) TESTS 35 77 0 800
261630179 Duck_sajin A May 19, 2024, 9:18 a.m. OK C++20 (GCC 13-64) TESTS 35 77 0 800
260972331 HyPraT_ A May 14, 2024, 6:38 p.m. OK C++20 (GCC 13-64) TESTS 35 77 0 800
260848084 meta1idor A May 13, 2024, 7:12 p.m. OK C++20 (GCC 13-64) TESTS 35 77 102400 800
262810707 luogu_bot3 A May 27, 2024, 12:45 a.m. OK C++20 (GCC 13-64) TESTS 35 77 409600 800
259923661 that.kks A May 7, 2024, 8:03 p.m. OK C++20 (GCC 13-64) TESTS 35 77 1433600 800
260573156 mohammadyamin A May 11, 2024, 6:21 p.m. OK GNU C11 TESTS 35 62 102400 800
263200933 debrup_prime A May 30, 2024, 5:17 a.m. OK GNU C11 TESTS 35 93 102400 800
262335115 titan_t3 A May 24, 2024, 5:01 a.m. OK GNU C11 TESTS 35 93 204800 800
263043688 rajkesharwani14428o A May 28, 2024, 5:01 p.m. OK GNU C11 TESTS 35 108 102400 800
262188319 nibsu05 A May 22, 2024, 7:25 p.m. OK GNU C11 TESTS 35 108 102400 800
262100690 yyy.395 A May 22, 2024, 6:47 a.m. OK GNU C11 TESTS 35 108 102400 800
262008318 CC-Princess A May 21, 2024, 11:41 a.m. OK GNU C11 TESTS 35 108 102400 800
261515528 Dzyuba_Ivan_Alekceevich A May 18, 2024, 10:40 a.m. OK GNU C11 TESTS 35 108 102400 800
260574779 Shishir_729 A May 11, 2024, 6:40 p.m. OK GNU C11 TESTS 35 108 102400 800
262327501 Sanjana_1608 A May 24, 2024, 3:09 a.m. OK GNU C11 TESTS 35 109 102400 800
263082857 nguyenquocthao00 A May 29, 2024, 3:48 a.m. OK Go TESTS 35 77 4710400 800
260060063 your_submissions_ A May 9, 2024, 1:46 a.m. OK Go TESTS 35 77 4710400 800
260057326 nguyenquocthao00 A May 9, 2024, 12:42 a.m. OK Go TESTS 35 92 4710400 800
260089000 utsu_boy A May 9, 2024, 8:02 a.m. OK Go TESTS 35 93 4710400 800
260028784 botayhard A May 8, 2024, 4:56 p.m. OK Go TESTS 35 93 12288000 800
261995055 dinhsangBKA A May 21, 2024, 10:03 a.m. OK Go TESTS 35 702 5120000 800
263072930 maet98 A May 29, 2024, 12:25 a.m. OK Go TESTS 35 703 4710400 800
261996676 dinhsangBKA A May 21, 2024, 10:16 a.m. OK Go TESTS 35 717 4710400 800
260094960 BurnerAce A May 9, 2024, 8:55 a.m. OK Java 21 TESTS 35 311 819200 800
260191311 orangetnt8 A May 10, 2024, 1:32 a.m. OK Java 21 TESTS 35 311 921600 800
260004456 Yash9890 A May 8, 2024, 1:17 p.m. OK Java 21 TESTS 35 327 512000 800
261153835 Kech A May 16, 2024, 6:49 a.m. OK Java 21 TESTS 35 327 1843200 800
263211189 Harman_Singh A May 30, 2024, 8:09 a.m. OK Java 21 TESTS 35 328 1638400 800
259892874 neralkattesanket A May 7, 2024, 3 p.m. OK Java 21 TESTS 35 343 819200 800
260498266 GoldenShadow A May 11, 2024, 6:59 a.m. OK Java 21 TESTS 35 343 1228800 800
261710053 grace.rd.xu A May 20, 2024, 12:09 a.m. OK Java 21 TESTS 35 343 1536000 800
260020016 angshn A May 8, 2024, 3:31 p.m. OK Java 21 TESTS 35 359 1228800 800
262490850 MoamenHamdan A May 25, 2024, 9:45 a.m. OK Java 21 TESTS 35 437 2355200 800
261737161 yvbf A May 20, 2024, 7:39 a.m. OK Java 8 TESTS 35 171 0 800
262404804 Me146 A May 24, 2024, 3:12 p.m. OK Java 8 TESTS 35 187 0 800
262464165 Dev3161 A May 25, 2024, 5:52 a.m. OK Java 8 TESTS 35 202 0 800
261317468 .shinchan_ A May 17, 2024, 11:03 a.m. OK Java 8 TESTS 35 202 0 800
260825722 Ovetsar_ilish A May 13, 2024, 3:52 p.m. OK Java 8 TESTS 35 202 0 800
262218185 Sumitsingh7 A May 23, 2024, 6:44 a.m. OK Java 8 TESTS 35 202 6656000 800
260841452 sam_20101999 A May 13, 2024, 6:04 p.m. OK Java 8 TESTS 35 218 0 800
263211357 Harman_Singh A May 30, 2024, 8:12 a.m. OK Java 8 TESTS 35 233 0 800
260022114 angshn A May 8, 2024, 3:51 p.m. OK Java 8 TESTS 35 234 0 800
260020488 angshn A May 8, 2024, 3:36 p.m. OK Java 8 TESTS 35 264 0 800
261215098 qDmk A May 16, 2024, 2:58 p.m. OK Kotlin 1.9 TESTS 35 281 204800 800
259863497 linxiaotian A May 7, 2024, 11:02 a.m. OK Kotlin 1.9 TESTS 35 296 1638400 800
261517785 A_23 A May 18, 2024, 10:56 a.m. OK Kotlin 1.9 TESTS 35 484 0 800
263009675 parth_7042 A May 28, 2024, 12:26 p.m. OK PHP TESTS 35 124 102400 800
260590264 DouYouRealllyKnow A May 11, 2024, 10:23 p.m. OK PyPy 3 TESTS 35 280 7475200 800
262943106 yuvraj1633 A May 28, 2024, 1 a.m. OK PyPy 3 TESTS 35 296 7372800 800
260702523 Forsaken270 A May 12, 2024, 6:24 p.m. OK PyPy 3 TESTS 35 296 7372800 800
263251740 Paras2856 A May 30, 2024, 12:59 p.m. OK PyPy 3 TESTS 35 311 8089600 800
261738621 seeforty4040 A May 20, 2024, 7:53 a.m. OK PyPy 3 TESTS 35 312 7270400 800
260186848 nuredinbederu10k A May 9, 2024, 11:53 p.m. OK PyPy 3 TESTS 35 312 7372800 800
262485926 klu-2100030642 A May 25, 2024, 9:10 a.m. OK PyPy 3 TESTS 35 328 8294400 800
263174039 satwiksh108 A May 29, 2024, 5:57 p.m. OK PyPy 3 TESTS 35 343 7372800 800
260517411 pervushiniljuha A May 11, 2024, 9:09 a.m. OK PyPy 3 TESTS 35 343 8499200 800
262452038 Lavanyaadapa A May 25, 2024, 3:18 a.m. OK PyPy 3 TESTS 35 358 7680000 800
262514881 _twi_nami A May 25, 2024, 1:32 p.m. OK PyPy 3-64 TESTS 35 124 4812800 800
263222376 DrCoder9146 A May 30, 2024, 10:31 a.m. OK PyPy 3-64 TESTS 35 124 5017600 800
259946294 Prasham A May 8, 2024, 4:06 a.m. OK PyPy 3-64 TESTS 35 139 5222400 800
261217880 SoleProprietor A May 16, 2024, 3:20 p.m. OK PyPy 3-64 TESTS 35 140 3174400 800
262920774 qwertyssoni123 A May 27, 2024, 6:11 p.m. OK PyPy 3-64 TESTS 35 140 3686400 800
262913060 PhenomSG A May 27, 2024, 4:59 p.m. OK PyPy 3-64 TESTS 35 140 3686400 800
261053998 ossau_guildo A May 15, 2024, 12:36 p.m. OK PyPy 3-64 TESTS 35 140 4096000 800
261537787 bergus A May 18, 2024, 1:45 p.m. OK PyPy 3-64 TESTS 35 140 4505600 800
260817903 Youarenotgood A May 13, 2024, 2:57 p.m. OK PyPy 3-64 TESTS 35 140 4710400 800
260775800 jimini23kjm A May 13, 2024, 10:05 a.m. OK PyPy 3-64 TESTS 35 140 6041600 800
260221354 keerthana_1510 A May 10, 2024, 8:01 a.m. OK Python 3 TESTS 35 140 0 800
263098716 klu2100031976 A May 29, 2024, 6:53 a.m. OK Python 3 TESTS 35 140 819200 800
259942112 2210040084_vamshi A May 8, 2024, 3 a.m. OK Python 3 TESTS 35 140 819200 800
261383148 hanamoin0909 A May 17, 2024, 3:37 p.m. OK Python 3 TESTS 35 140 921600 800
262709605 MinakoKojima A May 26, 2024, 1:23 p.m. OK Python 3 TESTS 35 155 0 800
259905604 Oreki. A May 7, 2024, 4:46 p.m. OK Python 3 TESTS 35 155 819200 800
263635019 barghav A June 1, 2024, 1:24 p.m. OK Python 3 TESTS 35 156 0 800
263595222 alphabetagamma19 A June 1, 2024, 7:57 a.m. OK Python 3 TESTS 35 156 0 800
263141546 vatsaltrivedi509 A May 29, 2024, 12:37 p.m. OK Python 3 TESTS 35 156 0 800
262906057 21b01a1239 A May 27, 2024, 3:56 p.m. OK Python 3 TESTS 35 156 0 800
260822793 Chalaghoram A May 13, 2024, 3:31 p.m. OK Rust 2021 TESTS 35 62 0 800
261941502 n0b0dy01 A May 20, 2024, 10:40 p.m. OK Rust 2021 TESTS 35 77 0 800
261136295 qqqqc A May 16, 2024, 3:40 a.m. OK Rust 2021 TESTS 35 77 0 800
263685939 robchik A June 1, 2024, 11:17 p.m. OK Rust 2021 TESTS 35 1374 0 800
262391148 Gendulf A May 24, 2024, 1:20 p.m. OK Scala TESTS 35 624 0 800

remove filters

Back to search problems