Codeforces Round 889 (Div. 1)

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
1854 Codeforces Round 889 (Div. 1) FINISHED False 9000 41181899 July 29, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3582 ) B Earn or Unlock PROGRAMMING bitmasks brute force dp

B"Andrea is playing the game Tanto Cuore. He has a deck of n cards with values a_1, ldots, a_n from top to bottom. Each card can be either locked or unlocked. Initially, only the topmost card is unlocked. The game proceeds in turns. In each turn, Andrea chooses an unlocked card in the deck -- the value written on the card is v -- and performs exactly one of the following two operations: The game ends when all the cards remaining in the deck are locked, or there are no more cards in the deck. What is the maximum number of victory points Andrea can earn? The first line contains a single integer n ( 1 <= q n <= q 10^5 ) -- the number of cards in the deck. The second line contains n integers a_1, ldots, a_n ( 0 <= q a_1, ldots, a_n <= q n ) -- the values of the cards in the deck. Output a single integer -- the maximum number of victory points Andrea can earn. In the first sample test, the deck starts as [unlocked, locked]. Then, Andrea uses the first card to unlock the second card. Then he uses the second card to earn 2 victory points. In the second sample test, Andrea can use the first card to unlock the second and the third card. Then he uses the second and the third card to earn 4+5=9 victory points. In the third sample test, Andrea can't unlock any cards or gain any victory points with the first card. "...

Tutorials

Editorial of Codeforces Round 889 (Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
216347395 Gassa B July 29, 2023, 5:56 p.m. OK D TESTS 47 1201 4403200
216336924 Gassa B July 29, 2023, 4:59 p.m. OK D TESTS 47 1248 4403200
216381235 Gassa B July 30, 2023, 1:11 a.m. OK D TESTS 47 2948 4403200
216290667 chro4896 B July 29, 2023, 3:41 p.m. OK GNU C11 TESTS 47 2183 2048000
216278423 Changyu B July 29, 2023, 3:23 p.m. OK GNU C++14 TESTS 47 514 819200
216385430 sizihan B July 30, 2023, 2:23 a.m. OK GNU C++14 TESTS 47 529 1638400
216365558 neal B July 29, 2023, 8:28 p.m. OK GNU C++14 TESTS 47 858 1331200
216387677 OMG_78 B July 30, 2023, 2:59 a.m. OK GNU C++14 TESTS 47 1029 102400
216275346 wrhaco B July 29, 2023, 3:19 p.m. OK GNU C++14 TESTS 47 1029 18124800
216378434 zltzlt B July 30, 2023, 12:04 a.m. OK GNU C++14 TESTS 47 1045 3276800
216286387 Noam527 B July 29, 2023, 3:34 p.m. OK GNU C++14 TESTS 47 1060 512000
216289973 paul2008 B July 29, 2023, 3:40 p.m. OK GNU C++14 TESTS 47 1060 2457600
216351747 MCPlayer542 B July 29, 2023, 6:22 p.m. OK GNU C++14 TESTS 47 1060 2457600
216258044 emptyhope B July 29, 2023, 2:55 p.m. OK GNU C++14 TESTS 47 1060 3276800
216280235 i_will_be_less_than_blue B July 29, 2023, 3:26 p.m. OK GNU C++17 TESTS 47 234 409600
216365556 neal B July 29, 2023, 8:28 p.m. OK GNU C++17 TESTS 47 343 1331200
216347627 Xtale_cross B July 29, 2023, 5:57 p.m. OK GNU C++17 TESTS 47 530 0
216352413 sg0071729 B July 29, 2023, 6:27 p.m. OK GNU C++17 TESTS 47 530 1331200
216277395 relyt871 B July 29, 2023, 3:22 p.m. OK GNU C++17 TESTS 47 546 1228800
216294610 applese B July 29, 2023, 3:47 p.m. OK GNU C++17 TESTS 47 608 1228800
216300558 arnold518 B July 29, 2023, 3:56 p.m. OK GNU C++17 TESTS 47 795 512000
216327514 zse B July 29, 2023, 4:42 p.m. OK GNU C++17 TESTS 47 951 409600
216305270 AliShahali1382 B July 29, 2023, 4:03 p.m. OK GNU C++17 TESTS 47 967 1331200
216354058 wangjunchao B July 29, 2023, 6:39 p.m. OK GNU C++17 TESTS 47 998 3276800
216351585 Noble_Mushtak B July 29, 2023, 6:21 p.m. OK GNU C++17 (64) TESTS 47 124 1126400
216304334 kondasujay2 B July 29, 2023, 4:02 p.m. OK GNU C++17 (64) TESTS 47 343 409600
216296563 lunchbox B July 29, 2023, 3:50 p.m. OK GNU C++17 (64) TESTS 47 358 1228800
216286038 minato B July 29, 2023, 3:34 p.m. OK GNU C++17 (64) TESTS 47 436 1638400
216307992 HuaJun B July 29, 2023, 4:08 p.m. OK GNU C++17 (64) TESTS 47 467 2150400
216325215 Wielomian B July 29, 2023, 4:38 p.m. OK GNU C++17 (64) TESTS 47 483 409600
216356548 Rubikun B July 29, 2023, 7 p.m. OK GNU C++17 (64) TESTS 47 624 102400
216320037 Giga_Cronos B July 29, 2023, 4:29 p.m. OK GNU C++17 (64) TESTS 47 826 921600
216311662 adamsoltan B July 29, 2023, 4:14 p.m. OK GNU C++17 (64) TESTS 47 873 102400
216356519 Rubikun B July 29, 2023, 7 p.m. OK GNU C++17 (64) TESTS 47 889 102400
216355497 lightseba B July 29, 2023, 6:51 p.m. OK GNU C++20 (64) TESTS 47 93 409600
216353969 lightseba B July 29, 2023, 6:38 p.m. OK GNU C++20 (64) TESTS 47 124 409600
216354686 lightseba B July 29, 2023, 6:44 p.m. OK GNU C++20 (64) TESTS 47 140 409600
216355258 lightseba B July 29, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 47 187 409600
216355177 lightseba B July 29, 2023, 6:48 p.m. OK GNU C++20 (64) TESTS 47 187 409600
216355282 lightseba B July 29, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 47 234 409600
216353424 lightseba B July 29, 2023, 6:34 p.m. OK GNU C++20 (64) TESTS 47 312 409600
216344816 lemelisk B July 29, 2023, 5:45 p.m. OK GNU C++20 (64) TESTS 47 312 409600
216253180 maspy B July 29, 2023, 2:49 p.m. OK GNU C++20 (64) TESTS 47 312 4096000
216355343 lightseba B July 29, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 47 327 409600
216358567 Omer223 B July 29, 2023, 7:19 p.m. OK MS C++ 2017 TESTS 47 2932 3379200
216286146 GeorgesStPierre B July 29, 2023, 3:34 p.m. OK MS C++ 2017 TESTS 47 2932 3379200
216354137 misorin B July 29, 2023, 6:40 p.m. OK PyPy 3-64 TESTS 47 1840 13619200
216353273 misorin B July 29, 2023, 6:33 p.m. OK PyPy 3-64 TESTS 47 2386 13619200
216398284 sansen B July 30, 2023, 5:24 a.m. OK Rust 2021 TESTS 47 187 2969600
216386343 sansen B July 30, 2023, 2:37 a.m. OK Rust 2021 TESTS 47 546 2969600
216290617 qwerty787788 B July 29, 2023, 3:40 p.m. OK Rust 2021 TESTS 47 795 819200

remove filters

Back to search problems