Codeforces Round 489 (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
992 Codeforces Round 489 (Div. 2) FINISHED False 7200 202483499 June 18, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4620 ) C Nastya and a Wardrobe PROGRAMMING math 1700

B'Nastya received a gift on New Year -- a magic wardrobe. It is magic because in the end of each month the number of dresses in it doubles (i.e. the number of dresses becomes twice as large as it is in the beginning of the month). Unfortunately, right after the doubling the wardrobe eats one of the dresses (if any) with the 50% probability. It happens every month except the last one in the year. Nastya owns x dresses now, so she became interested in the expected number of dresses she will have in one year. Nastya lives in Byteland, so the year lasts for k xe2 x80 x89+ xe2 x80 x891 months. Nastya is really busy, so she wants you to solve this problem. You are the programmer, after all. Also, you should find the answer modulo 109 xe2 x80 x89+ xe2 x80 x897, because it is easy to see that it is always integer. The only line contains two integers x and k (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x, xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018), where x is the initial number of dresses and k xe2 x80 x89+ xe2 x80 x891 is the number of months in a year in Byteland. In the only line print a single integer -- the expected number of dresses Nastya will own one year later modulo 109 xe2 x80 x89+ xe2 x80 x897. In the first example a year consists on only one month, so the wardrobe does not eat dresses at all. In the second example after the first month there are 3 dresses with 50% probability and 4 dresses with 50% probability. Thus, in the end of the year there are 6 dresses with 50% probability and 8 dresses with 50% probability. This way the answer for this test is (6 xe2 x80 x89+ xe2 x80 x898) xe2 x80 x89/ xe2 x80 x892 xe2 x80 x89= xe2 x80 x897. '...

Tutorials

60083

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47456377 vjudge5 C Dec. 24, 2018, 12:46 p.m. OK Clang++17 Diagnostics TESTS 76 46 0 1700
39391458 Gassa C June 18, 2018, 8:46 p.m. OK D TESTS 76 15 0 1700
50698933 rr_ C March 2, 2019, 7:39 p.m. OK D TESTS 76 31 0 1700
39406850 rajput1999 C June 19, 2018, 10:21 a.m. OK GNU C TESTS 76 30 0 1700
39402882 anirudhbansal C June 19, 2018, 8:06 a.m. OK GNU C TESTS 76 30 0 1700
39384606 srnsh1999 C June 18, 2018, 6:18 p.m. OK GNU C TESTS 76 30 0 1700
39406995 rajput1999 C June 19, 2018, 10:26 a.m. OK GNU C TESTS 76 31 0 1700
39390071 1574354102 C June 18, 2018, 8:08 p.m. OK GNU C TESTS 76 31 0 1700
39381186 forlfs C June 18, 2018, 6:01 p.m. OK GNU C TESTS 76 31 0 1700
39426263 risu007 C June 20, 2018, 4:48 a.m. OK GNU C TESTS 76 31 0 1700
39464022 Danieldh100 C June 21, 2018, 1:49 p.m. OK GNU C TESTS 76 31 0 1700
39394569 nguyenmanhthien98 C June 19, 2018, 12:20 a.m. OK GNU C++ TESTS 76 30 0 1700
39529104 psc233 C June 22, 2018, 11:06 p.m. OK GNU C++ TESTS 76 30 0 1700
39457363 vjudge1 C June 21, 2018, 9:37 a.m. OK GNU C++ TESTS 76 30 0 1700
39437278 hynuxuhuizhi C June 20, 2018, 1:33 p.m. OK GNU C++ TESTS 76 30 0 1700
39427581 daifucong C June 20, 2018, 6:19 a.m. OK GNU C++ TESTS 76 30 0 1700
39425496 dummyummy C June 20, 2018, 3:44 a.m. OK GNU C++ TESTS 76 30 0 1700
39414693 SeeYouAgain C June 19, 2018, 3:01 p.m. OK GNU C++ TESTS 76 30 0 1700
39407164 Lazypants C June 19, 2018, 10:33 a.m. OK GNU C++ TESTS 76 30 0 1700
39403938 qwsin C June 19, 2018, 8:44 a.m. OK GNU C++ TESTS 76 30 0 1700
39538814 grenade_4 C June 23, 2018, 10:37 a.m. OK GNU C++ TESTS 76 30 0 1700
39389557 likcoras C June 18, 2018, 8:01 p.m. OK GNU C11 TESTS 76 31 0 1700
39410900 LudwigVanBeethoven C June 19, 2018, 12:38 p.m. OK GNU C11 TESTS 76 31 0 1700
39695865 ghoshsai5000 C June 27, 2018, 8:37 a.m. OK GNU C++11 TESTS 76 15 0 1700
39583967 jnalanko C June 23, 2018, 10:33 p.m. OK GNU C++11 TESTS 76 15 0 1700
39440431 SilverLining C June 20, 2018, 3:45 p.m. OK GNU C++11 TESTS 76 15 0 1700
39418074 yiqzq C June 19, 2018, 5:27 p.m. OK GNU C++11 TESTS 76 15 0 1700
39417414 yiqzq C June 19, 2018, 5 p.m. OK GNU C++11 TESTS 76 15 0 1700
39416887 pedrohlf C June 19, 2018, 4:36 p.m. OK GNU C++11 TESTS 76 15 0 1700
39410247 Assancious C June 19, 2018, 12:17 p.m. OK GNU C++11 TESTS 76 15 0 1700
39408400 iit2013086 C June 19, 2018, 11:17 a.m. OK GNU C++11 TESTS 76 15 0 1700
39390103 Vadim C June 18, 2018, 8:08 p.m. OK GNU C++11 TESTS 76 15 0 1700
39687503 silxi C June 26, 2018, 11:21 p.m. OK GNU C++11 TESTS 76 30 0 1700
40517513 arian000 C July 18, 2018, 2:03 p.m. OK GNU C++14 TESTS 76 15 0 1700
39660077 sunnylancoder C June 25, 2018, 9:01 p.m. OK GNU C++14 TESTS 76 15 0 1700
39588723 i_am_shubham16 C June 24, 2018, 4:02 a.m. OK GNU C++14 TESTS 76 15 0 1700
39510450 orzwzy C June 22, 2018, 8:46 a.m. OK GNU C++14 TESTS 76 15 0 1700
39506858 practice_Time C June 22, 2018, 5:45 a.m. OK GNU C++14 TESTS 76 15 0 1700
39505519 fffeyn C June 22, 2018, 4:35 a.m. OK GNU C++14 TESTS 76 15 0 1700
39741021 himanshu98 C June 28, 2018, 11:22 a.m. OK GNU C++14 TESTS 76 15 0 1700
44707477 sahilnikum C Oct. 22, 2018, 5:23 p.m. OK GNU C++14 TESTS 76 15 0 1700
39673455 sunand_agarwal C June 26, 2018, 11:06 a.m. OK GNU C++14 TESTS 76 15 0 1700
39732129 KOH C June 28, 2018, 4:14 a.m. OK GNU C++14 TESTS 76 15 0 1700
39414922 newusernme C June 19, 2018, 3:09 p.m. OK GNU C++17 TESTS 76 15 0 1700
55834354 akshayanand729 C June 20, 2019, 2:37 p.m. OK GNU C++17 TESTS 76 15 0 1700
39597527 PugachAG C June 24, 2018, 9:46 a.m. OK GNU C++17 TESTS 76 15 0 1700
39454882 PetitAPetit C June 21, 2018, 7:56 a.m. OK GNU C++17 TESTS 76 15 0 1700
39409010 situ C June 19, 2018, 11:37 a.m. OK GNU C++17 TESTS 76 15 0 1700
39405951 reverse_macro C June 19, 2018, 9:51 a.m. OK GNU C++17 TESTS 76 15 0 1700
39404719 bu_hridoy C June 19, 2018, 9:12 a.m. OK GNU C++17 TESTS 76 15 0 1700
39401287 paradox C June 19, 2018, 7:06 a.m. OK GNU C++17 TESTS 76 15 0 1700
39401231 doshy C June 19, 2018, 7:03 a.m. OK GNU C++17 TESTS 76 15 0 1700
39399809 artsin666 C June 19, 2018, 6 a.m. OK GNU C++17 TESTS 76 15 0 1700
55233731 madfrost C June 7, 2019, 7:12 a.m. OK Java 8 TESTS 76 109 0 1700
48046438 Ahmed_Diab C Jan. 7, 2019, 3:45 a.m. OK Java 8 TESTS 76 109 0 1700
46916678 cis_pie C Dec. 11, 2018, 9:12 p.m. OK Java 8 TESTS 76 109 0 1700
45399065 Abdelrahman22 C Nov. 7, 2018, 7:12 a.m. OK Java 8 TESTS 76 124 0 1700
68640977 insane_28 C Jan. 12, 2020, 7:30 a.m. OK Java 8 TESTS 76 124 0 1700
59543793 madfrost C Aug. 26, 2019, 8:18 p.m. OK Java 8 TESTS 76 124 0 1700
58527385 chojh1222 C Aug. 10, 2019, 7:49 a.m. OK Java 8 TESTS 76 124 0 1700
47520804 kusomushi C Dec. 26, 2018, 12:58 p.m. OK Java 8 TESTS 76 124 0 1700
45508720 joseraul C Nov. 10, 2018, 11:57 a.m. OK Java 8 TESTS 76 124 0 1700
42223454 BiIIy C Aug. 28, 2018, 11:42 p.m. OK Java 8 TESTS 76 124 0 1700
57281182 og.kostya C July 18, 2019, 12:49 p.m. OK Mono C# TESTS 76 46 0 1700
39415150 Stepavly C June 19, 2018, 3:19 p.m. OK Mono C# TESTS 76 46 102400 1700
67612568 hibatibati C Dec. 25, 2019, 3:57 p.m. OK Mono C# TESTS 76 62 1638400 1700
50483260 Mem C Feb. 25, 2019, 10:13 a.m. OK Mono C# TESTS 76 62 3584000 1700
39413240 MenOfPassion C June 19, 2018, 2:04 p.m. OK MS C++ TESTS 76 30 0 1700
39382404 Volpe C June 18, 2018, 6:07 p.m. OK MS C++ TESTS 76 30 0 1700
56788907 vjudge5 C July 10, 2019, 9:40 a.m. OK MS C++ TESTS 76 30 0 1700
39421352 nik1998 C June 19, 2018, 8:17 p.m. OK MS C++ TESTS 76 30 2457600 1700
58803767 vjudge5 C Aug. 14, 2019, 8:13 a.m. OK MS C++ TESTS 76 31 0 1700
58699758 vjudge5 C Aug. 13, 2019, 7:24 a.m. OK MS C++ TESTS 76 31 0 1700
58804163 vjudge1 C Aug. 14, 2019, 8:20 a.m. OK MS C++ TESTS 76 31 0 1700
58852093 vjudge5 C Aug. 15, 2019, 7:53 a.m. OK MS C++ TESTS 76 31 0 1700
58861809 vjudge4 C Aug. 15, 2019, 11:56 a.m. OK MS C++ TESTS 76 31 0 1700
64067356 vjudge2 C Nov. 2, 2019, 6:15 a.m. OK MS C++ TESTS 76 31 0 1700
63301240 AleksanderBalobanov C Oct. 24, 2019, 2:21 p.m. OK MS C++ 2017 TESTS 76 31 307200 1700
62148019 ICHB-MrRares C Oct. 8, 2019, 4:16 p.m. OK MS C++ 2017 TESTS 76 46 0 1700
39417620 Darooha C June 19, 2018, 5:09 p.m. OK Ocaml TESTS 76 15 0 1700
39415091 sid_8489 C June 19, 2018, 3:17 p.m. OK PyPy 2 TESTS 76 78 0 1700
39675288 SerChirag C June 26, 2018, 12:25 p.m. OK PyPy 2 TESTS 76 93 0 1700
39430195 EON_KID C June 20, 2018, 8:31 a.m. OK PyPy 2 TESTS 76 93 0 1700
39399093 YESMAths C June 19, 2018, 5:25 a.m. OK PyPy 2 TESTS 76 93 0 1700
39743021 aeternalis1 C June 28, 2018, 12:38 p.m. OK PyPy 2 TESTS 76 109 0 1700
39743007 aeternalis1 C June 28, 2018, 12:38 p.m. OK PyPy 2 TESTS 76 109 0 1700
39407374 sasasagagaga C June 19, 2018, 10:40 a.m. OK PyPy 2 TESTS 76 109 0 1700
39391449 pa.n.ik C June 18, 2018, 8:45 p.m. OK PyPy 2 TESTS 76 109 0 1700
60403064 anshuman16423 C Sept. 11, 2019, 5:25 p.m. OK PyPy 2 TESTS 76 124 0 1700
41635561 gaurav17050 C Aug. 15, 2018, 11:16 p.m. OK PyPy 2 TESTS 76 155 0 1700
39390387 kul3 C June 18, 2018, 8:14 p.m. OK PyPy 3 TESTS 76 109 0 1700
39423811 bernie C June 20, 2018, 12:21 a.m. OK PyPy 3 TESTS 76 109 0 1700
39400646 Dishant_18 C June 19, 2018, 6:37 a.m. OK PyPy 3 TESTS 76 109 0 1700
39399194 nimelyohin C June 19, 2018, 5:30 a.m. OK PyPy 3 TESTS 76 109 0 1700
39694396 Paixao C June 27, 2018, 7:38 a.m. OK PyPy 3 TESTS 76 124 0 1700
39519853 wadissimo C June 22, 2018, 2:55 p.m. OK PyPy 3 TESTS 76 124 0 1700
39391029 sergovoy C June 18, 2018, 8:32 p.m. OK PyPy 3 TESTS 76 124 0 1700
39390363 kul3 C June 18, 2018, 8:14 p.m. OK PyPy 3 TESTS 76 124 0 1700
39385382 BohdanVey C June 18, 2018, 6:22 p.m. OK PyPy 3 TESTS 76 124 0 1700
39379263 Tejkiran C June 18, 2018, 5:51 p.m. OK PyPy 3 TESTS 76 124 0 1700
39531233 ay2306 C June 23, 2018, 3:22 a.m. OK Python 2 TESTS 76 93 0 1700
39461988 aniketgattani C June 21, 2018, 12:31 p.m. OK Python 2 TESTS 76 93 0 1700
39412743 tanghao C June 19, 2018, 1:44 p.m. OK Python 2 TESTS 76 93 0 1700
39524657 filo C June 22, 2018, 6:07 p.m. OK Python 2 TESTS 76 108 0 1700
39528185 snusmumrik C June 22, 2018, 9:24 p.m. OK Python 2 TESTS 76 109 0 1700
39420460 fromexptolog C June 19, 2018, 7:22 p.m. OK Python 2 TESTS 76 109 0 1700
39405093 dalex C June 19, 2018, 9:24 a.m. OK Python 2 TESTS 76 109 0 1700
39404052 sophirothwither C June 19, 2018, 8:48 a.m. OK Python 2 TESTS 76 109 0 1700
39401665 mihir_94 C June 19, 2018, 7:21 a.m. OK Python 2 TESTS 76 109 0 1700
39390016 regularnerd C June 18, 2018, 8:07 p.m. OK Python 2 TESTS 76 109 0 1700
39400569 aro1 C June 19, 2018, 6:34 a.m. OK Python 3 TESTS 76 77 0 1700
39397668 PyAlpha C June 19, 2018, 4:07 a.m. OK Python 3 TESTS 76 77 0 1700
39653903 LintuStorm C June 25, 2018, 3:40 p.m. OK Python 3 TESTS 76 78 0 1700
39428766 Beliy_Viacheslav C June 20, 2018, 7:30 a.m. OK Python 3 TESTS 76 78 0 1700
39422669 orailly C June 19, 2018, 10:03 p.m. OK Python 3 TESTS 76 78 0 1700
39420665 Naman_Bhalla C June 19, 2018, 7:33 p.m. OK Python 3 TESTS 76 78 0 1700
39416269 Knowmyself C June 19, 2018, 4:10 p.m. OK Python 3 TESTS 76 78 0 1700
39406813 dzyura_christopher C June 19, 2018, 10:20 a.m. OK Python 3 TESTS 76 78 0 1700
39399311 yoddhaa C June 19, 2018, 5:36 a.m. OK Python 3 TESTS 76 78 0 1700
39398947 shaswat57 C June 19, 2018, 5:17 a.m. OK Python 3 TESTS 76 78 0 1700
41677476 betrue12 C Aug. 17, 2018, 8:51 a.m. OK Ruby TESTS 76 93 0 1700
40360592 nitishch C July 15, 2018, 12:52 a.m. OK Rust TESTS 76 31 0 1700
39450996 cyand1317 C June 21, 2018, 4:26 a.m. OK Rust TESTS 76 31 0 1700

remove filters

Back to search problems