Codeforces Round 118 (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
185 Codeforces Round 118 (Div. 1) FINISHED False 7200 395677799 May 4, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5949 ) A Plant PROGRAMMING math 1300

B'Dwarfs have planted a very interesting plant, which is a triangle directed "upwards". This plant has an amusing feature. After one year a triangle plant directed "upwards" divides into four triangle plants: three of them will point "upwards" and one will point "downwards". After another year, each triangle plant divides into four triangle plants: three of them will be directed in the same direction as the parent plant, and one of them will be directed in the opposite direction. Then each year the process repeats. The figure below illustrates this process. Help the dwarfs find out how many triangle plants that point "upwards" will be in n years. The first line contains a single integer n (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) -- the number of full years when the plant grew. Please do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use cin, cout streams or the %I64d specifier. Print a single integer -- the remainder of dividing the number of plants that will point "upwards" in n years by 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first test sample corresponds to the second triangle on the figure in the statement. The second test sample corresponds to the third one.'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3426140 AHTuTTuTyX A March 31, 2013, 7:55 a.m. OK Delphi TESTS 49 15 0 1300
1652777 tourist A May 4, 2012, 3:33 p.m. OK Delphi TESTS 49 30 819200 1300
1665069 Ramp A May 5, 2012, 7:39 p.m. OK Delphi TESTS 49 30 819200 1300
1662299 AleksanderBalobanov A May 4, 2012, 7:25 p.m. OK Delphi TESTS 49 30 921600 1300
1653912 Depool A May 4, 2012, 3:43 p.m. OK Delphi TESTS 49 30 9216000 1300
1662246 MrJigan1488 A May 4, 2012, 7:08 p.m. OK Delphi TESTS 49 30 9318400 1300
1653841 Timur_Keks A May 4, 2012, 3:43 p.m. OK Delphi TESTS 49 30 9420800 1300
2145631 TarasSavitskyi A Sept. 11, 2012, 5:53 p.m. OK Delphi TESTS 49 30 9420800 1300
1671138 DeathCoil A May 9, 2012, 3:37 p.m. OK Delphi TESTS 49 30 9420800 1300
1997051 Shaykhutdinov-T-I A Aug. 10, 2012, 7:47 a.m. OK Delphi TESTS 49 30 9523200 1300
3229903 nhandi A March 2, 2013, 12:04 p.m. OK FPC TESTS 49 15 0 1300
3935692 pha96 A June 22, 2013, 1:06 p.m. OK FPC TESTS 49 15 0 1300
3880236 nmnhutminh A June 13, 2013, 4:14 p.m. OK FPC TESTS 49 15 0 1300
3877472 25122008 A June 13, 2013, 4:34 a.m. OK FPC TESTS 49 15 0 1300
3876240 25122008 A June 12, 2013, 6:59 p.m. OK FPC TESTS 49 15 0 1300
3427513 Nik_Storm_2010 A March 31, 2013, 1:24 p.m. OK FPC TESTS 49 15 0 1300
13235341 Valerich A Sept. 26, 2015, 11:47 a.m. OK FPC TESTS 49 30 0 1300
12959770 miltonbw A Sept. 11, 2015, 1:45 p.m. OK FPC TESTS 49 30 0 1300
12955281 huynhnhat A Sept. 11, 2015, 8:29 a.m. OK FPC TESTS 49 30 0 1300
6581019 plusplus7_wolf A May 10, 2014, 6:57 a.m. OK FPC TESTS 49 30 0 1300
3042062 hariprasath A Jan. 31, 2013, 6:56 p.m. OK GNU C TESTS 49 15 0 1300
19256706 meetjoshi A July 19, 2016, 3:33 p.m. OK GNU C TESTS 49 30 0 1300
15091415 hardiknegi A Dec. 30, 2015, 12:39 a.m. OK GNU C TESTS 49 30 0 1300
2151698 c.utkarsh777 A Sept. 11, 2012, 9:30 p.m. OK GNU C TESTS 49 30 1433600 1300
2106659 vaibhavG55 A Sept. 9, 2012, 2:59 p.m. OK GNU C TESTS 49 30 1433600 1300
2017315 cooldude A Aug. 15, 2012, 4:05 p.m. OK GNU C TESTS 49 30 1433600 1300
1914022 rown A July 20, 2012, 11:40 a.m. OK GNU C TESTS 49 30 1433600 1300
1812068 sr_k A June 21, 2012, 8:59 a.m. OK GNU C TESTS 49 30 1433600 1300
1666362 Farmer A May 6, 2012, 11:05 a.m. OK GNU C TESTS 49 30 1433600 1300
1665625 FJYsmall A May 6, 2012, 6:13 a.m. OK GNU C TESTS 49 30 1433600 1300
2070087 mystery_boy A Aug. 30, 2012, 6:19 p.m. OK GNU C++ TESTS 49 10 819200 1300
4095637 bnuvjudge2 A July 18, 2013, 2 a.m. OK GNU C++ TESTS 49 15 0 1300
4145010 yejinru A July 24, 2013, 6:49 a.m. OK GNU C++ TESTS 49 15 0 1300
4145007 vjudge2 A July 24, 2013, 6:49 a.m. OK GNU C++ TESTS 49 15 0 1300
4096021 bnuvjudge2 A July 18, 2013, 3:06 a.m. OK GNU C++ TESTS 49 15 0 1300
4095770 bnuvjudge2 A July 18, 2013, 2:23 a.m. OK GNU C++ TESTS 49 15 0 1300
4095561 bnuvjudge2 A July 18, 2013, 1:50 a.m. OK GNU C++ TESTS 49 15 0 1300
4069354 csuchenan A July 14, 2013, 11:42 a.m. OK GNU C++ TESTS 49 15 0 1300
3963823 Wasted A June 26, 2013, 1:13 p.m. OK GNU C++ TESTS 49 15 0 1300
3963291 hssh A June 26, 2013, 10:25 a.m. OK GNU C++ TESTS 49 15 0 1300
3179828 Doxer A Feb. 24, 2013, 10:54 a.m. OK GNU C++0x TESTS 49 15 0 1300
10035632 unique_coder A Feb. 26, 2015, 5:26 p.m. OK GNU C++0x TESTS 49 30 0 1300
9861416 mnbvmar A Feb. 15, 2015, 4:07 p.m. OK GNU C++0x TESTS 49 30 0 1300
9861409 johnasselta A Feb. 15, 2015, 4:07 p.m. OK GNU C++0x TESTS 49 30 0 1300
9861390 JohnPaulII A Feb. 15, 2015, 4:05 p.m. OK GNU C++0x TESTS 49 30 0 1300
9861385 Swistakk A Feb. 15, 2015, 4:04 p.m. OK GNU C++0x TESTS 49 30 0 1300
9799484 Harta A Feb. 11, 2015, 2:46 p.m. OK GNU C++0x TESTS 49 30 0 1300
9278848 suchir A Dec. 26, 2014, 8:12 p.m. OK GNU C++0x TESTS 49 30 0 1300
7249617 sunny_girl A July 26, 2014, 11:45 a.m. OK GNU C++0x TESTS 49 30 0 1300
5923435 diego_v1 A March 4, 2014, 12:08 p.m. OK GNU C++0x TESTS 49 30 0 1300
24824089 pratik17 A Feb. 20, 2017, 2:31 p.m. OK GNU C11 TESTS 49 30 1945600 1300
25463268 PotatoKiller A March 13, 2017, 10:54 p.m. OK GNU C11 TESTS 49 30 2048000 1300
11839353 merolish A June 29, 2015, 4:30 p.m. OK GNU C11 TESTS 49 60 0 1300
65602012 ewan_mcjesus A Nov. 23, 2019, 6:32 p.m. OK GNU C11 TESTS 49 62 0 1300
65601836 ewan_mcjesus A Nov. 23, 2019, 6:27 p.m. OK GNU C11 TESTS 49 62 0 1300
65719456 Rockarya_IIITH A Nov. 25, 2019, 6:15 p.m. OK GNU C11 TESTS 49 62 0 1300
65681897 aravind.narayanan A Nov. 24, 2019, 8:34 p.m. OK GNU C11 TESTS 49 62 0 1300
65668584 ruthwikreddy713 A Nov. 24, 2019, 2:56 p.m. OK GNU C11 TESTS 49 62 0 1300
65667108 Ar_9020_th A Nov. 24, 2019, 2:23 p.m. OK GNU C11 TESTS 49 62 0 1300
65614406 Adata1000 A Nov. 24, 2019, 2:24 a.m. OK GNU C11 TESTS 49 62 0 1300
31268522 ilikebarryallen A Oct. 13, 2017, 8:18 a.m. OK GNU C++11 TESTS 49 30 0 1300
29841629 vjudge1 A Aug. 28, 2017, 8:54 a.m. OK GNU C++11 TESTS 49 30 0 1300
29841693 vjudge4 A Aug. 28, 2017, 8:58 a.m. OK GNU C++11 TESTS 49 30 0 1300
29859144 carott A Aug. 29, 2017, 6:21 a.m. OK GNU C++11 TESTS 49 30 0 1300
29837545 vjudge1 A Aug. 28, 2017, 2:39 a.m. OK GNU C++11 TESTS 49 30 0 1300
29776930 vjudge3 A Aug. 25, 2017, 10:53 a.m. OK GNU C++11 TESTS 49 30 0 1300
29713671 TadijaSebez A Aug. 23, 2017, 5:20 p.m. OK GNU C++11 TESTS 49 30 0 1300
29676667 benTuTuT A Aug. 22, 2017, 7:40 a.m. OK GNU C++11 TESTS 49 30 0 1300
29639022 wxh571001500 A Aug. 21, 2017, 8:42 a.m. OK GNU C++11 TESTS 49 30 0 1300
29637382 bojverdict2 A Aug. 21, 2017, 7:15 a.m. OK GNU C++11 TESTS 49 30 0 1300
31777416 nobleman A Oct. 27, 2017, 2:25 a.m. OK GNU C++14 TESTS 49 30 0 1300
68644980 Willem A Jan. 12, 2020, 8:46 a.m. OK GNU C++14 TESTS 49 30 0 1300
58348027 Megatron_99 A Aug. 5, 2019, 3:53 p.m. OK GNU C++14 TESTS 49 30 0 1300
55731089 Het262 A June 18, 2019, 9:24 p.m. OK GNU C++14 TESTS 49 30 0 1300
49516008 Pbicem A Feb. 6, 2019, 2:50 a.m. OK GNU C++14 TESTS 49 30 0 1300
39665688 ravi1998 A June 26, 2018, 4:59 a.m. OK GNU C++14 TESTS 49 30 0 1300
32564665 Lng A Nov. 23, 2017, 2:07 a.m. OK GNU C++14 TESTS 49 30 0 1300
32090137 linhcooocaaa A Nov. 6, 2017, 9:03 a.m. OK GNU C++14 TESTS 49 30 0 1300
32055468 MetaBro A Nov. 4, 2017, 2:06 p.m. OK GNU C++14 TESTS 49 30 0 1300
32055404 Ymnik A Nov. 4, 2017, 2:03 p.m. OK GNU C++14 TESTS 49 30 0 1300
57854291 gaddopur_coder A July 27, 2019, 2:24 p.m. OK GNU C++17 TESTS 49 30 0 1300
62338400 vjudge4 A Oct. 11, 2019, 3:19 a.m. OK GNU C++17 TESTS 49 30 0 1300
54988406 AK18 A June 2, 2019, 5:04 p.m. OK GNU C++17 TESTS 49 30 0 1300
38350079 vjudge5 A May 17, 2018, 1:15 p.m. OK GNU C++17 TESTS 49 30 307200 1300
44221770 vjudge1 A Oct. 12, 2018, 5:33 p.m. OK GNU C++17 TESTS 49 30 409600 1300
36153980 vjudge2 A March 10, 2018, 2:52 p.m. OK GNU C++17 TESTS 49 30 1945600 1300
36153947 math.rodrigues A March 10, 2018, 2:51 p.m. OK GNU C++17 TESTS 49 30 1945600 1300
61556756 vjudge3 A Sept. 30, 2019, 2:16 p.m. OK GNU C++17 TESTS 49 60 0 1300
64129608 vjudge4 A Nov. 3, 2019, 6:22 a.m. OK GNU C++17 TESTS 49 60 0 1300
59098120 raj1307 A Aug. 19, 2019, 2:58 p.m. OK GNU C++17 TESTS 49 60 0 1300
41822171 vjudge1 A Aug. 19, 2018, 10:09 a.m. OK GNU C++17 Diagnostics TESTS 49 1746 2252800 1300
41820762 vjudge4 A Aug. 19, 2018, 9:28 a.m. OK GNU C++17 Diagnostics TESTS 49 1902 1331200 1300
8074167 arnoldjulians A Oct. 4, 2014, 4:34 a.m. OK Go TESTS 49 30 102400 1300
8181819 leux A Oct. 12, 2014, 9:33 a.m. OK Go TESTS 49 62 0 1300
38896531 vjudge3 A June 2, 2018, 3:27 p.m. OK Go TESTS 49 62 24576000 1300
1738166 DimsFromDergachy A May 29, 2012, 5:20 a.m. OK Haskell TESTS 49 30 2150400 1300
1671725 mkut A May 10, 2012, 4:39 a.m. OK Haskell TESTS 49 30 2150400 1300
1668344 ray040123 A May 7, 2012, 7:25 p.m. OK Haskell TESTS 49 30 2150400 1300
1661209 cojna A May 4, 2012, 5:48 p.m. OK Haskell TESTS 49 30 2150400 1300
1653917 Rotsor A May 4, 2012, 3:43 p.m. OK Haskell TESTS 49 30 2150400 1300
69543735 30818 A Jan. 25, 2020, 11:56 p.m. OK Java 11 TESTS 49 404 0 1300
2756419 DiegoAE A Dec. 13, 2012, 3:40 a.m. OK Java 6 TESTS 49 78 0 1300
2575688 Mostafa.Ali A Nov. 16, 2012, 8:50 p.m. OK Java 6 TESTS 49 78 0 1300
2297453 yano0oyan A Oct. 4, 2012, 2:38 a.m. OK Java 6 TESTS 49 78 0 1300
1662273 Shersh A May 4, 2012, 7:16 p.m. OK Java 6 TESTS 49 80 43110400 1300
1652807 Egor A May 4, 2012, 3:34 p.m. OK Java 6 TESTS 49 80 43110400 1300
1654272 ArtemKadeev A May 4, 2012, 3:47 p.m. OK Java 6 TESTS 49 80 43315200 1300
1661227 dalex A May 4, 2012, 5:49 p.m. OK Java 6 TESTS 49 80 43622400 1300
1668576 ravelo1991 A May 8, 2012, 2:25 a.m. OK Java 6 TESTS 49 90 43110400 1300
1662180 Venom A May 4, 2012, 6:54 p.m. OK Java 6 TESTS 49 90 43110400 1300
1660943 chavit A May 4, 2012, 5:42 p.m. OK Java 6 TESTS 49 90 43110400 1300
1654826 qwerty787788 A May 4, 2012, 3:54 p.m. OK Java 7 TESTS 49 80 44851200 1300
1748505 originalFussywheat A May 31, 2012, 7:35 p.m. OK Java 7 TESTS 49 90 44851200 1300
1671352 vohra.hardik A May 9, 2012, 5:46 p.m. OK Java 7 TESTS 49 90 44851200 1300
1655814 Di735 A May 4, 2012, 4:07 p.m. OK Java 7 TESTS 49 90 44851200 1300
1653300 yaro A May 4, 2012, 3:38 p.m. OK Java 7 TESTS 49 90 44851200 1300
1652911 tanzaku A May 4, 2012, 3:35 p.m. OK Java 7 TESTS 49 90 44851200 1300
1654335 Slamur A May 4, 2012, 3:48 p.m. OK Java 7 TESTS 49 90 45260800 1300
1653748 alexey.enkov A May 4, 2012, 3:42 p.m. OK Java 7 TESTS 49 90 45260800 1300
1666360 bidzilya A May 6, 2012, 11:03 a.m. OK Java 7 TESTS 49 110 44851200 1300
1653662 yarrr A May 4, 2012, 3:41 p.m. OK Java 7 TESTS 49 110 44851200 1300
14766371 vjudge5 A Dec. 11, 2015, 9:24 p.m. OK Java 8 TESTS 49 186 0 1300
14766372 kingdaniyal A Dec. 11, 2015, 9:24 p.m. OK Java 8 TESTS 49 216 0 1300
46234478 vktennis A Nov. 26, 2018, 12:34 a.m. OK Java 8 TESTS 49 218 0 1300
45315714 guptautkarsh028 A Nov. 5, 2018, 7:54 a.m. OK Java 8 TESTS 49 218 0 1300
45222541 K_B_C_S A Nov. 2, 2018, 10:54 p.m. OK Java 8 TESTS 49 218 0 1300
27717316 unequitedscript A June 11, 2017, 8:15 a.m. OK Java 8 TESTS 49 218 0 1300
27070798 Omar_Morsi A May 13, 2017, 7:45 a.m. OK Java 8 TESTS 49 218 0 1300
14307863 MdKamil A Nov. 17, 2015, 5:05 a.m. OK Java 8 TESTS 49 218 0 1300
13878610 Code.coding A Oct. 26, 2015, 7:30 p.m. OK Java 8 TESTS 49 218 0 1300
12469445 YoussefYN A Aug. 11, 2015, 5:08 p.m. OK Java 8 TESTS 49 218 0 1300
1653725 it4.kp A May 4, 2012, 3:42 p.m. OK Mono C# TESTS 49 140 11776000 1300
13345744 og.kostya A Oct. 2, 2015, 3:28 p.m. OK MS C# TESTS 49 92 204800 1300
10828636 sicon54 A April 22, 2015, 8:43 p.m. OK MS C# TESTS 49 124 8704000 1300
1654539 Nicolai_Kovrov A May 4, 2012, 3:51 p.m. OK MS C++ TESTS 49 10 1433600 1300
3468929 serglag A April 3, 2013, 12:50 p.m. OK MS C++ TESTS 49 15 0 1300
3262081 Miron95 A March 7, 2013, 11:57 a.m. OK MS C++ TESTS 49 15 0 1300
3851384 M.Mahdi A June 9, 2013, 4:22 p.m. OK MS C++ TESTS 49 15 0 1300
3557412 tomas.svab A April 17, 2013, 4:53 p.m. OK MS C++ TESTS 49 15 0 1300
4040422 Mosyagin A July 8, 2013, 10:20 p.m. OK MS C++ TESTS 49 15 0 1300
3639544 nightwolf212 A April 27, 2013, 6:59 a.m. OK MS C++ TESTS 49 15 204800 1300
38414678 vjudge2 A May 19, 2018, 2:29 a.m. OK MS C++ TESTS 49 30 0 1300
29637769 bojverdict1 A Aug. 21, 2017, 7:37 a.m. OK MS C++ TESTS 49 30 0 1300
19297742 zhuangjx A July 21, 2016, 8:43 a.m. OK MS C++ TESTS 49 30 0 1300
59090922 vjudge5 A Aug. 19, 2019, 12:44 p.m. OK MS C++ 2017 TESTS 49 62 0 1300
61397755 vjudge5 A Sept. 28, 2019, 3:25 a.m. OK MS C++ 2017 TESTS 49 62 0 1300
59085689 dylan_bw A Aug. 19, 2019, 10:58 a.m. OK MS C++ 2017 TESTS 49 62 0 1300
57595375 CtrlAlt A July 23, 2019, 1:45 p.m. OK MS C++ 2017 TESTS 49 62 0 1300
65234825 vjudge5 A Nov. 17, 2019, 6:47 a.m. OK MS C++ 2017 TESTS 49 62 307200 1300
51759233 Krs A March 23, 2019, 12:59 p.m. OK MS C++ 2017 TESTS 49 92 0 1300
1653357 alexey.shchepin A May 4, 2012, 3:38 p.m. OK Ocaml TESTS 49 30 2662400 1300
1766340 Basement_Cat A June 5, 2012, 5 p.m. OK Perl TESTS 49 90 3379200 1300
33869176 Noureldin A Jan. 2, 2018, 4:29 p.m. OK PyPy 2 TESTS 49 124 21196800 1300
56234721 andiso A June 28, 2019, 3:42 p.m. OK PyPy 2 TESTS 49 248 0 1300
48909149 vjudge3 A Jan. 25, 2019, 12:01 a.m. OK PyPy 2 TESTS 49 280 0 1300
55852333 Banra123 A June 21, 2019, 4:50 a.m. OK PyPy 3 TESTS 49 278 0 1300
49200565 vjudge1 A Jan. 30, 2019, 12:16 p.m. OK PyPy 3 TESTS 49 280 0 1300
62525842 kchau A Oct. 13, 2019, 5:19 p.m. OK PyPy 3 TESTS 49 280 0 1300
49202655 vjudge2 A Jan. 30, 2019, 12:57 p.m. OK PyPy 3 TESTS 49 280 0 1300
67284729 manish.17 A Dec. 20, 2019, 2 p.m. OK PyPy 3 TESTS 49 340 0 1300
55285354 fakhoury A June 8, 2019, 4:29 a.m. OK PyPy 3 TESTS 49 404 0 1300
4144733 yangboy A July 24, 2013, 5:57 a.m. OK Python 2 TESTS 49 46 0 1300
1700257 ai9128429340875 A May 17, 2012, 10:51 p.m. OK Python 2 TESTS 49 60 2867200 1300
1689330 tmiyamon A May 15, 2012, 4:07 p.m. OK Python 2 TESTS 49 60 2867200 1300
1672378 drbitboy A May 10, 2012, 2:05 p.m. OK Python 2 TESTS 49 60 2867200 1300
1672370 rayafjyblue A May 10, 2012, 2:03 p.m. OK Python 2 TESTS 49 60 2867200 1300
1669489 loothur A May 8, 2012, 3:34 p.m. OK Python 2 TESTS 49 60 2867200 1300
1667938 kterry A May 7, 2012, 1:42 p.m. OK Python 2 TESTS 49 60 2867200 1300
1667176 mehmetemre A May 6, 2012, 10:28 p.m. OK Python 2 TESTS 49 60 2867200 1300
1654404 ray040123 A May 4, 2012, 3:49 p.m. OK Python 2 TESTS 49 60 2867200 1300
1654152 Jonasz A May 4, 2012, 3:46 p.m. OK Python 2 TESTS 49 60 2867200 1300
5342176 yugle7 A Dec. 3, 2013, 12:05 p.m. OK Python 3 TESTS 49 92 0 1300
9819637 poikniok A Feb. 13, 2015, 6:48 p.m. OK Python 3 TESTS 49 122 0 1300
25185209 YazanRi A March 3, 2017, 6:56 p.m. OK Python 3 TESTS 49 122 4608000 1300
12800366 PPTGamer A Sept. 1, 2015, 10:56 a.m. OK Python 3 TESTS 49 124 0 1300
9621052 desperado123 A Jan. 30, 2015, 12:40 a.m. OK Python 3 TESTS 49 124 0 1300
9502939 dimiter A Jan. 22, 2015, 2:16 p.m. OK Python 3 TESTS 49 124 0 1300
9482404 anthonyhkf A Jan. 20, 2015, 7:47 a.m. OK Python 3 TESTS 49 124 0 1300
9302281 manhhomienbienthuy A Dec. 30, 2014, 2:54 a.m. OK Python 3 TESTS 49 124 0 1300
5342974 yugle7 A Dec. 3, 2013, 2:04 p.m. OK Python 3 TESTS 49 124 0 1300
28866105 jcmartinez31 A July 25, 2017, 5:21 a.m. OK Python 3 TESTS 49 124 4608000 1300
1663522 july A May 5, 2012, 9:14 a.m. OK Ruby TESTS 49 110 5632000 1300
1664040 ymatsux A May 5, 2012, 11:59 a.m. OK Scala TESTS 49 270 43724800 1300

remove filters

Back to search problems