Codeforces Round 287 (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
507 Codeforces Round 287 (Div. 2) FINISHED False 7200 315496823 Jan. 23, 2015, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4396 ) C Guess Your Way Out! PROGRAMMING implementation math trees 1700

B'Amr bought a new video game "Guess Your Way Out!". The goal of the game is to find an exit from the maze that looks like a perfect binary tree of height h. The player is initially standing at the root of the tree and the exit from the tree is located at some leaf node. Let 's index all the leaf nodes from the left to the right from 1 to 2h. The exit is located at some node n where 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892h, the player doesn 't know where the exit is so he has to guess his way out! Amr follows simple algorithm to choose the path. Let 's consider infinite command string "LRLRLRLRL..." (consisting of alternating characters 'L ' and 'R '). Amr sequentially executes the characters of the string using following rules: Now Amr wonders, if he follows this algorithm, how many nodes he is going to visit before reaching the exit? Input consists of two integers h, xe2 x80 x89n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89h xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892h). Output a single integer representing the number of nodes (excluding the exit node) Amr is going to visit before reaching the exit by following this algorithm. A perfect binary tree of height h is a binary tree consisting of h xe2 x80 x89+ xe2 x80 x891 levels. Level 0 consists of a single node called root, level h consists of 2h nodes called leaves. Each node that is not a leaf has exactly two children, left and right one. Following picture illustrates the sample test number 3. Nodes are labeled according to the order of visit. '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50408445 vjudge2 C Feb. 23, 2019, 11:11 p.m. OK Clang++17 Diagnostics TESTS 62 46 0 1700
9660452 Dennis_Ritchie C Feb. 1, 2015, 1:10 a.m. OK D TESTS 62 15 0 1700
9697430 Dennis_Ritchie C Feb. 3, 2015, 7:41 a.m. OK D TESTS 62 30 0 1700
9572013 IfElze C Jan. 27, 2015, 1:01 p.m. OK FPC TESTS 62 15 0 1700
9627860 nielswiles C Jan. 30, 2015, 2:46 p.m. OK FPC TESTS 62 15 0 1700
12025333 q234rty C July 13, 2015, 5:01 a.m. OK FPC TESTS 62 15 0 1700
9723805 BenderRodriguez C Feb. 5, 2015, 6:08 a.m. OK FPC TESTS 62 15 0 1700
9573511 Leshka C Jan. 27, 2015, 3:17 p.m. OK FPC TESTS 62 15 102400 1700
21063469 Zeron C Oct. 1, 2016, 10:02 a.m. OK FPC TESTS 62 30 0 1700
12041011 igdor99 C July 14, 2015, 11:54 a.m. OK FPC TESTS 62 30 0 1700
9803898 Hydra_Shen C Feb. 12, 2015, 1:36 a.m. OK FPC TESTS 62 30 0 1700
9738734 Paige C Feb. 6, 2015, 5:35 p.m. OK FPC TESTS 62 30 0 1700
10973658 lightkuriboh C May 2, 2015, 11:16 a.m. OK FPC TESTS 62 30 1740800 1700
10507953 abhishekgarg C March 28, 2015, 7:22 p.m. OK GNU C TESTS 62 15 0 1700
9951216 zhisheng C Feb. 21, 2015, 6:07 p.m. OK GNU C TESTS 62 15 0 1700
9569343 sanban C Jan. 27, 2015, 7:27 a.m. OK GNU C TESTS 62 15 0 1700
10182441 optimus___prime C March 6, 2015, 7:48 p.m. OK GNU C TESTS 62 30 0 1700
10153086 sanketM C March 4, 2015, 7:52 p.m. OK GNU C TESTS 62 30 0 1700
10935732 Sneh123 C April 30, 2015, 7:05 a.m. OK GNU C TESTS 62 30 1843200 1700
10395870 aravi1995 C March 22, 2015, 9 a.m. OK GNU C TESTS 62 31 0 1700
10085186 f.bialas C Feb. 28, 2015, 4:30 p.m. OK GNU C TESTS 62 31 0 1700
9564229 Gang_Chen C Jan. 26, 2015, 6:27 p.m. OK GNU C TESTS 62 31 0 1700
9551832 comfi C Jan. 25, 2015, 5:02 p.m. OK GNU C TESTS 62 31 0 1700
27117492 vjudge2 C May 15, 2017, 8:05 a.m. OK GNU C++ TESTS 62 15 0 1700
22907814 vjudge5 C Dec. 12, 2016, 3:58 p.m. OK GNU C++ TESTS 62 15 0 1700
22821650 vjudge3 C Dec. 8, 2016, 9:20 p.m. OK GNU C++ TESTS 62 15 0 1700
22612616 facmlove C Nov. 30, 2016, 1:36 a.m. OK GNU C++ TESTS 62 15 0 1700
21860202 ajinkya1p3 C Oct. 28, 2016, 10:37 p.m. OK GNU C++ TESTS 62 15 0 1700
21058217 cps C Oct. 1, 2016, 6:18 a.m. OK GNU C++ TESTS 62 15 0 1700
20656543 Gnouc C Sept. 16, 2016, 9:14 a.m. OK GNU C++ TESTS 62 15 0 1700
19444682 Loud_Scream C July 27, 2016, 3:36 p.m. OK GNU C++ TESTS 62 15 0 1700
19443997 Loud_Scream C July 27, 2016, 2:29 p.m. OK GNU C++ TESTS 62 15 0 1700
19443973 Loud_Scream C July 27, 2016, 2:28 p.m. OK GNU C++ TESTS 62 15 0 1700
9931815 naij C Feb. 19, 2015, 9:39 p.m. OK GNU C++0x TESTS 62 15 0 1700
10311162 randomusername C March 17, 2015, 2:09 p.m. OK GNU C++0x TESTS 62 15 0 1700
10309559 randomusername C March 17, 2015, 11:33 a.m. OK GNU C++0x TESTS 62 15 0 1700
10248971 JohStraat C March 12, 2015, 3:35 p.m. OK GNU C++0x TESTS 62 15 0 1700
10222475 yummy C March 9, 2015, 11:21 p.m. OK GNU C++0x TESTS 62 15 0 1700
10140746 CMaster C March 4, 2015, 5:30 a.m. OK GNU C++0x TESTS 62 15 0 1700
9948067 sohitverma94 C Feb. 21, 2015, 12:32 p.m. OK GNU C++0x TESTS 62 15 0 1700
9926168 skrydg C Feb. 19, 2015, 1:27 p.m. OK GNU C++0x TESTS 62 15 0 1700
9879256 berendeanicolae C Feb. 17, 2015, 7:14 a.m. OK GNU C++0x TESTS 62 15 0 1700
9782254 Mohammad_Yasser C Feb. 9, 2015, 5:09 p.m. OK GNU C++0x TESTS 62 15 0 1700
11016225 merolish C May 6, 2015, 7:36 p.m. OK GNU C11 TESTS 62 15 0 1700
11542098 NoSoul C June 12, 2015, 9:53 a.m. OK GNU C11 TESTS 62 15 0 1700
12021778 butakus C July 12, 2015, 5:47 p.m. OK GNU C11 TESTS 62 15 0 1700
50530625 gabrielsousa9 C Feb. 26, 2019, 1:30 p.m. OK GNU C11 TESTS 62 31 0 1700
57755480 rainboy C July 25, 2019, 4:09 p.m. OK GNU C11 TESTS 62 31 0 1700
30012587 Dibagger C Sept. 2, 2017, 12:21 p.m. OK GNU C++11 TESTS 62 15 0 1700
29849454 bharat.khanna.cse14 C Aug. 28, 2017, 3:55 p.m. OK GNU C++11 TESTS 62 15 0 1700
27419855 96.djain C May 28, 2017, 9:08 p.m. OK GNU C++11 TESTS 62 15 0 1700
22941002 Bekheit C Dec. 14, 2016, 3:27 a.m. OK GNU C++11 TESTS 62 15 0 1700
22579838 huang.chao C Nov. 28, 2016, 3:17 p.m. OK GNU C++11 TESTS 62 15 0 1700
32513294 charaneadam C Nov. 21, 2017, 12:03 a.m. OK GNU C++11 TESTS 62 15 0 1700
32285732 edisonhello C Nov. 13, 2017, 1:39 p.m. OK GNU C++11 TESTS 62 15 0 1700
31768912 sngv C Oct. 26, 2017, 6:15 p.m. OK GNU C++11 TESTS 62 15 0 1700
31291415 ilikebarryallen C Oct. 14, 2017, 6:24 a.m. OK GNU C++11 TESTS 62 15 0 1700
30047784 ea6102 C Sept. 4, 2017, 6:18 a.m. OK GNU C++11 TESTS 62 15 0 1700
30299122 MahdiOR C Sept. 13, 2017, 4:48 a.m. OK GNU C++14 TESTS 62 15 0 1700
30274320 Rishab_arora C Sept. 11, 2017, 8:55 p.m. OK GNU C++14 TESTS 62 15 0 1700
30241432 shivam_jain C Sept. 10, 2017, 9:18 a.m. OK GNU C++14 TESTS 62 15 0 1700
30018662 mds_333 C Sept. 2, 2017, 6:25 p.m. OK GNU C++14 TESTS 62 15 0 1700
30007514 asdfghjl C Sept. 2, 2017, 9:14 a.m. OK GNU C++14 TESTS 62 15 0 1700
30338624 nenmok C Sept. 14, 2017, 9:14 p.m. OK GNU C++14 TESTS 62 15 0 1700
31121567 _QWOiNYUIVMPFSBKLiGSMAP_ C Oct. 7, 2017, 4:04 p.m. OK GNU C++14 TESTS 62 15 0 1700
31870908 islammohsen C Oct. 29, 2017, 3:31 p.m. OK GNU C++14 TESTS 62 15 0 1700
31931030 abdulla.ashraf C Oct. 31, 2017, 6:48 p.m. OK GNU C++14 TESTS 62 15 0 1700
48948537 Ahmed_Araby C Jan. 25, 2019, 8:51 p.m. OK GNU C++14 TESTS 62 15 0 1700
37423489 jnk C April 18, 2018, 2:31 a.m. OK GNU C++17 TESTS 62 15 3379200 1700
39070121 Photon_ C June 9, 2018, 1:17 p.m. OK GNU C++17 TESTS 62 30 0 1700
43442847 dmkozyrev C Sept. 26, 2018, 9:58 a.m. OK GNU C++17 TESTS 62 30 0 1700
52295904 vjudge3 C April 4, 2019, 6:03 a.m. OK GNU C++17 TESTS 62 30 0 1700
50424453 Gertab C Feb. 24, 2019, 10:46 a.m. OK GNU C++17 TESTS 62 30 0 1700
40979241 AliShahali1382 C July 30, 2018, 4:59 p.m. OK GNU C++17 TESTS 62 30 0 1700
58900438 ashishpm C Aug. 16, 2019, 8:56 a.m. OK GNU C++17 TESTS 62 30 0 1700
48910880 vjudge2 C Jan. 25, 2019, 2:04 a.m. OK GNU C++17 TESTS 62 30 204800 1700
53960820 Hisoka C May 10, 2019, 2:03 p.m. OK GNU C++17 TESTS 62 30 1024000 1700
69975290 multimuvies C Feb. 1, 2020, 2:49 p.m. OK GNU C++17 TESTS 62 31 0 1700
9549651 Eeyore C Jan. 25, 2015, 1:50 p.m. OK Go TESTS 62 30 0 1700
61086577 120405217 C Sept. 22, 2019, 6:37 p.m. OK Go TESTS 62 31 0 1700
61086746 120405217 C Sept. 22, 2019, 6:41 p.m. OK Go TESTS 62 31 0 1700
9552817 SabakuNoGaara C Jan. 25, 2015, 6:49 p.m. OK Java 6 TESTS 62 93 0 1700
9592712 Monica_karam C Jan. 27, 2015, 7:30 p.m. OK Java 6 TESTS 62 108 0 1700
12003278 tehqin C July 11, 2015, 2:08 a.m. OK Java 7 TESTS 62 77 0 1700
11541644 overnite.runner C June 12, 2015, 9:10 a.m. OK Java 7 TESTS 62 77 0 1700
10418774 mikcorer C March 24, 2015, 2:47 a.m. OK Java 7 TESTS 62 77 0 1700
9915075 darsh C Feb. 18, 2015, 1:51 p.m. OK Java 7 TESTS 62 77 0 1700
9732545 megaspazz C Feb. 6, 2015, 1:03 a.m. OK Java 7 TESTS 62 77 0 1700
9674702 aladdin3 C Feb. 2, 2015, 11:03 a.m. OK Java 7 TESTS 62 77 0 1700
9639211 zimpha C Jan. 31, 2015, 9:43 a.m. OK Java 7 TESTS 62 77 0 1700
9568416 jitendra_theta C Jan. 27, 2015, 5:27 a.m. OK Java 7 TESTS 62 77 0 1700
9567900 fathallah C Jan. 27, 2015, 3:41 a.m. OK Java 7 TESTS 62 77 0 1700
12023792 abear888 C July 12, 2015, 11:26 p.m. OK Java 7 TESTS 62 77 0 1700
59532411 TheSawan C Aug. 26, 2019, 3:33 p.m. OK Java 8 TESTS 62 109 0 1700
68669376 goyalakash1997 C Jan. 12, 2020, 4:18 p.m. OK Java 8 TESTS 62 109 0 1700
57616631 vjudge5 C July 24, 2019, 1:56 a.m. OK Java 8 TESTS 62 109 0 1700
53937489 mennafadali C May 9, 2019, 11:09 p.m. OK Java 8 TESTS 62 109 0 1700
53826551 mennafadali C May 6, 2019, 4:31 p.m. OK Java 8 TESTS 62 109 0 1700
53195371 chojh1222 C April 23, 2019, 2:58 p.m. OK Java 8 TESTS 62 109 0 1700
12728698 Nirmit13cs30 C Aug. 28, 2015, 8:27 a.m. OK Java 8 TESTS 62 109 0 1700
12202950 upsolving C July 23, 2015, 4:04 p.m. OK Java 8 TESTS 62 109 0 1700
12099128 Nosila C July 17, 2015, 9:19 p.m. OK Java 8 TESTS 62 109 0 1700
12026435 akshay_miterani C July 13, 2015, 7:47 a.m. OK Java 8 TESTS 62 109 0 1700
9853301 dabbler C Feb. 14, 2015, 10:45 p.m. OK JavaScript TESTS 62 31 0 1700
9853358 dabbler C Feb. 14, 2015, 10:50 p.m. OK JavaScript TESTS 62 31 0 1700
35884036 ______u______ C March 3, 2018, 1:03 p.m. OK JavaScript TESTS 62 31 6963200 1700
35883918 ______n______ C March 3, 2018, 1:03 p.m. OK JavaScript TESTS 62 31 6963200 1700
35883152 _____k_____ C March 3, 2018, 12:50 p.m. OK JavaScript TESTS 62 31 6963200 1700
35882779 _____i_____ C March 3, 2018, 12:44 p.m. OK JavaScript TESTS 62 31 6963200 1700
35872473 ______h______ C March 3, 2018, 7:10 a.m. OK JavaScript TESTS 62 31 6963200 1700
35872315 ______k______ C March 3, 2018, 7:09 a.m. OK JavaScript TESTS 62 31 6963200 1700
35871792 ______i______ C March 3, 2018, 6:58 a.m. OK JavaScript TESTS 62 31 6963200 1700
35864330 ______M______ C March 2, 2018, 11:06 p.m. OK JavaScript TESTS 62 31 6963200 1700
10691477 bogomolov35 C April 13, 2015, 8:50 a.m. OK Mono C# TESTS 62 62 204800 1700
13220886 og.kostya C Sept. 25, 2015, 3:11 p.m. OK MS C# TESTS 62 46 204800 1700
9713710 Reddel C Feb. 4, 2015, 12:11 p.m. OK MS C# TESTS 62 62 2150400 1700
15142450 HappyNewYearMike C Dec. 31, 2015, 10:26 p.m. OK MS C++ TESTS 62 15 0 1700
22653071 irain C Dec. 2, 2016, 7 a.m. OK MS C++ TESTS 62 15 0 1700
19038421 vjudge2 C July 12, 2016, 12:46 a.m. OK MS C++ TESTS 62 15 0 1700
14510892 MrKaStep C Nov. 27, 2015, 12:28 p.m. OK MS C++ TESTS 62 15 0 1700
12685494 Tinsane C Aug. 24, 2015, 2:40 p.m. OK MS C++ TESTS 62 15 0 1700
12435144 RiarioRovere C Aug. 10, 2015, 9:15 a.m. OK MS C++ TESTS 62 15 0 1700
12197282 vjudge4 C July 23, 2015, 8:53 a.m. OK MS C++ TESTS 62 15 0 1700
10541486 goodhope C April 1, 2015, 12:28 p.m. OK MS C++ TESTS 62 15 0 1700
10500663 NVAL C March 28, 2015, 1:28 p.m. OK MS C++ TESTS 62 15 0 1700
10346087 OmarHashim C March 19, 2015, 7:48 a.m. OK MS C++ TESTS 62 15 0 1700
27726589 dragon.warrior C June 11, 2017, 7:40 p.m. OK PyPy 2 TESTS 62 77 0 1700
15586132 goffrie C Jan. 26, 2016, 4:47 a.m. OK PyPy 2 TESTS 62 77 0 1700
10181914 brodo C March 6, 2015, 7 p.m. OK PyPy 2 TESTS 62 93 0 1700
10279703 111vad111 C March 14, 2015, 9:55 p.m. OK PyPy 3 TESTS 62 108 0 1700
59956542 cskanani C Sept. 3, 2019, 4:23 p.m. OK PyPy 3 TESTS 62 140 1433600 1700
53484989 limabeans C April 29, 2019, 2:12 a.m. OK PyPy 3 TESTS 62 296 6144000 1700
12036522 jan25 C July 14, 2015, 5:20 a.m. OK Python 2 TESTS 62 46 0 1700
11692816 vjudge2 C June 21, 2015, 7:44 a.m. OK Python 2 TESTS 62 46 0 1700
10429067 aranjuda C March 25, 2015, 5:19 a.m. OK Python 2 TESTS 62 46 0 1700
10085887 riser00 C Feb. 28, 2015, 5:05 p.m. OK Python 2 TESTS 62 46 0 1700
16675955 Elise C March 12, 2016, 2:48 p.m. OK Python 2 TESTS 62 61 0 1700
11867471 object_oriented_program C June 30, 2015, 5:33 p.m. OK Python 2 TESTS 62 61 0 1700
9548186 FxckMeOnceMore C Jan. 25, 2015, 11:15 a.m. OK Python 2 TESTS 62 61 0 1700
15586040 xiaowuc1 C Jan. 26, 2016, 4:37 a.m. OK Python 2 TESTS 62 62 0 1700
12916766 biltharesatyendra C Sept. 10, 2015, 1:48 a.m. OK Python 2 TESTS 62 62 0 1700
12003585 mihir.gogate C July 11, 2015, 3:04 a.m. OK Python 2 TESTS 62 62 0 1700
31155193 yugle7 C Oct. 8, 2017, 9:39 p.m. OK Python 3 TESTS 62 62 0 1700
31155020 yugle7 C Oct. 8, 2017, 9:28 p.m. OK Python 3 TESTS 62 62 0 1700
19161782 future_loops C July 15, 2016, 8:56 p.m. OK Python 3 TESTS 62 62 0 1700
12776448 PPTGamer C Aug. 30, 2015, 12:41 p.m. OK Python 3 TESTS 62 62 0 1700
12021672 ArcS C July 12, 2015, 5:35 p.m. OK Python 3 TESTS 62 62 0 1700
12021559 ArcS C July 12, 2015, 5:22 p.m. OK Python 3 TESTS 62 62 0 1700
11139385 AbdoA2 C May 18, 2015, 11:40 p.m. OK Python 3 TESTS 62 62 0 1700
9914863 miloserd C Feb. 18, 2015, 1:35 p.m. OK Python 3 TESTS 62 62 0 1700
9818859 ershov.stanislav C Feb. 13, 2015, 5:22 p.m. OK Python 3 TESTS 62 62 0 1700
9642241 Linkk C Jan. 31, 2015, 12:09 p.m. OK Python 3 TESTS 62 62 0 1700
9772555 Grevozin C Feb. 8, 2015, 3:15 p.m. OK Ruby TESTS 62 62 0 1700
9635806 squallkt C Jan. 31, 2015, 12:56 a.m. OK Ruby TESTS 62 62 102400 1700
9569076 roma2107946 C Jan. 27, 2015, 6:56 a.m. OK Ruby TESTS 62 77 102400 1700
9570193 NovemberRain C Jan. 27, 2015, 9:18 a.m. OK Scala TESTS 62 249 0 1700

remove filters

Back to search problems