Codeforces Round 465 (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
935 Codeforces Round 465 (Div. 2) FINISHED False 7200 212765099 Feb. 19, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 896 ) E Fafa and Ancient Mathematics PROGRAMMING dfs and similar dp trees 2500

B"Ancient Egyptians are known to have understood difficult concepts in mathematics. The ancient Egyptian mathematician Ahmes liked to write a kind of arithmetic expressions on papyrus paper which he called as Ahmes arithmetic expression. An Ahmes arithmetic expression can be defined as: On his trip to Egypt, Fafa found a piece of papyrus paper having one of these Ahmes arithmetic expressions written on it. Being very ancient, the papyrus piece was very worn out. As a result, all the operators were erased, keeping only the numbers and the brackets. Since Fafa loves mathematics, he decided to challenge himself with the following task: Given the number of plus and minus operators in the original expression, find out the maximum possible value for the expression on the papyrus paper after putting the plus and minus operators in the place of the original erased operators. The first line contains a string E (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|E| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104) -- a valid Ahmes arithmetic expression. All operators are erased and replaced with '?'. The second line contains two space-separated integers P and M (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89min(P, xe2 x80 x89M) xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of plus and minus operators, respectively. It is guaranteed that P xe2 x80 x89+ xe2 x80 x89M xe2 x80 x89= xe2 x80 x89 the number of erased operators. Print one line containing the answer to the problem. "...

Tutorials

editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
35498808 juanplopes E Feb. 19, 2018, 6:20 p.m. OK GNU C++ TESTS 42 15 3379200 2500
35575504 AltF4 E Feb. 22, 2018, 2:26 p.m. OK GNU C++ TESTS 42 15 6041600 2500
35508924 diogoaos E Feb. 20, 2018, 1:49 a.m. OK GNU C++ TESTS 42 15 7680000 2500
35515261 poeroz E Feb. 20, 2018, 8:17 a.m. OK GNU C++ TESTS 42 15 10752000 2500
35595309 cuibst2 E Feb. 23, 2018, 11:51 a.m. OK GNU C++ TESTS 42 15 11161600 2500
35494003 guille E Feb. 19, 2018, 5:50 p.m. OK GNU C++ TESTS 42 15 18534400 2500
35590980 cz_xuyixuan E Feb. 23, 2018, 8:02 a.m. OK GNU C++ TESTS 42 30 10752000 2500
35511023 chenyx2001 E Feb. 20, 2018, 4:21 a.m. OK GNU C++ TESTS 42 30 12083200 2500
35572713 hands_yhy E Feb. 22, 2018, 12:25 p.m. OK GNU C++ TESTS 42 30 19251200 2500
35496955 nhho E Feb. 19, 2018, 6:09 p.m. OK GNU C++ TESTS 42 31 3174400 2500
35524834 Crux10086 E Feb. 20, 2018, 2:50 p.m. OK GNU C++11 TESTS 42 15 2560000 2500
35923757 xyzzxy E March 4, 2018, 12:57 p.m. OK GNU C++11 TESTS 42 15 3584000 2500
35556301 dukilee E Feb. 21, 2018, 6:11 p.m. OK GNU C++11 TESTS 42 15 4096000 2500
35895599 N3SL E March 3, 2018, 4:47 p.m. OK GNU C++11 TESTS 42 15 5222400 2500
35519350 Helgui E Feb. 20, 2018, 11:20 a.m. OK GNU C++11 TESTS 42 15 9011200 2500
36266557 liujianbo E March 14, 2018, 6:35 a.m. OK GNU C++11 TESTS 42 15 10649600 2500
35541992 shdut E Feb. 21, 2018, 8:45 a.m. OK GNU C++11 TESTS 42 15 10649600 2500
35787405 cen E Feb. 28, 2018, 2:13 p.m. OK GNU C++11 TESTS 42 15 10752000 2500
35545138 Mikaeel E Feb. 21, 2018, 11:20 a.m. OK GNU C++11 TESTS 42 15 10752000 2500
35521803 zlc1114 E Feb. 20, 2018, 1:05 p.m. OK GNU C++11 TESTS 42 15 10752000 2500
35674135 kopricky E Feb. 25, 2018, 9:30 a.m. OK GNU C++14 TESTS 42 15 2457600 2500
35499672 AllCatsAreBeautiful E Feb. 19, 2018, 6:26 p.m. OK GNU C++14 TESTS 42 15 3584000 2500
35506211 _bom_bom_ E Feb. 19, 2018, 9:38 p.m. OK GNU C++14 TESTS 42 15 4608000 2500
35512751 MarXas E Feb. 20, 2018, 6:18 a.m. OK GNU C++14 TESTS 42 15 5017600 2500
35523709 fdid E Feb. 20, 2018, 2:13 p.m. OK GNU C++14 TESTS 42 15 5427200 2500
35493647 InvUsr E Feb. 19, 2018, 5:48 p.m. OK GNU C++14 TESTS 42 15 6144000 2500
35526889 Svlad_Cjelli E Feb. 20, 2018, 4:11 p.m. OK GNU C++14 TESTS 42 15 6553600 2500
35567685 Max.D. E Feb. 22, 2018, 8:14 a.m. OK GNU C++14 TESTS 42 15 7168000 2500
35532975 sid_8489 E Feb. 20, 2018, 8:39 p.m. OK GNU C++14 TESTS 42 15 7372800 2500
35585651 orbitingflea E Feb. 22, 2018, 11:54 p.m. OK GNU C++14 TESTS 42 15 10137600 2500
35493369 Adalbert E Feb. 19, 2018, 5:46 p.m. OK GNU C++17 TESTS 42 15 3993600 2500
35672721 kobae964 E Feb. 25, 2018, 8:33 a.m. OK GNU C++17 TESTS 42 15 11468800 2500
35790274 almasalmas E Feb. 28, 2018, 3:58 p.m. OK GNU C++17 TESTS 42 15 85401600 2500
38980331 Ali_Pi E June 5, 2018, 11:11 p.m. OK GNU C++17 TESTS 42 31 307200 2500
40977675 ReaLNero1 E July 30, 2018, 4:18 p.m. OK GNU C++17 TESTS 42 31 2764800 2500
36958720 Lancern E April 4, 2018, 2:30 p.m. OK GNU C++17 TESTS 42 31 7270400 2500
41511840 fblogy E Aug. 12, 2018, 2:52 a.m. OK GNU C++17 TESTS 42 31 8601600 2500
38557681 vjudge4 E May 23, 2018, 9:53 a.m. OK GNU C++17 TESTS 42 31 9011200 2500
35523973 vjudge5 E Feb. 20, 2018, 2:21 p.m. OK GNU C++17 TESTS 42 31 10444800 2500
35495541 InkyFlameMaster E Feb. 19, 2018, 6 p.m. OK GNU C++17 TESTS 42 31 11878400 2500
35495206 wistful23 E Feb. 19, 2018, 5:58 p.m. OK Java 8 TESTS 42 139 20787200 2500
35506095 mathmaniac E Feb. 19, 2018, 9:32 p.m. OK Java 8 TESTS 42 139 21299200 2500
35982077 dalt E March 6, 2018, 5:41 a.m. OK Java 8 TESTS 42 140 20684800 2500
35558669 pz049 E Feb. 21, 2018, 8:05 p.m. OK Java 8 TESTS 42 140 20889600 2500
35579291 shubhch32 E Feb. 22, 2018, 5:16 p.m. OK Java 8 TESTS 42 170 21094400 2500
52513996 SpargelTarzan E April 9, 2019, 3:16 a.m. OK Java 8 TESTS 42 171 4096000 2500
35821112 1532 E March 1, 2018, 10:42 p.m. OK Java 8 TESTS 42 187 29900800 2500
35491757 liymbear E Feb. 19, 2018, 5:37 p.m. OK Java 8 TESTS 42 233 20684800 2500
35550359 vovacomua E Feb. 21, 2018, 2:27 p.m. OK Java 8 TESTS 42 234 20889600 2500
35901104 flyman3046 E March 3, 2018, 8:07 p.m. OK Java 8 TESTS 42 249 20684800 2500
62952829 Servy E Oct. 19, 2019, 7:21 p.m. OK Kotlin TESTS 42 1091 18944000 2500
58600505 vjudge3 E Aug. 11, 2019, 1:31 p.m. OK MS C++ TESTS 42 46 9011200 2500
35517077 MenOfPassion E Feb. 20, 2018, 9:36 a.m. OK MS C++ TESTS 42 124 4403200 2500
35503996 Andreasyan E Feb. 19, 2018, 8:05 p.m. OK MS C++ TESTS 42 156 2560000 2500
35504394 Alireza E Feb. 19, 2018, 8:14 p.m. OK MS C++ TESTS 42 296 14336000 2500
66492994 vjudge5 E Dec. 8, 2019, 9:17 a.m. OK PyPy 2 TESTS 42 810 18329600 2500
63738242 GoodLikie E Oct. 29, 2019, 4:01 p.m. OK PyPy 3 TESTS 42 873 18739200 2500
36028536 UDProgrammingTeam E March 6, 2018, 9:44 p.m. OK Rust TESTS 42 15 1843200 2500

remove filters

Back to search problems