Codeforces Round 805 (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
1702 Codeforces Round 805 (Div. 3) FINISHED False 8100 79716263 July 10, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13900 ) E Split Into Two Sets PROGRAMMING dfs and similar ds graph matchings graphs

B"Polycarp was recently given a set of n (number n -- even) dominoes. Each domino contains two integers from 1 to n . Can he divide all the dominoes into two sets so that all the numbers on the dominoes of each set are different? Each domino must go into exactly one of the two sets. For example, if he has 4 dominoes: {1, 4 } , {1, 3 } , {3, 2 } and {4, 2 } , then Polycarp will be able to divide them into two sets in the required way. The first set can include the first and third dominoes ( {1, 4 } and {3, 2 } ), and the second set -- the second and fourth ones ( {1, 3 } and {4, 2 } ). The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The descriptions of the test cases follow. The first line of each test case contains a single even integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of dominoes. The next n lines contain pairs of numbers a_i and b_i ( 1 <= a_i, b_i <= n ) describing the numbers on the i -th domino. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case print: You can print YES and NO in any case (for example, the strings yEs, yes, Yes and YES will be recognized as a positive answer). In the first test case, the dominoes can be divided as follows: In the second test case, there's no way to divide dominoes into 2 sets, at least one of them will contain repeated number. "...

Tutorials

104763

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
163613912 chrisfcoder E July 11, 2022, 2:38 a.m. OK C# 10 TESTS 11 218 32460800
163593155 afanehkareem E July 10, 2022, 6:54 p.m. OK GNU C++14 TESTS 10 93 3174400
163583883 lpxlove E July 10, 2022, 5:14 p.m. OK GNU C++14 TESTS 10 93 5632000
163617695 Graythron E July 11, 2022, 3:32 a.m. OK GNU C++14 TESTS 11 93 5836800
163611689 AIM-9M E July 11, 2022, 2 a.m. OK GNU C++14 TESTS 10 93 6656000
163603359 kk8 E July 10, 2022, 10:21 p.m. OK GNU C++14 TESTS 10 93 6758400
163595242 noob-coder27 E July 10, 2022, 7:25 p.m. OK GNU C++14 TESTS 10 93 7372800
163587633 fctee E July 10, 2022, 5:47 p.m. OK GNU C++14 TESTS 10 93 7372800
163595828 Gednady E July 10, 2022, 7:35 p.m. OK GNU C++14 TESTS 10 93 7782400
163608211 wust-zzl E July 11, 2022, 12:53 a.m. OK GNU C++14 TESTS 10 93 7987200
163628794 HLY111 E July 11, 2022, 6:02 a.m. OK GNU C++14 TESTS 11 93 8806400
163606600 TheLost E July 11, 2022, 12:08 a.m. OK GNU C++17 TESTS 10 77 11878400
163615340 BK_sky E July 11, 2022, 3 a.m. OK GNU C++17 TESTS 11 78 2457600
163600986 Mahmoud-Khalid E July 10, 2022, 9:16 p.m. OK GNU C++17 TESTS 10 93 2355200
163589783 manku0818 E July 10, 2022, 6:10 p.m. OK GNU C++17 TESTS 10 93 2457600
163584363 James_Lee E July 10, 2022, 5:18 p.m. OK GNU C++17 TESTS 10 93 2457600
163617939 Einstein1234 E July 11, 2022, 3:36 a.m. OK GNU C++17 TESTS 11 93 3174400
163602886 yazan_istatiyeh E July 10, 2022, 10:07 p.m. OK GNU C++17 TESTS 10 93 3174400
163589574 manku0818 E July 10, 2022, 6:08 p.m. OK GNU C++17 TESTS 10 93 3993600
163588385 HELAL. E July 10, 2022, 5:55 p.m. OK GNU C++17 TESTS 10 93 4812800
163626619 msvardhan19 E July 11, 2022, 5:39 a.m. OK GNU C++17 TESTS 11 93 6553600
163618412 xhgua E July 11, 2022, 3:42 a.m. OK GNU C++17 (64) TESTS 11 62 2457600
163608690 RetsaZC19 E July 11, 2022, 1:04 a.m. OK GNU C++17 (64) TESTS 10 62 15257600
163583457 xhyu62 E July 10, 2022, 5:11 p.m. OK GNU C++17 (64) TESTS 10 62 24780800
163589695 lenarus E July 10, 2022, 6:09 p.m. OK GNU C++17 (64) TESTS 10 77 7987200
163614610 Coinln E July 11, 2022, 2:48 a.m. OK GNU C++17 (64) TESTS 11 77 16793600
163611647 Messywind E July 11, 2022, 2 a.m. OK GNU C++17 (64) TESTS 10 77 17612800
163609772 Sorry_Messywind E July 11, 2022, 1:26 a.m. OK GNU C++17 (64) TESTS 10 77 17612800
163583758 XHYU61 E July 10, 2022, 5:14 p.m. OK GNU C++17 (64) TESTS 10 77 24780800
163588037 pratham071 E July 10, 2022, 5:51 p.m. OK GNU C++17 (64) TESTS 10 93 9830400
163602239 Sid_7899 E July 10, 2022, 9:48 p.m. OK GNU C++17 (64) TESTS 10 93 10444800
163601619 MongyTrad E July 10, 2022, 9:33 p.m. OK GNU C++20 (64) TESTS 10 46 2457600
163626996 xuem7294 E July 11, 2022, 5:43 a.m. OK GNU C++20 (64) TESTS 11 46 3993600
163612946 19acm E July 11, 2022, 2:23 a.m. OK GNU C++20 (64) TESTS 11 46 3993600
163586695 saurav_s00 E July 10, 2022, 5:38 p.m. OK GNU C++20 (64) TESTS 10 46 3993600
163602923 Salah2Eddin E July 10, 2022, 10:08 p.m. OK GNU C++20 (64) TESTS 10 46 4812800
163593735 OptimalKnight_ E July 10, 2022, 7:02 p.m. OK GNU C++20 (64) TESTS 10 46 4812800
163584738 Bit_8 E July 10, 2022, 5:21 p.m. OK GNU C++20 (64) TESTS 10 46 4812800
163609198 crxt E July 11, 2022, 1:15 a.m. OK GNU C++20 (64) TESTS 10 46 5017600
163602158 Salah2Eddin E July 10, 2022, 9:47 p.m. OK GNU C++20 (64) TESTS 10 46 5017600
163620911 Kidding_M E July 11, 2022, 4:21 a.m. OK GNU C++20 (64) TESTS 11 46 6451200
163597960 manchik E July 10, 2022, 8:13 p.m. OK Go TESTS 10 233 22220800
163588162 giegie E July 10, 2022, 5:53 p.m. OK Go TESTS 10 265 29491200
163597476 dzhi E July 10, 2022, 8:04 p.m. OK Java 11 TESTS 10 280 5734400
163606150 djrfrn E July 10, 2022, 11:53 p.m. OK Java 11 TESTS 10 311 23347200
163624572 TheNyahPatriarch E July 11, 2022, 5:13 a.m. OK Java 11 TESTS 11 405 31641600
163592968 goyalronak3 E July 10, 2022, 6:51 p.m. OK Java 11 TESTS 10 420 54988800
163606118 saksham19270 E July 10, 2022, 11:52 p.m. OK Java 11 TESTS 10 452 72806400
163591148 garv18chauhan E July 10, 2022, 6:26 p.m. OK Java 11 TESTS 10 467 33996800
163591512 gurkaran_s E July 10, 2022, 6:31 p.m. OK Java 11 TESTS 10 498 49152000
163591345 Sikander_2000 E July 10, 2022, 6:29 p.m. OK Java 11 TESTS 10 498 49152000
163613674 aditya2024 E July 11, 2022, 2:34 a.m. OK Java 11 TESTS 11 561 48742400
163622186 yogii_123 E July 11, 2022, 4:41 a.m. OK Java 11 TESTS 11 608 91238400
163600469 Mamimi E July 10, 2022, 9:03 p.m. OK Java 17 TESTS 10 498 61337600
163584917 adi_7861 E July 10, 2022, 5:22 p.m. OK Java 8 TESTS 10 139 0
163613572 oneafter E July 11, 2022, 2:33 a.m. OK Java 8 TESTS 11 296 33792000
163621483 aryaman_571 E July 11, 2022, 4:31 a.m. OK Java 8 TESTS 11 326 54784000
163612644 oneafter E July 11, 2022, 2:18 a.m. OK Java 8 TESTS 11 327 33894400
163596094 O_E E July 10, 2022, 7:39 p.m. OK Java 8 TESTS 10 327 47308800
163602594 Sussykin E July 10, 2022, 9:58 p.m. OK Java 8 TESTS 10 342 48844800
163602545 Sussykin E July 10, 2022, 9:57 p.m. OK Java 8 TESTS 10 343 48844800
163616884 ikillmyself E July 11, 2022, 3:21 a.m. OK Java 8 TESTS 11 639 19046400
163618701 WrongAnswerOnTestCase2 E July 11, 2022, 3:47 a.m. OK Java 8 TESTS 11 686 92672000
163612906 vis21 E July 11, 2022, 2:22 a.m. OK Java 8 TESTS 11 701 58163200
163593917 mishgun E July 10, 2022, 7:05 p.m. OK MS C++ 2017 TESTS 10 311 10444800
163589148 wwwkal E July 10, 2022, 6:03 p.m. OK MS C++ 2017 TESTS 10 343 14233600
163583354 RHEXAOC E July 10, 2022, 5:11 p.m. OK MS C++ 2017 TESTS 10 499 35430400
163597172 30SK5 E July 10, 2022, 7:58 p.m. OK MS C++ 2017 TESTS 10 732 52121600
163583051 ps_12 E July 10, 2022, 5:09 p.m. OK PyPy 3 TESTS 10 1762 36454400
163590408 mohanned_war E July 10, 2022, 6:18 p.m. OK PyPy 3-64 TESTS 10 358 54886400
163593223 SophieHatter E July 10, 2022, 6:55 p.m. OK PyPy 3-64 TESTS 10 374 61747200
163623556 wwwwzhh E July 11, 2022, 4:59 a.m. OK PyPy 3-64 TESTS 11 389 189952000
163586358 samchen123 E July 10, 2022, 5:35 p.m. OK PyPy 3-64 TESTS 10 467 74752000
163623993 nsharc4 E July 11, 2022, 5:05 a.m. OK PyPy 3-64 TESTS 11 467 101785600
163624707 ahmedsiad E July 11, 2022, 5:15 a.m. OK PyPy 3-64 TESTS 11 483 76492800
163585677 bjy E July 10, 2022, 5:29 p.m. OK PyPy 3-64 TESTS 10 576 129126400
163584388 samchen123 E July 10, 2022, 5:18 p.m. OK PyPy 3-64 TESTS 10 686 35942400
163616173 shiviDON E July 11, 2022, 3:11 a.m. OK PyPy 3-64 TESTS 11 763 89497600
163596033 olezhkavayn E July 10, 2022, 7:38 p.m. OK PyPy 3-64 TESTS 10 1278 30105600
163602306 Viper35 E July 10, 2022, 9:50 p.m. OK Python 3 TESTS 10 779 18124800
163587295 bronze_coder E July 10, 2022, 5:44 p.m. OK Python 3 TESTS 10 873 40140800
163597523 anamitra E July 10, 2022, 8:05 p.m. OK Python 3 TESTS 10 888 27443200
163598937 r9RLx E July 10, 2022, 8:32 p.m. OK Python 3 TESTS 10 1216 77414400
163585133 r9RLx E July 10, 2022, 5:24 p.m. OK Python 3 TESTS 10 1231 77516800
163599508 Hyrulia E July 10, 2022, 8:42 p.m. OK Rust 2021 TESTS 10 31 9420800
163584776 jakobrs E July 10, 2022, 5:21 p.m. OK Rust 2021 TESTS 10 46 19558400
163584017 macosta E July 10, 2022, 5:15 p.m. OK Rust 2021 TESTS 10 109 3379200

remove filters

Back to search problems