Codeforces Round 531 (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
1102 Codeforces Round 531 (Div. 3) FINISHED False 7200 184778699 Jan. 9, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13145 ) C Doors Breaking and Repairing PROGRAMMING games 1200

B"You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move. There are n doors, the i -th door initially has durability equal to a_i . During your move you can try to break one of the doors. If you choose door i and its current durability is b_i then you reduce its durability to max(0, b_i - x) (the value x is given). During Slavik's move he tries to repair one of the doors. If he chooses door i and its current durability is b_i then he increases its durability to b_i + y (the value y is given). Slavik cannot repair doors with current durability equal to 0 . The game lasts 10^{100} turns. If some player cannot make his move then he has to skip it. Your goal is to maximize the number of doors with durability equal to 0 at the end of the game. You can assume that Slavik wants to minimize the number of such doors. What is the number of such doors in the end if you both play optimally? The first line of the input contains three integers n , x and y ( 1 <= n <= 100 , 1 <= x, y <= 10^5 ) -- the number of doors, value x and value y , respectively. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^5 ), where a_i is the initial durability of the i -th door. Print one integer -- the number of doors with durability equal to 0 at the end of the game, if you and Slavik both play optimally. Clarifications about the optimal strategy will be ignored. "...

Tutorials

64439

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48595437 gktgnjftm C Jan. 20, 2019, 5:58 a.m. OK Clang++17 Diagnostics TESTS 26 46 0 1200
50212633 vjudge3 C Feb. 20, 2019, 1:39 a.m. OK Clang++17 Diagnostics TESTS 26 46 0 1200
48160061 tarkesh_999 C Jan. 9, 2019, 7:01 p.m. OK Clang++17 Diagnostics TESTS 26 46 0 1200
50414519 vjudge1 C Feb. 24, 2019, 5:43 a.m. OK Clang++17 Diagnostics TESTS 26 46 512000 1200
62184960 vjudge3 C Oct. 9, 2019, 7:55 a.m. OK Clang++17 Diagnostics TESTS 26 61 0 1200
54730318 Denor C May 27, 2019, 11:02 p.m. OK Delphi TESTS 26 30 102400 1200
51816392 chaorenhaha C March 25, 2019, 9:28 a.m. OK FPC TESTS 26 30 0 1200
51816385 chaorenhaha C March 25, 2019, 9:28 a.m. OK FPC TESTS 26 30 0 1200
48433404 binarmo C Jan. 15, 2019, 6:44 p.m. OK FPC TESTS 26 31 0 1200
49310168 biabeogo147 C Feb. 1, 2019, 7:30 a.m. OK FPC TESTS 26 31 0 1200
48271524 vjudge1 C Jan. 12, 2019, 2:33 a.m. OK FPC TESTS 26 31 0 1200
48271514 luogu_bot1 C Jan. 12, 2019, 2:32 a.m. OK FPC TESTS 26 31 0 1200
48166288 lele9h0st C Jan. 10, 2019, 1:40 a.m. OK FPC TESTS 26 31 0 1200
49503331 PhuongPeu C Feb. 5, 2019, 4:18 p.m. OK FPC TESTS 26 31 102400 1200
58504157 naranja011223 C Aug. 9, 2019, 3:39 p.m. OK FPC TESTS 26 31 409600 1200
51816410 chaorenhaha C March 25, 2019, 9:29 a.m. OK FPC TESTS 26 31 409600 1200
48186432 cinohtyp C Jan. 10, 2019, 3:20 p.m. OK GNU C11 TESTS 26 15 0 1200
50549227 kaiboy C Feb. 27, 2019, 2:06 a.m. OK GNU C11 TESTS 26 15 0 1200
68060567 yigezhe C Jan. 2, 2020, 3:26 a.m. OK GNU C11 TESTS 26 15 409600 1200
48324300 vjudge5 C Jan. 13, 2019, 11 a.m. OK GNU C11 TESTS 26 30 0 1200
48488694 Karasu C Jan. 17, 2019, 9:36 a.m. OK GNU C11 TESTS 26 30 0 1200
48624518 liuyumang C Jan. 20, 2019, 12:56 p.m. OK GNU C11 TESTS 26 30 0 1200
54571878 _nmp_ C May 24, 2019, 7:50 p.m. OK GNU C11 TESTS 26 30 0 1200
58567475 cs234_shrey C Aug. 11, 2019, 8:37 a.m. OK GNU C11 TESTS 26 30 0 1200
66006844 torque_459 C Nov. 29, 2019, 10:32 p.m. OK GNU C11 TESTS 26 30 0 1200
67474856 vjudge3 C Dec. 23, 2019, 2 p.m. OK GNU C11 TESTS 26 30 0 1200
48960179 sdibt4 C Jan. 26, 2019, 6:12 a.m. OK GNU C++11 TESTS 26 15 0 1200
49098417 AlirezaNa C Jan. 28, 2019, 10:35 a.m. OK GNU C++11 TESTS 26 15 0 1200
49662158 stOAM C Feb. 9, 2019, 12:54 p.m. OK GNU C++11 TESTS 26 15 0 1200
49931655 AVM.Martin C Feb. 15, 2019, 5:01 a.m. OK GNU C++11 TESTS 26 15 0 1200
50570657 vjudge2 C Feb. 27, 2019, 3:15 p.m. OK GNU C++11 TESTS 26 15 0 1200
50593388 graceoflives C Feb. 28, 2019, 8:47 a.m. OK GNU C++11 TESTS 26 15 0 1200
51142638 Kotehok3 C March 10, 2019, 8:27 p.m. OK GNU C++11 TESTS 26 15 0 1200
51665958 vjudge4 C March 22, 2019, 6:02 a.m. OK GNU C++11 TESTS 26 15 0 1200
54275361 wyy2004 C May 17, 2019, 10:53 a.m. OK GNU C++11 TESTS 26 15 0 1200
54512158 CaoRui2019 C May 23, 2019, 7:43 a.m. OK GNU C++11 TESTS 26 15 0 1200
61561523 vilcheuski C Sept. 30, 2019, 3:43 p.m. OK GNU C++14 TESTS 26 15 0 1200
69792709 kanishkajain C Jan. 29, 2020, 7:01 p.m. OK GNU C++14 TESTS 26 15 0 1200
69084834 parthrajchauhan100 C Jan. 19, 2020, 7:54 a.m. OK GNU C++14 TESTS 26 15 0 1200
64545153 paradox1488 C Nov. 8, 2019, 8:02 p.m. OK GNU C++14 TESTS 26 15 0 1200
62857377 __Enigma__ C Oct. 18, 2019, 9:42 a.m. OK GNU C++14 TESTS 26 15 0 1200
61393726 pootis C Sept. 28, 2019, 12:12 a.m. OK GNU C++14 TESTS 26 15 0 1200
61034593 ujjwalmittal C Sept. 21, 2019, 7:08 p.m. OK GNU C++14 TESTS 26 15 0 1200
60577403 agupt258 C Sept. 14, 2019, 5:06 p.m. OK GNU C++14 TESTS 26 15 0 1200
60455207 Larten C Sept. 12, 2019, 5:39 p.m. OK GNU C++14 TESTS 26 15 0 1200
60384242 Sachinshukla C Sept. 11, 2019, 10:47 a.m. OK GNU C++14 TESTS 26 15 0 1200
65673845 AK_43 C Nov. 24, 2019, 5:07 p.m. OK GNU C++17 TESTS 26 15 0 1200
65722128 PatiEnt_Hasty_NighTmarE C Nov. 25, 2019, 7:46 p.m. OK GNU C++17 TESTS 26 15 0 1200
66162685 peaunt C Dec. 2, 2019, 5:37 a.m. OK GNU C++17 TESTS 26 15 0 1200
66286269 quickrush_code C Dec. 4, 2019, 7:25 p.m. OK GNU C++17 TESTS 26 15 0 1200
66532334 Boy_of_KutBilim C Dec. 9, 2019, 8 a.m. OK GNU C++17 TESTS 26 15 0 1200
66603904 m.shreyansh C Dec. 10, 2019, 5:39 p.m. OK GNU C++17 TESTS 26 15 0 1200
66637688 fake_coder C Dec. 11, 2019, 1:34 p.m. OK GNU C++17 TESTS 26 15 0 1200
67487370 Vin__ar C Dec. 23, 2019, 5:59 p.m. OK GNU C++17 TESTS 26 15 0 1200
67669075 avisharma C Dec. 26, 2019, 7:16 p.m. OK GNU C++17 TESTS 26 15 0 1200
69432657 Sha3ban_El-Bay C Jan. 23, 2020, 5:50 p.m. OK GNU C++17 TESTS 26 15 0 1200
48176162 ledinhbao C Jan. 10, 2019, 9:42 a.m. OK Go TESTS 26 31 0 1200
48721334 chenyung C Jan. 22, 2019, 1:39 p.m. OK Haskell TESTS 26 15 8396800 1200
48640040 MarcoXerox C Jan. 20, 2019, 3:10 p.m. OK Haskell TESTS 26 15 8499200 1200
66624487 akifpathan C Dec. 11, 2019, 8:22 a.m. OK Java 11 TESTS 26 171 0 1200
68314248 Vatsal53 C Jan. 6, 2020, 12:35 p.m. OK Java 11 TESTS 26 186 0 1200
58534098 Immortal1738 C Aug. 10, 2019, 11:01 a.m. OK Java 8 TESTS 26 93 0 1200
58778104 vvenkai C Aug. 13, 2019, 6:24 p.m. OK Java 8 TESTS 26 108 0 1200
58145040 Shetaya C Aug. 1, 2019, 8:27 p.m. OK Java 8 TESTS 26 108 0 1200
52888425 GiantTornado C April 17, 2019, 6:40 a.m. OK Java 8 TESTS 26 108 0 1200
49377004 mennafadali C Feb. 2, 2019, 8:43 p.m. OK Java 8 TESTS 26 108 0 1200
48850993 Anirudh25 C Jan. 23, 2019, 5:08 p.m. OK Java 8 TESTS 26 108 0 1200
48563645 eslam.221 C Jan. 19, 2019, 8:31 a.m. OK Java 8 TESTS 26 108 0 1200
48480458 dyhu083 C Jan. 17, 2019, 5:51 a.m. OK Java 8 TESTS 26 108 0 1200
48265788 anony9906 C Jan. 11, 2019, 8:04 p.m. OK Java 8 TESTS 26 108 0 1200
48183990 manish_98 C Jan. 10, 2019, 2:02 p.m. OK Java 8 TESTS 26 108 0 1200
48379828 SergeySh C Jan. 14, 2019, 9:52 a.m. OK JavaScript TESTS 26 31 0 1200
48185417 _FariD_ C Jan. 10, 2019, 2:44 p.m. OK JavaScript TESTS 26 31 0 1200
48168707 batyrbek96 C Jan. 10, 2019, 4:38 a.m. OK JavaScript TESTS 26 31 0 1200
57873831 stepanovep C July 28, 2019, 3:52 a.m. OK Kotlin TESTS 26 140 0 1200
49149676 spookywooky C Jan. 29, 2019, 12:10 p.m. OK Kotlin TESTS 26 140 0 1200
59328928 david_varela C Aug. 22, 2019, 11:01 p.m. OK Kotlin TESTS 26 140 102400 1200
59328595 david_varela C Aug. 22, 2019, 10:42 p.m. OK Kotlin TESTS 26 140 102400 1200
56538951 sashamc C July 5, 2019, 3:29 a.m. OK Kotlin TESTS 26 155 102400 1200
48471339 z39 C Jan. 16, 2019, 8:39 p.m. OK Kotlin TESTS 26 155 102400 1200
48533514 sanek_2bas C Jan. 18, 2019, 1:09 p.m. OK Mono C# TESTS 26 46 0 1200
48174569 ken_love_rin C Jan. 10, 2019, 8:48 a.m. OK Mono C# TESTS 26 46 0 1200
55741965 svobodiannikov C June 19, 2019, 7:57 a.m. OK Mono C# TESTS 26 46 0 1200
54764332 og.kostya C May 28, 2019, 4:42 p.m. OK Mono C# TESTS 26 46 0 1200
48588653 maximzombi C Jan. 19, 2019, 10:20 p.m. OK Mono C# TESTS 26 46 0 1200
51320597 Mosyagin C March 15, 2019, 6:44 a.m. OK Mono C# TESTS 26 61 0 1200
48362478 DiegoCO C Jan. 13, 2019, 7:21 p.m. OK Mono C# TESTS 26 61 0 1200
48325482 DarkDove C Jan. 13, 2019, 11:37 a.m. OK Mono C# TESTS 26 62 0 1200
53662656 treasuryonly C May 2, 2019, 8:39 a.m. OK Mono C# TESTS 26 62 0 1200
67470015 hibatibati C Dec. 23, 2019, 12:27 p.m. OK Mono C# TESTS 26 62 3584000 1200
49076434 vjudge3 C Jan. 28, 2019, 3:32 a.m. OK MS C++ TESTS 26 15 0 1200
50516823 vjudge1 C Feb. 26, 2019, 6:59 a.m. OK MS C++ TESTS 26 15 0 1200
49302222 sdibt2 C Feb. 1, 2019, 3:52 a.m. OK MS C++ TESTS 26 15 0 1200
68387995 vjudge4 C Jan. 8, 2020, 7:04 a.m. OK MS C++ TESTS 26 15 102400 1200
48271029 vjudge4 C Jan. 12, 2019, 2:06 a.m. OK MS C++ TESTS 26 15 307200 1200
52335808 vjudge2 C April 5, 2019, 7:54 a.m. OK MS C++ TESTS 26 15 409600 1200
57121658 vjudge1 C July 16, 2019, 1:37 a.m. OK MS C++ TESTS 26 30 0 1200
68834243 vjudge5 C Jan. 15, 2020, 1:49 a.m. OK MS C++ TESTS 26 30 0 1200
68424071 vjudge3 C Jan. 9, 2020, 1:39 a.m. OK MS C++ TESTS 26 30 0 1200
53216106 vjudge5 C April 24, 2019, 8:53 a.m. OK MS C++ TESTS 26 30 0 1200
53810048 petko_mitkov C May 6, 2019, 5:52 a.m. OK MS C++ 2017 TESTS 26 30 0 1200
62132272 shio C Oct. 8, 2019, 3:11 p.m. OK MS C++ 2017 TESTS 26 30 0 1200
67464321 vjudge3 C Dec. 23, 2019, 10:27 a.m. OK MS C++ 2017 TESTS 26 30 0 1200
59257114 vjudge3 C Aug. 22, 2019, 7:10 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
62192381 Mad112233 C Oct. 9, 2019, 10:03 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
61210920 MrLolthe1st C Sept. 24, 2019, 11:27 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
60371487 Banggoose1 C Sept. 11, 2019, 2:25 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
58890361 Y_JARVIS C Aug. 16, 2019, 5:17 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
58253942 HelloWorld1024 Yanhui Cuc-center C Aug. 4, 2019, 9:07 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
56034544 xsc C June 25, 2019, 11:25 a.m. OK MS C++ 2017 TESTS 26 31 0 1200
48302883 moballack C Jan. 12, 2019, 5:56 p.m. OK Node.js TESTS 26 155 204800 1200
48188220 pirvu.catalin94 C Jan. 10, 2019, 4:20 p.m. OK Node.js TESTS 26 249 409600 1200
50560902 Stanislav666 C Feb. 27, 2019, 10:59 a.m. OK PascalABC.NET TESTS 26 171 0 1200
51148549 Orunbaev C March 11, 2019, 5:59 a.m. OK PascalABC.NET TESTS 26 171 0 1200
62586723 AndreyStarostin C Oct. 14, 2019, 7:09 p.m. OK PascalABC.NET TESTS 26 202 0 1200
51355081 mm944 C March 16, 2019, 3:22 a.m. OK PascalABC.NET TESTS 26 296 102400 1200
48161233 mayakin C Jan. 9, 2019, 7:43 p.m. OK PHP TESTS 26 31 0 1200
52476627 CrazyDr C April 8, 2019, 12:08 a.m. OK PHP TESTS 26 31 0 1200
48176570 katalama C Jan. 10, 2019, 9:59 a.m. OK PHP TESTS 26 31 512000 1200
58513469 idgaf C Aug. 9, 2019, 8:39 p.m. OK PyPy 2 TESTS 26 109 0 1200
50353429 potatomat0 C Feb. 23, 2019, 9:37 a.m. OK PyPy 2 TESTS 26 124 0 1200
49141952 balani.mohit C Jan. 29, 2019, 10:42 a.m. OK PyPy 2 TESTS 26 124 0 1200
48650017 thenewguy39 C Jan. 20, 2019, 8:04 p.m. OK PyPy 2 TESTS 26 124 0 1200
48158799 wangkan2001 C Jan. 9, 2019, 6:25 p.m. OK PyPy 2 TESTS 26 124 0 1200
57597265 recuraki C July 23, 2019, 2:24 p.m. OK PyPy 3 TESTS 26 124 0 1200
51276952 knight-erraunt C March 13, 2019, 10:30 p.m. OK PyPy 3 TESTS 26 124 0 1200
49696025 fan_of_Islam_Shaykhiev C Feb. 10, 2019, 1:49 p.m. OK PyPy 3 TESTS 26 124 0 1200
48171903 Mr.Inconsistent C Jan. 10, 2019, 7:15 a.m. OK PyPy 3 TESTS 26 124 0 1200
48171528 tsukuyomi C Jan. 10, 2019, 7:02 a.m. OK PyPy 3 TESTS 26 124 0 1200
48163526 Bovniova C Jan. 9, 2019, 9:18 p.m. OK PyPy 3 TESTS 26 124 0 1200
48162010 devansh1497 C Jan. 9, 2019, 8:13 p.m. OK PyPy 3 TESTS 26 124 0 1200
48159601 jakab922 C Jan. 9, 2019, 6:46 p.m. OK PyPy 3 TESTS 26 124 0 1200
55940757 rahulmudambi C June 22, 2019, 4:29 p.m. OK PyPy 3 TESTS 26 139 0 1200
50569805 vik678 C Feb. 27, 2019, 2:50 p.m. OK PyPy 3 TESTS 26 139 0 1200
48582092 guyshe C Jan. 19, 2019, 5:09 p.m. OK Python 2 TESTS 26 156 0 1200
48958078 raj_1999 C Jan. 26, 2019, 5:29 a.m. OK Python 2 TESTS 26 156 0 1200
48722148 gatsko C Jan. 22, 2019, 2 p.m. OK Python 2 TESTS 26 156 0 1200
52768601 allonsy_kim C April 15, 2019, 6:45 a.m. OK Python 2 TESTS 26 171 0 1200
50157184 Luxo C Feb. 19, 2019, 10:47 a.m. OK Python 2 TESTS 26 171 0 1200
48541451 lprashant94 C Jan. 18, 2019, 4:57 p.m. OK Python 2 TESTS 26 171 0 1200
48400302 hoangbao C Jan. 14, 2019, 8:28 p.m. OK Python 2 TESTS 26 171 0 1200
48314616 zdrosb C Jan. 13, 2019, 5:44 a.m. OK Python 2 TESTS 26 171 0 1200
48201981 riteshyadav654 C Jan. 11, 2019, 6:21 a.m. OK Python 2 TESTS 26 171 0 1200
48164465 scambret C Jan. 9, 2019, 10:31 p.m. OK Python 2 TESTS 26 171 0 1200
53272099 darkshadow07 C April 25, 2019, 7:04 a.m. OK Python 3 TESTS 26 93 0 1200
49691905 bhavana4842 C Feb. 10, 2019, 11:43 a.m. OK Python 3 TESTS 26 93 0 1200
48440426 leafvillageninja C Jan. 16, 2019, 2:39 a.m. OK Python 3 TESTS 26 93 0 1200
48368800 saku7 C Jan. 14, 2019, 1:58 a.m. OK Python 3 TESTS 26 93 0 1200
48312810 thisisgood C Jan. 13, 2019, 4:06 a.m. OK Python 3 TESTS 26 93 0 1200
57893140 SuhanovPavel C July 28, 2019, 12:33 p.m. OK Python 3 TESTS 26 108 0 1200
52796415 Maaddy C April 15, 2019, 9:09 p.m. OK Python 3 TESTS 26 108 0 1200
52765801 lIn_nIl C April 15, 2019, 3:20 a.m. OK Python 3 TESTS 26 108 0 1200
50342129 thevirtual C Feb. 23, 2019, 3:19 a.m. OK Python 3 TESTS 26 108 0 1200
48946667 shelam C Jan. 25, 2019, 7:31 p.m. OK Python 3 TESTS 26 108 0 1200
48157332 Jumnast C Jan. 9, 2019, 5:45 p.m. OK Ruby TESTS 26 62 102400 1200
48370703 corvvs_ C Jan. 14, 2019, 4:02 a.m. OK Ruby TESTS 26 77 0 1200
48474966 hot_yoghurt C Jan. 17, 2019, 1:43 a.m. OK Scala TESTS 26 467 0 1200

remove filters

Back to search problems