Codeforces Round 738 (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
1559 Codeforces Round 738 (Div. 2) FINISHED False 8100 108141863 Aug. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20875 ) C Mocha and Hiking PROGRAMMING constructive algorithms graphs 1200

B"The city where Mocha lives in is called Zhijiang. There are n+1 villages and 2n-1 directed roads in this city. There are two kinds of roads: Mocha plans to go hiking with Taki this weekend. To avoid the trip being boring, they plan to go through every village exactly once. They can start and finish at any villages. Can you help them to draw up a plan? Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 20 ) -- the number of test cases. Each test case consists of two lines. The first line of each test case contains a single integer n ( 1 <= n <= 10^4 ) -- indicates that the number of villages is n+1 . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 1 ). If a_i=0 , it means that there is a road from village i to village n+1 . If a_i=1 , it means that there is a road from village n+1 to village i . It is guaranteed that the sum of n over all test cases does not exceed 10^4 . For each test case, print a line with n+1 integers, where the i -th number is the i -th village they will go through. If the answer doesn't exist, print -1 . If there are multiple correct answers, you can print any one of them. In the first test case, the city looks like the following graph: So all possible answers are (1 to 4 to 2 to 3) , (1 to 2 to 3 to 4) . In the second test case, the city looks like the following graph: So all possible answers are (4 to 1 to 2 to 3) , (1 to 2 to 3 to 4) , (3 to 4 to 1 to 2) , (2 to 3 to 4 to 1) . "...

Tutorials

Tutorial (en)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
126989577 Fusor C Aug. 25, 2021, 4:54 p.m. OK GNU C11 TESTS 65 62 3788800 1200
126609555 H_a_c_kcode_gaurav C Aug. 21, 2021, 9:57 a.m. OK GNU C11 TESTS 65 77 3686400 1200
126260647 kluicer_999 C Aug. 18, 2021, 11:36 a.m. OK GNU C++14 TESTS 65 30 11776000 1200
126196546 sxk C Aug. 17, 2021, 4:12 p.m. OK GNU C++14 TESTS 65 31 3686400 1200
126633891 B4NDiT_SS C Aug. 21, 2021, 3:23 p.m. OK GNU C++14 TESTS 65 31 3686400 1200
127009452 shatianming C Aug. 26, 2021, 2:03 a.m. OK GNU C++14 TESTS 65 31 3788800 1200
127008326 zw_ling C Aug. 26, 2021, 1:23 a.m. OK GNU C++14 TESTS 65 31 3788800 1200
126999753 abhishekkumar2046 C Aug. 25, 2021, 7:47 p.m. OK GNU C++14 TESTS 65 31 3788800 1200
126994075 wolfofsv C Aug. 25, 2021, 6:04 p.m. OK GNU C++14 TESTS 65 31 3788800 1200
126980414 dsolunov C Aug. 25, 2021, 3:02 p.m. OK GNU C++14 TESTS 65 31 3788800 1200
126968382 yspm C Aug. 25, 2021, 12:31 p.m. OK GNU C++14 TESTS 65 31 3788800 1200
127010021 the_king_of_TLE C Aug. 26, 2021, 2:19 a.m. OK GNU C++14 TESTS 65 31 3788800 1200
126435644 xuyifeng C Aug. 19, 2021, 11:05 a.m. OK GNU C++17 TESTS 65 30 3788800 1200
126201220 harshit1557 C Aug. 17, 2021, 5:17 p.m. OK GNU C++17 TESTS 65 30 3788800 1200
126168027 Suhovenko17 C Aug. 17, 2021, 10:39 a.m. OK GNU C++17 TESTS 65 30 3788800 1200
126159377 Portal_Pirate C Aug. 17, 2021, 8:47 a.m. OK GNU C++17 TESTS 65 30 3788800 1200
126630145 cornflaek C Aug. 21, 2021, 2:36 p.m. OK GNU C++17 TESTS 65 30 3788800 1200
126182857 BrClaud C Aug. 17, 2021, 1:33 p.m. OK GNU C++17 TESTS 65 30 4096000 1200
126559065 this_is_ash_shar C Aug. 20, 2021, 5 p.m. OK GNU C++17 TESTS 65 30 4096000 1200
126155820 Destructive_Yash C Aug. 17, 2021, 8:03 a.m. OK GNU C++17 TESTS 65 30 4198400 1200
126167636 Invincible_2802 C Aug. 17, 2021, 10:34 a.m. OK GNU C++17 TESTS 65 30 94720000 1200
127006437 expresscode C Aug. 25, 2021, 11:57 p.m. OK GNU C++17 TESTS 65 31 3788800 1200
126149399 Joaquin144 C Aug. 17, 2021, 6:47 a.m. OK GNU C++17 (64) TESTS 65 30 4300800 1200
126158171 Biswadip C Aug. 17, 2021, 8:31 a.m. OK GNU C++17 (64) TESTS 65 30 4403200 1200
126715640 ArtemL C Aug. 22, 2021, 8:47 p.m. OK GNU C++17 (64) TESTS 65 30 4403200 1200
126971427 BlackAnt C Aug. 25, 2021, 1:15 p.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126826927 ACoder_25 C Aug. 24, 2021, 10:01 a.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126777600 devdatta2512 C Aug. 23, 2021, 4:36 p.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126777538 devdatta2512 C Aug. 23, 2021, 4:36 p.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126746300 arjunx19 C Aug. 23, 2021, 9:29 a.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126688504 darkeer C Aug. 22, 2021, 12:23 p.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126986061 Starman_ C Aug. 25, 2021, 4:07 p.m. OK GNU C++17 (64) TESTS 65 31 4300800 1200
126806058 dagnaf C Aug. 24, 2021, 5:20 a.m. OK Go TESTS 65 46 10752000 1200
126978837 brute_force_champ C Aug. 25, 2021, 2:45 p.m. OK Go TESTS 65 62 10752000 1200
126942893 kiril.minkov C Aug. 25, 2021, 6:57 a.m. OK Go TESTS 65 77 11673600 1200
126208837 codelegend C Aug. 17, 2021, 7:16 p.m. OK Haskell TESTS 65 31 11673600 1200
126779463 Witless_Deer C Aug. 23, 2021, 5:03 p.m. OK Java 11 TESTS 65 202 23859200 1200
126496655 mphillotry C Aug. 20, 2021, 3:14 a.m. OK Java 11 TESTS 65 202 23859200 1200
126178418 YaduAhuja C Aug. 17, 2021, 12:44 p.m. OK Java 11 TESTS 65 202 23859200 1200
126178388 YaduAhuja C Aug. 17, 2021, 12:44 p.m. OK Java 11 TESTS 65 202 23859200 1200
126787406 devil_the_coder C Aug. 23, 2021, 7:11 p.m. OK Java 11 TESTS 65 202 23961600 1200
126411256 Tortu C Aug. 19, 2021, 6:19 a.m. OK Java 11 TESTS 65 217 23859200 1200
126183410 ypa C Aug. 17, 2021, 1:39 p.m. OK Java 11 TESTS 65 217 24064000 1200
126214558 adarsh_goku C Aug. 17, 2021, 9:48 p.m. OK Java 11 TESTS 65 217 24371200 1200
126171171 unfixedbug C Aug. 17, 2021, 11:19 a.m. OK Java 11 TESTS 65 218 24064000 1200
127007165 aman_0 C Aug. 26, 2021, 12:34 a.m. OK Java 11 TESTS 65 218 24064000 1200
126225582 thedesalizes C Aug. 18, 2021, 3:42 a.m. OK Java 8 TESTS 65 124 20480000 1200
126828217 twoBit C Aug. 24, 2021, 10:19 a.m. OK Java 8 TESTS 65 124 20582400 1200
126604087 kelvinc1024 C Aug. 21, 2021, 8:55 a.m. OK Java 8 TESTS 65 124 20582400 1200
126234268 Ibrahimovic_The_Lion C Aug. 18, 2021, 6:11 a.m. OK Java 8 TESTS 65 124 20582400 1200
126563543 amogh717 C Aug. 20, 2021, 6:01 p.m. OK Java 8 TESTS 65 124 20889600 1200
126157102 rsingh3_be18 C Aug. 17, 2021, 8:18 a.m. OK Java 8 TESTS 65 124 20992000 1200
126476489 tarun_sm C Aug. 19, 2021, 6:15 p.m. OK Java 8 TESTS 65 124 21196800 1200
126974979 parascoding1 C Aug. 25, 2021, 1:59 p.m. OK Java 8 TESTS 65 140 20582400 1200
126599803 sg55 C Aug. 21, 2021, 8:03 a.m. OK Java 8 TESTS 65 140 21401600 1200
127003332 bubnov C Aug. 25, 2021, 9:19 p.m. OK Java 8 TESTS 65 155 20480000 1200
126479330 EgorShibaev C Aug. 19, 2021, 6:59 p.m. OK Kotlin TESTS 65 155 21811200 1200
126246285 Spheniscine C Aug. 18, 2021, 8:37 a.m. OK Kotlin TESTS 65 155 22937600 1200
126552502 catcatcute C Aug. 20, 2021, 3:41 p.m. OK Kotlin TESTS 65 156 21811200 1200
126486029 arvindf232 C Aug. 19, 2021, 9:13 p.m. OK Kotlin TESTS 65 156 21913600 1200
126680635 mishagam C Aug. 22, 2021, 9:59 a.m. OK Kotlin TESTS 65 264 22016000 1200
126220713 bkifhr8 C Aug. 18, 2021, 1:52 a.m. OK MS C++ 2017 TESTS 65 31 3788800 1200
126271434 the-fly0618 C Aug. 18, 2021, 1:39 p.m. OK MS C++ 2017 TESTS 65 31 3788800 1200
126266599 DragonsSin_Meliodas C Aug. 18, 2021, 12:44 p.m. OK MS C++ 2017 TESTS 65 31 3788800 1200
126160396 YaMi506 C Aug. 17, 2021, 8:59 a.m. OK MS C++ 2017 TESTS 65 31 3788800 1200
126524806 gggggg50010 C Aug. 20, 2021, 10:07 a.m. OK MS C++ 2017 TESTS 65 31 4096000 1200
126164110 HHzp C Aug. 17, 2021, 9:49 a.m. OK MS C++ 2017 TESTS 65 31 4096000 1200
126625191 QGiang C Aug. 21, 2021, 1:30 p.m. OK MS C++ 2017 TESTS 65 46 3788800 1200
126964503 Ivan_Dunko C Aug. 25, 2021, 11:38 a.m. OK MS C++ 2017 TESTS 65 46 3788800 1200
126761138 abacaba_ C Aug. 23, 2021, 1:13 p.m. OK MS C++ 2017 TESTS 65 46 3788800 1200
126607638 IAmTheNight2000 C Aug. 21, 2021, 9:35 a.m. OK MS C++ 2017 TESTS 65 46 3788800 1200
126201132 Dnk4315 C Aug. 17, 2021, 5:15 p.m. OK .NET Core C# TESTS 65 109 13414400 1200
126441795 oChamptho C Aug. 19, 2021, 12:10 p.m. OK PyPy 3 TESTS 65 108 29491200 1200
126381482 varundbabbar C Aug. 18, 2021, 7:19 p.m. OK PyPy 3 TESTS 65 109 22323200 1200
126686618 THE_SUS C Aug. 22, 2021, 11:49 a.m. OK PyPy 3 TESTS 65 124 22528000 1200
126181947 YMSeah C Aug. 17, 2021, 1:24 p.m. OK PyPy 3 TESTS 65 124 22528000 1200
126801280 Mark_Stark1 C Aug. 24, 2021, 3:39 a.m. OK PyPy 3 TESTS 65 124 22732800 1200
126170978 Huntersoulz C Aug. 17, 2021, 11:17 a.m. OK PyPy 3 TESTS 65 124 22835200 1200
126162877 kirito18086 C Aug. 17, 2021, 9:32 a.m. OK PyPy 3 TESTS 65 124 22835200 1200
126429951 _borsch C Aug. 19, 2021, 10 a.m. OK PyPy 3 TESTS 65 124 23142400 1200
126208510 hxu10 C Aug. 17, 2021, 7:10 p.m. OK PyPy 3 TESTS 65 124 23142400 1200
126674804 Girniiiii C Aug. 22, 2021, 8:17 a.m. OK PyPy 3 TESTS 65 124 23347200 1200
126933349 coder3433 C Aug. 25, 2021, 4:47 a.m. OK Python 3 TESTS 65 77 7065600 1200
126643813 Angrym C Aug. 21, 2021, 5:43 p.m. OK Python 3 TESTS 65 77 7065600 1200
126226241 rahul_beginner C Aug. 18, 2021, 3:58 a.m. OK Python 3 TESTS 65 77 7065600 1200
126421811 aranjan1 C Aug. 19, 2021, 8:24 a.m. OK Python 3 TESTS 65 77 7168000 1200
126190511 shaarangg C Aug. 17, 2021, 2:57 p.m. OK Python 3 TESTS 65 77 7270400 1200
126797442 elvesandy C Aug. 24, 2021, 1:44 a.m. OK Python 3 TESTS 65 77 7372800 1200
126617132 vijayaram C Aug. 21, 2021, 11:38 a.m. OK Python 3 TESTS 65 77 7372800 1200
126799037 elvesandy C Aug. 24, 2021, 2:36 a.m. OK Python 3 TESTS 65 77 7475200 1200
126197367 Anshuman2043 C Aug. 17, 2021, 4:23 p.m. OK Python 3 TESTS 65 77 7782400 1200
126912579 pearsareunderrated C Aug. 24, 2021, 7:08 p.m. OK Python 3 TESTS 65 77 10444800 1200
126201670 sasha.kudasov04 C Aug. 17, 2021, 5:23 p.m. OK Rust TESTS 65 30 3891200 1200
126201566 sasha.kudasov04 C Aug. 17, 2021, 5:22 p.m. OK Rust TESTS 65 31 3891200 1200
126200976 sasha.kudasov04 C Aug. 17, 2021, 5:13 p.m. OK Rust TESTS 65 31 3891200 1200
126198930 sasha.kudasov04 C Aug. 17, 2021, 4:44 p.m. OK Rust TESTS 65 46 3891200 1200
126183944 LukaTchumburidze C Aug. 17, 2021, 1:45 p.m. OK Rust TESTS 65 46 4403200 1200

remove filters

Back to search problems