Codeforces Round 765 (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
1625 Codeforces Round 765 (Div. 2) FINISHED False 7200 95277263 Jan. 12, 2022, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2100 ) D Binary Spiders PROGRAMMING bitmasks data structures implementation sortings trees

B"Binary Spiders are species of spiders that live on Mars. These spiders weave their webs to defend themselves from enemies. To weave a web, spiders join in pairs. If the first spider in pair has x legs, and the second spider has y legs, then they weave a web with durability x oplus y . Here, oplus means bitwise XOR. Binary Spiders live in large groups. You observe a group of n spiders, and the i -th spider has a_i legs. When the group is threatened, some of the spiders become defenders. Defenders are chosen in the following way. First, there must be at least two defenders. Second, any pair of defenders must be able to weave a web with durability at least k . Third, there must be as much defenders as possible. Scientists have researched the behaviour of Binary Spiders for a long time, and now they have a hypothesis that they can always choose the defenders in an optimal way, satisfying the conditions above. You need to verify this hypothesis on your group of spiders. So, you need to understand how many spiders must become defenders. You are not a Binary Spider, so you decided to use a computer to solve this problem. The first line contains two integers n and k ( 2 <= n <= 3 cdot10^5 , 0 <= k <= 2^{30} - 1 ), the amount of spiders in the group and the minimal allowed durability of a web. The second line contains n integers a_i ( 0 <= a_i <= 2^{30}-1 ) -- the number of legs the i -th spider has. In the first line, print a single integer ell ( 2 <= ell <= n ), the maximum possible amount of defenders. In the second line, print ell integers b_i , separated by a single space ( 1 <= b_i <= n ) -- indices of spiders that will become defenders. If there exists more than one way to choose the defenders, print any of them. Unfortunately, it may appear that it's impossible to choose the defenders. In this case, print a single integer -1 "...

Tutorials

Editorial of Codeforces Round #765 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
142525537 CharlesWuQiushi D Jan. 12, 2022, 3:06 p.m. OK Clang++17 Diagnostics TESTS 108 950 201318400
142511513 rainboy D Jan. 12, 2022, 1:49 p.m. OK GNU C11 TESTS 108 1512 114278400
142527758 newbiiiie D Jan. 12, 2022, 3:29 p.m. OK GNU C++14 TESTS 108 171 7577600
142511931 ACOIer D Jan. 12, 2022, 1:50 p.m. OK GNU C++14 TESTS 108 202 120524800
142557847 980798778 D Jan. 13, 2022, 2:51 a.m. OK GNU C++14 TESTS 109 218 114995200
142553310 qwq123 D Jan. 12, 2022, 11:40 p.m. OK GNU C++14 TESTS 109 233 123904000
142553467 zhangjianjuncd D Jan. 12, 2022, 11:48 p.m. OK GNU C++14 TESTS 109 234 259788800
142524186 1136899240 D Jan. 12, 2022, 2:54 p.m. OK GNU C++14 TESTS 108 249 3891200
142523888 vishnukhanna01 D Jan. 12, 2022, 2:51 p.m. OK GNU C++14 TESTS 108 249 147865600
142524680 Laya_mangi D Jan. 12, 2022, 2:58 p.m. OK GNU C++14 TESTS 108 249 147865600
142552455 ycx D Jan. 12, 2022, 10:57 p.m. OK GNU C++14 TESTS 108 264 125337600
142515807 Early D Jan. 12, 2022, 2 p.m. OK GNU C++14 TESTS 108 265 77721600
142554489 izlyforever D Jan. 13, 2022, 12:46 a.m. OK GNU C++17 TESTS 109 171 6758400
142555570 cthau D Jan. 13, 2022, 1:34 a.m. OK GNU C++17 TESTS 109 171 124620800
142566700 sharaelong D Jan. 13, 2022, 5:33 a.m. OK GNU C++17 TESTS 109 186 7065600
142512019 OIer_kzc D Jan. 12, 2022, 1:50 p.m. OK GNU C++17 TESTS 108 187 6041600
142530039 RoundRoundUP D Jan. 12, 2022, 3:55 p.m. OK GNU C++17 TESTS 108 218 154726400
142534514 ruogu D Jan. 12, 2022, 4:51 p.m. OK GNU C++17 TESTS 108 234 123392000
142516661 Kuku D Jan. 12, 2022, 2:02 p.m. OK GNU C++17 TESTS 108 249 52428800
142528491 rabbitcxk D Jan. 12, 2022, 3:37 p.m. OK GNU C++17 TESTS 108 249 113049600
142539344 one_day D Jan. 12, 2022, 5:49 p.m. OK GNU C++17 TESTS 108 265 111820800
142543345 ttsweet D Jan. 12, 2022, 6:43 p.m. OK GNU C++17 TESTS 108 280 114278400
142520578 Ahaooops D Jan. 12, 2022, 2:28 p.m. OK GNU C++17 (64) TESTS 108 187 247193600
142528299 tyin D Jan. 12, 2022, 3:35 p.m. OK GNU C++17 (64) TESTS 108 234 160563200
142526213 SevenDawns D Jan. 12, 2022, 3:13 p.m. OK GNU C++17 (64) TESTS 108 234 228659200
142513458 SevenDucks D Jan. 12, 2022, 1:54 p.m. OK GNU C++17 (64) TESTS 108 234 228659200
142565154 xzzduang D Jan. 13, 2022, 5:13 a.m. OK GNU C++17 (64) TESTS 109 249 114892800
142568685 w23c3c3 D Jan. 13, 2022, 5:57 a.m. OK GNU C++17 (64) TESTS 109 249 124518400
142525386 tom0727 D Jan. 12, 2022, 3:05 p.m. OK GNU C++17 (64) TESTS 108 264 76595200
142560518 Jeff_Lee D Jan. 13, 2022, 3:53 a.m. OK GNU C++17 (64) TESTS 109 280 112435200
142527620 rainboy D Jan. 12, 2022, 3:27 p.m. OK GNU C++17 (64) TESTS 108 280 114176000
142542504 lukameladze1 D Jan. 12, 2022, 6:30 p.m. OK GNU C++17 (64) TESTS 108 280 139673600
142524834 Igorfardoc D Jan. 12, 2022, 3 p.m. OK GNU C++20 (64) TESTS 108 109 6656000
142527338 kaiboy D Jan. 12, 2022, 3:24 p.m. OK GNU C++20 (64) TESTS 108 124 4812800
142557930 dblark D Jan. 13, 2022, 2:54 a.m. OK GNU C++20 (64) TESTS 109 124 6656000
142522528 Makcum888 D Jan. 12, 2022, 2:40 p.m. OK GNU C++20 (64) TESTS 108 140 6656000
142538786 one_day D Jan. 12, 2022, 5:42 p.m. OK GNU C++20 (64) TESTS 108 218 111820800
142527100 CCPSDCGK D Jan. 12, 2022, 3:21 p.m. OK GNU C++20 (64) TESTS 108 218 111820800
142526999 CCPSDCGK D Jan. 12, 2022, 3:20 p.m. OK GNU C++20 (64) TESTS 108 218 111820800
142522502 Makcum888 D Jan. 12, 2022, 2:40 p.m. OK GNU C++20 (64) TESTS 108 218 124518400
142525195 Lavine D Jan. 12, 2022, 3:03 p.m. OK GNU C++20 (64) TESTS 108 218 165376000
142538988 one_day D Jan. 12, 2022, 5:44 p.m. OK GNU C++20 (64) TESTS 108 233 111820800
142517698 0x3F D Jan. 12, 2022, 2:04 p.m. OK Go TESTS 108 873 70758400
142530831 MinakoKojima D Jan. 12, 2022, 4:04 p.m. OK Haskell TESTS 108 1450 96665600
142532132 robinz62 D Jan. 12, 2022, 4:20 p.m. OK Java 11 TESTS 108 654 104652800
142533012 robinz62 D Jan. 12, 2022, 4:31 p.m. OK Java 11 TESTS 108 654 152985600
142522371 Dukkha D Jan. 12, 2022, 2:39 p.m. OK Java 11 TESTS 108 811 7372800
142553721 kamranm D Jan. 13, 2022, 12:05 a.m. OK Java 11 TESTS 109 935 256409600
142552274 dzhi D Jan. 12, 2022, 10:48 p.m. OK Java 11 TESTS 108 1965 99020800
142539517 MagentaCobra D Jan. 12, 2022, 5:51 p.m. OK Java 8 TESTS 108 920 233267200
142512956 mban259 D Jan. 12, 2022, 1:53 p.m. OK .NET Core C# TESTS 108 405 56320000
142549570 OLOGY D Jan. 12, 2022, 9 p.m. OK PyPy 2 TESTS 108 1950 109670400
142549041 OLOGY D Jan. 12, 2022, 8:45 p.m. OK PyPy 2 TESTS 108 1981 109670400
142565465 hxu10 D Jan. 13, 2022, 5:17 a.m. OK PyPy 3 TESTS 109 624 63385600
142563335 hxu10 D Jan. 13, 2022, 4:44 a.m. OK PyPy 3 TESTS 109 639 63180800
142542405 hxu10 D Jan. 12, 2022, 6:29 p.m. OK PyPy 3 TESTS 108 654 63078400
142517827 lowking D Jan. 12, 2022, 2:04 p.m. OK PyPy 3 TESTS 108 1075 62054400
142564849 hxu10 D Jan. 13, 2022, 5:09 a.m. OK PyPy 3 TESTS 109 1123 67072000
142542914 hxu10 D Jan. 12, 2022, 6:36 p.m. OK PyPy 3 TESTS 108 1247 68096000
142543139 hxu10 D Jan. 12, 2022, 6:40 p.m. OK PyPy 3 TESTS 108 1326 67993600
142534427 mkawa2 D Jan. 12, 2022, 4:50 p.m. OK PyPy 3 TESTS 108 1465 113152000
142534354 mkawa2 D Jan. 12, 2022, 4:49 p.m. OK PyPy 3 TESTS 108 1918 140492800
142523255 SPD_9X2 D Jan. 12, 2022, 2:46 p.m. OK PyPy 3 TESTS 108 1934 168755200
142543432 hxu10 D Jan. 12, 2022, 6:45 p.m. OK PyPy 3-64 TESTS 108 733 110387200
142565488 hxu10 D Jan. 13, 2022, 5:17 a.m. OK PyPy 3-64 TESTS 109 733 112230400
142520750 DBabichev D Jan. 12, 2022, 2:29 p.m. OK PyPy 3-64 TESTS 108 1964 100659200
142535194 DBabichev D Jan. 12, 2022, 4:58 p.m. OK PyPy 3-64 TESTS 108 1996 100249600
142564712 Spheniscine D Jan. 13, 2022, 5:07 a.m. OK Rust 2021 TESTS 109 233 40857600
142564638 Spheniscine D Jan. 13, 2022, 5:06 a.m. OK Rust 2021 TESTS 109 233 40857600
142561828 Spheniscine D Jan. 13, 2022, 4:17 a.m. OK Rust 2021 TESTS 109 234 40857600
142559786 Spheniscine D Jan. 13, 2022, 3:37 a.m. OK Rust 2021 TESTS 109 311 40960000
142558704 Spheniscine D Jan. 13, 2022, 3:14 a.m. OK Rust 2021 TESTS 109 405 40857600

remove filters

Back to search problems