Codeforces Round 870 (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
1826 Codeforces Round 870 (Div. 2) FINISHED False 7200 48525899 May 5, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15381 ) A Trust Nobody PROGRAMMING brute force greedy implementation sortings 1200

B'There is a group of n people. Some of them might be liars, who always tell lies. Other people always tell the truth. The i -th person says "There are at least l_i liars amongst us". Determine if what people are saying is contradictory, or if it is possible. If it is possible, output the number of liars in the group. If there are multiple possible answers, output any one of them. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 100 ). The second line of each test case contains n integers l_i ( 0 <= q l_i <= q n ) -- the number said by the i -th person. It 's guaranteed that the sum of all n does not exceed 10^4 . For each test case output a single integer. If what people are saying is contradictory, output -1 . Otherwise, output the number of liars in the group. If there are multiple possible answers, output any one of them. In the first example, the only possible answer is that the second person is a liar, so the answer is 1 liar. In the second example, it can be proven that we can 't choose the liars so that all the requirements are satisfied. In the third example, everybody tells the truth, so the answer is 0 liars. '...

Tutorials

Codeforces Round #870 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
204960511 DiponkarSaha A May 7, 2023, 10:47 a.m. OK C# 10 TESTS 17 46 614400 1200
206276647 Asadul_Islam A May 17, 2023, 7:28 p.m. OK C# 10 TESTS 17 46 819200 1200
205028423 FatalityNT A May 7, 2023, 9:57 p.m. OK C# 8 TESTS 17 124 921600 1200
205113082 Vium A May 8, 2023, 1:32 p.m. OK Clang++17 Diagnostics TESTS 17 61 7372800 1200
205437941 2000030103 A May 11, 2023, 1:50 p.m. OK Clang++17 Diagnostics TESTS 17 61 8601600 1200
205052278 supercluster A May 8, 2023, 7:11 a.m. OK Clang++17 Diagnostics TESTS 17 62 0 1200
205396282 Tongxin2021 A May 11, 2023, 6:47 a.m. OK Clang++17 Diagnostics TESTS 17 62 102400 1200
204942407 never_ak A May 7, 2023, 8:08 a.m. OK Clang++17 Diagnostics TESTS 17 62 7372800 1200
204958723 DiveInTheLake A May 7, 2023, 10:29 a.m. OK Clang++17 Diagnostics TESTS 17 62 7372800 1200
205438165 vjudge4 A May 11, 2023, 1:51 p.m. OK Clang++17 Diagnostics TESTS 17 62 8601600 1200
205421286 2000031380 A May 11, 2023, 11:24 a.m. OK Clang++17 Diagnostics TESTS 17 93 0 1200
204926367 vjudge3 A May 7, 2023, 5:38 a.m. OK Clang++20 Diagnostics TESTS 17 46 2048000 1200
205070159 xodiac A May 8, 2023, 10:46 a.m. OK Clang++20 Diagnostics TESTS 17 62 0 1200
204974049 zxs1121 A May 7, 2023, 12:47 p.m. OK Clang++20 Diagnostics TESTS 17 62 512000 1200
205414793 bkifhr10 A May 11, 2023, 10:16 a.m. OK Clang++20 Diagnostics TESTS 17 77 0 1200
205978266 TSMMTC A May 15, 2023, 12:09 p.m. OK Clang++20 Diagnostics TESTS 17 93 7372800 1200
205983981 vjudge1 A May 15, 2023, 1:01 p.m. OK Clang++20 Diagnostics TESTS 17 109 7372800 1200
205327707 Anna-Anastasia A May 10, 2023, 12:44 p.m. OK GNU C11 TESTS 17 30 0 1200
204977781 lalala. A May 7, 2023, 1:20 p.m. OK GNU C11 TESTS 17 30 0 1200
204926537 devgupta4105 A May 7, 2023, 5:39 a.m. OK GNU C11 TESTS 17 30 0 1200
205035249 666long A May 8, 2023, 1:47 a.m. OK GNU C11 TESTS 17 31 0 1200
204977730 lalala. A May 7, 2023, 1:19 p.m. OK GNU C11 TESTS 17 31 0 1200
206182971 jiangzhihui A May 17, 2023, 7:59 a.m. OK GNU C++14 TESTS 17 15 0 1200
206137181 Sahithi2034 A May 16, 2023, 5:07 p.m. OK GNU C++14 TESTS 17 15 0 1200
206055330 chaukohodo A May 16, 2023, 6:55 a.m. OK GNU C++14 TESTS 17 15 0 1200
205939200 SunShine11 A May 15, 2023, 4:10 a.m. OK GNU C++14 TESTS 17 15 0 1200
205749624 TheMaverick A May 13, 2023, 5:43 p.m. OK GNU C++14 TESTS 17 15 0 1200
206312600 tyhh A May 18, 2023, 8:13 a.m. OK GNU C++14 TESTS 17 15 0 1200
206211939 admin1lin2 A May 17, 2023, 12:49 p.m. OK GNU C++14 TESTS 17 15 0 1200
206223095 Mr_unique123 A May 17, 2023, 2:30 p.m. OK GNU C++14 TESTS 17 15 0 1200
206284020 dzy1122 A May 17, 2023, 10:30 p.m. OK GNU C++14 TESTS 17 15 0 1200
206189028 WYH888 A May 17, 2023, 9:05 a.m. OK GNU C++14 TESTS 17 15 0 1200
206396415 keerthisatti A May 19, 2023, 2:14 a.m. OK GNU C++17 TESTS 17 15 0 1200
206455426 2soon A May 19, 2023, 2:08 p.m. OK GNU C++17 TESTS 17 15 0 1200
206447620 naisheelpatel A May 19, 2023, 12:50 p.m. OK GNU C++17 TESTS 17 15 0 1200
206424638 just_me_007 A May 19, 2023, 8:57 a.m. OK GNU C++17 TESTS 17 15 0 1200
206420182 Tunggg A May 19, 2023, 8:14 a.m. OK GNU C++17 TESTS 17 15 0 1200
206398635 ZuoWangDao A May 19, 2023, 3:04 a.m. OK GNU C++17 TESTS 17 15 0 1200
206370981 Rashed.23 A May 18, 2023, 5:30 p.m. OK GNU C++17 TESTS 17 15 0 1200
206326287 kernelpopped A May 18, 2023, 10:32 a.m. OK GNU C++17 TESTS 17 15 0 1200
206310539 linmanba A May 18, 2023, 7:47 a.m. OK GNU C++17 TESTS 17 15 0 1200
206306905 Hagar_Alsayed A May 18, 2023, 7:06 a.m. OK GNU C++17 TESTS 17 15 0 1200
205185700 OTTFF A May 9, 2023, 5:23 a.m. OK GNU C++17 (64) TESTS 17 0 0 1200
205391599 Alex_Wei A May 11, 2023, 5:41 a.m. OK GNU C++17 (64) TESTS 17 0 1024000 1200
206140834 anhkha2003 A May 16, 2023, 5:42 p.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206089383 Lenlynn A May 16, 2023, 12:55 p.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206300820 guptaaditya30121 A May 18, 2023, 5:47 a.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206171536 sabretooth1405 A May 17, 2023, 4:57 a.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206396947 Hangbust A May 19, 2023, 2:28 a.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206434147 SyruLoveNewTechnology A May 19, 2023, 10:30 a.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206370391 godgenji A May 18, 2023, 5:25 p.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206360265 GudeGude A May 18, 2023, 3:41 p.m. OK GNU C++17 (64) TESTS 17 15 0 1200
206131459 BlackMamba A May 16, 2023, 4:04 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206355490 tonmoy6052 A May 18, 2023, 2:57 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206354477 B3Q A May 18, 2023, 2:48 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206350856 Xingon_ A May 18, 2023, 2:16 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206341077 GuAn666 A May 18, 2023, 12:45 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206226339 xiaofanger A May 17, 2023, 3:04 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206198638 Siri.Mei A May 17, 2023, 10:48 a.m. OK GNU C++20 (64) TESTS 17 0 0 1200
206074686 Mina7akim A May 16, 2023, 10:38 a.m. OK GNU C++20 (64) TESTS 17 0 0 1200
205946001 einekleine17 A May 15, 2023, 6:03 a.m. OK GNU C++20 (64) TESTS 17 0 0 1200
205925785 alixeid A May 14, 2023, 9:59 p.m. OK GNU C++20 (64) TESTS 17 0 0 1200
205658397 Kimi_Zhang A May 13, 2023, 1:40 a.m. OK Go TESTS 17 15 307200 1200
205056773 lordvidex A May 8, 2023, 8:09 a.m. OK Go TESTS 17 31 409600 1200
205929660 thekyllerwhale A May 15, 2023, 12:08 a.m. OK Go TESTS 17 109 716800 1200
205330934 XIN A May 10, 2023, 1:13 p.m. OK Java 11 TESTS 17 171 0 1200
204959833 themadknight45 A May 7, 2023, 10:40 a.m. OK Java 11 TESTS 17 171 0 1200
206363329 The_terminator A May 18, 2023, 4:11 p.m. OK Java 11 TESTS 17 186 0 1200
205019721 Mohamed_Hussein14 A May 7, 2023, 7:20 p.m. OK Java 11 TESTS 17 187 0 1200
204918131 sanisu A May 7, 2023, 4:19 a.m. OK Java 11 TESTS 17 217 0 1200
206164616 vipul5565kumar A May 17, 2023, 1:57 a.m. OK Java 11 TESTS 17 218 0 1200
205417196 Lazy_Propagation_ A May 11, 2023, 10:43 a.m. OK Java 11 TESTS 17 233 0 1200
205406369 flicktoss A May 11, 2023, 8:48 a.m. OK Java 11 TESTS 17 233 0 1200
205075077 sirikolipaka A May 8, 2023, 11:36 a.m. OK Java 11 TESTS 17 233 0 1200
205393571 kasiru_69 A May 11, 2023, 6:11 a.m. OK Java 11 TESTS 17 234 0 1200
205289417 bleach__ A May 10, 2023, 5:12 a.m. OK Java 17 TESTS 17 202 716800 1200
205074737 D7k_ICPC A May 8, 2023, 11:33 a.m. OK Java 17 TESTS 17 233 409600 1200
205441788 massvinod A May 11, 2023, 2:22 p.m. OK Java 17 TESTS 17 233 819200 1200
206310767 MagentaCobra A May 18, 2023, 7:50 a.m. OK Java 8 TESTS 17 93 0 1200
206287300 ZXF_521mua A May 18, 2023, 12:46 a.m. OK Java 8 TESTS 17 108 0 1200
205214171 sarthakjoleya A May 9, 2023, 11:06 a.m. OK Java 8 TESTS 17 108 0 1200
205452413 Harshit_3905 A May 11, 2023, 3:56 p.m. OK Java 8 TESTS 17 109 0 1200
205356440 aniket27 A May 10, 2023, 5:27 p.m. OK Java 8 TESTS 17 109 0 1200
205056301 Ashu2030 A May 8, 2023, 8:03 a.m. OK Java 8 TESTS 17 109 0 1200
206404799 klsane04 A May 19, 2023, 5:03 a.m. OK Java 8 TESTS 17 140 0 1200
206365794 stolis A May 18, 2023, 4:36 p.m. OK Java 8 TESTS 17 140 0 1200
206309630 toufique_husein A May 18, 2023, 7:37 a.m. OK Java 8 TESTS 17 140 0 1200
205794928 luogu_bot2 A May 14, 2023, 6:52 a.m. OK Java 8 TESTS 17 140 0 1200
205022090 PeredurOmega A May 7, 2023, 7:54 p.m. OK Kotlin 1.7 TESTS 17 327 3584000 1200
205075569 s_owlxx A May 8, 2023, 11:40 a.m. OK MS C++ 2017 TESTS 17 15 0 1200
205012371 EbuYandex A May 7, 2023, 5:53 p.m. OK MS C++ 2017 TESTS 17 30 0 1200
204986106 ivan_dudi A May 7, 2023, 2:35 p.m. OK MS C++ 2017 TESTS 17 30 0 1200
206201311 shushukl A May 17, 2023, 11:15 a.m. OK MS C++ 2017 TESTS 17 31 0 1200
205290855 devanshbatra A May 10, 2023, 5:36 a.m. OK MS C++ 2017 TESTS 17 31 0 1200
205140579 GeraltLUL A May 8, 2023, 4:04 p.m. OK MS C++ 2017 TESTS 17 31 0 1200
205055231 Farewell1022 A May 8, 2023, 7:49 a.m. OK MS C++ 2017 TESTS 17 31 0 1200
205013217 EbuYandex A May 7, 2023, 6:01 p.m. OK MS C++ 2017 TESTS 17 31 0 1200
205004465 AsylumME A May 7, 2023, 4:30 p.m. OK MS C++ 2017 TESTS 17 31 0 1200
206452138 Zappricious A May 19, 2023, 1:35 p.m. OK PyPy 3 TESTS 17 170 6041600 1200
205388050 gottipatiyasaswini A May 11, 2023, 4:40 a.m. OK PyPy 3 TESTS 17 171 5529600 1200
205069105 noob_coder121324 A May 8, 2023, 10:33 a.m. OK PyPy 3 TESTS 17 171 5529600 1200
205766729 ipip A May 13, 2023, 9:06 p.m. OK PyPy 3 TESTS 17 171 6348800 1200
205267995 Yash_Nandwana A May 9, 2023, 8:02 p.m. OK PyPy 3 TESTS 17 186 4608000 1200
205146158 2000030255 A May 8, 2023, 4:54 p.m. OK PyPy 3 TESTS 17 187 5529600 1200
205050944 yee12 A May 8, 2023, 6:57 a.m. OK PyPy 3 TESTS 17 187 5529600 1200
205513314 lol_py A May 12, 2023, 8:21 a.m. OK PyPy 3 TESTS 17 202 5529600 1200
204985231 w313880557 A May 7, 2023, 2:27 p.m. OK PyPy 3 TESTS 17 202 5939200 1200
205306089 KeiTsukishima A May 10, 2023, 8:48 a.m. OK PyPy 3 TESTS 17 311 9011200 1200
205969940 Karthik1106 A May 15, 2023, 10:51 a.m. OK PyPy 3-64 TESTS 17 62 2867200 1200
206194471 practiceaccount76 A May 17, 2023, 10:02 a.m. OK PyPy 3-64 TESTS 17 62 4096000 1200
206330166 2000030958 A May 18, 2023, 11:09 a.m. OK PyPy 3-64 TESTS 17 77 2867200 1200
206323512 2000031264 A May 18, 2023, 10:02 a.m. OK PyPy 3-64 TESTS 17 77 2867200 1200
205940419 neerajam A May 15, 2023, 4:33 a.m. OK PyPy 3-64 TESTS 17 77 2969600 1200
205691978 2000032077cse A May 13, 2023, 8:28 a.m. OK PyPy 3-64 TESTS 17 77 2969600 1200
205511601 kidus72 A May 12, 2023, 8 a.m. OK PyPy 3-64 TESTS 17 77 3379200 1200
205324104 reijnnn A May 10, 2023, 12:10 p.m. OK PyPy 3-64 TESTS 17 77 3891200 1200
205976317 nayounsang722 A May 15, 2023, 11:51 a.m. OK PyPy 3-64 TESTS 17 93 3891200 1200
205765716 the_last_smilodon A May 13, 2023, 8:50 p.m. OK PyPy 3-64 TESTS 17 93 4812800 1200
205219260 chaturyatatini A May 9, 2023, 11:54 a.m. OK Python 3 TESTS 17 31 102400 1200
206368808 Block_Cipher A May 18, 2023, 5:10 p.m. OK Python 3 TESTS 17 46 0 1200
205052830 daotiennamhlvl A May 8, 2023, 7:18 a.m. OK Python 3 TESTS 17 46 0 1200
206019315 sridharsiddi A May 15, 2023, 6:24 p.m. OK Python 3 TESTS 17 46 102400 1200
206011163 srinija_chowdary9 A May 15, 2023, 4:55 p.m. OK Python 3 TESTS 17 46 102400 1200
205669216 2000030045 A May 13, 2023, 4:47 a.m. OK Python 3 TESTS 17 46 102400 1200
205631528 Pavan125 A May 12, 2023, 6:04 p.m. OK Python 3 TESTS 17 46 102400 1200
205053114 eugalt A May 8, 2023, 7:22 a.m. OK Python 3 TESTS 17 46 102400 1200
205052409 eugalt A May 8, 2023, 7:13 a.m. OK Python 3 TESTS 17 46 102400 1200
205052238 eugalt A May 8, 2023, 7:11 a.m. OK Python 3 TESTS 17 46 102400 1200
205160734 kost A May 8, 2023, 7:41 p.m. OK Rust 2021 TESTS 17 15 102400 1200
205058119 cottoncotton A May 8, 2023, 8:26 a.m. OK Rust 2021 TESTS 17 31 67276800 1200

remove filters

Back to search problems