Codeforces Round 324 (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
584 Codeforces Round 324 (Div. 2) FINISHED False 7200 287674199 Oct. 6, 2015, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12042 ) B Kolya and Tanya PROGRAMMING combinatorics 1500

B"Kolya loves putting gnomes at the circle table and giving them coins, and Tanya loves studying triplets of gnomes, sitting in the vertexes of an equilateral triangle. More formally, there are 3n gnomes sitting in a circle. Each gnome can have from 1 to 3 coins. Let's number the places in the order they occur in the circle by numbers from 0 to 3n xe2 x80 x89- xe2 x80 x891, let the gnome sitting on the i-th place have ai coins. If there is an integer i (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89< xe2 x80 x89n) such that ai xe2 x80 x89+ xe2 x80 x89ai xe2 x80 x89+ xe2 x80 x89n xe2 x80 x89+ xe2 x80 x89ai xe2 x80 x89+ xe2 x80 x892n xe2 x80 x89 xe2 x89 xa0 xe2 x80 x896, then Tanya is satisfied. Count the number of ways to choose ai so that Tanya is satisfied. As there can be many ways of distributing coins, print the remainder of this number modulo 109 xe2 x80 x89+ xe2 x80 x897. Two ways, a and b, are considered distinct if there is index i (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89< xe2 x80 x893n), such that ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi (that is, some gnome got different number of coins in these two ways). A single line contains number n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of the gnomes divided by three. Print a single number -- the remainder of the number of variants of distributing coins that satisfy Tanya modulo 109 xe2 x80 x89+ xe2 x80 x897. 20 ways for n xe2 x80 x89= xe2 x80 x891 (gnome with index 0 sits on the top of the triangle, gnome 1 on the right vertex, gnome 2 on the left vertex): "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
59204425 yuanzhoulvpi B Aug. 21, 2019, 6:22 a.m. OK Clang++17 Diagnostics TESTS 42 46 0 1500
32604577 TShT B Nov. 23, 2017, 8:26 p.m. OK FPC TESTS 42 15 1638400 1500
48923190 chaorenhaha B Jan. 25, 2019, 8:55 a.m. OK FPC TESTS 42 31 0 1500
20343844 ice_tea B Sept. 2, 2016, 3:38 p.m. OK FPC TESTS 42 31 0 1500
41511803 LeVanThuc B Aug. 12, 2018, 2:50 a.m. OK FPC TESTS 42 31 0 1500
48923165 chaorenhaha B Jan. 25, 2019, 8:54 a.m. OK FPC TESTS 42 31 204800 1500
31938563 reyad B Nov. 1, 2017, 5:21 a.m. OK GNU C TESTS 42 15 102400 1500
22789753 nitesh_gupta B Dec. 7, 2016, 2:58 p.m. OK GNU C TESTS 42 15 1843200 1500
24947557 Gimape07 B Feb. 23, 2017, 8:07 p.m. OK GNU C TESTS 42 15 1945600 1500
24947639 Gimape07 B Feb. 23, 2017, 8:11 p.m. OK GNU C TESTS 42 15 1945600 1500
18341697 hello-noob B June 9, 2016, 1:02 p.m. OK GNU C TESTS 42 15 2048000 1500
18296159 Rizro B June 8, 2016, 9:56 a.m. OK GNU C TESTS 42 15 2048000 1500
18735587 mananb31 B June 26, 2016, 12:32 p.m. OK GNU C TESTS 42 30 0 1500
23720428 AimpliesJ B Jan. 11, 2017, 2:42 p.m. OK GNU C TESTS 42 30 1843200 1500
20107043 Koshlendra7 B Aug. 24, 2016, 2:06 p.m. OK GNU C TESTS 42 30 1843200 1500
19771646 milk_man B Aug. 10, 2016, 7:03 p.m. OK GNU C TESTS 42 30 1843200 1500
30497715 vjudge5 B Sept. 19, 2017, 12:45 p.m. OK GNU C++ TESTS 42 15 0 1500
32519286 hustpanda B Nov. 21, 2017, 8:11 a.m. OK GNU C++ TESTS 42 15 0 1500
31925323 xracer108 B Oct. 31, 2017, 3:05 p.m. OK GNU C++ TESTS 42 15 0 1500
29708879 xiazeyu B Aug. 23, 2017, 1:45 p.m. OK GNU C++ TESTS 42 15 0 1500
29704823 vjudge3 B Aug. 23, 2017, 10:52 a.m. OK GNU C++ TESTS 42 15 0 1500
29704525 vjudge4 B Aug. 23, 2017, 10:40 a.m. OK GNU C++ TESTS 42 15 0 1500
29700662 vjudge4 B Aug. 23, 2017, 7:41 a.m. OK GNU C++ TESTS 42 15 0 1500
29699414 vjudge1 B Aug. 23, 2017, 6:38 a.m. OK GNU C++ TESTS 42 15 0 1500
29698990 vjudge3 B Aug. 23, 2017, 6:17 a.m. OK GNU C++ TESTS 42 15 0 1500
29620359 mollyaaa B Aug. 20, 2017, 12:06 p.m. OK GNU C++ TESTS 42 15 0 1500
66653823 kaiboy B Dec. 11, 2019, 8:49 p.m. OK GNU C11 TESTS 42 30 0 1500
69685880 Mikhail___ B Jan. 28, 2020, 4:58 p.m. OK GNU C11 TESTS 42 31 0 1500
40095051 LudwigVanBeethoven B July 8, 2018, 8:56 p.m. OK GNU C11 TESTS 42 31 0 1500
18385604 srijansingh B June 12, 2016, 7:06 a.m. OK GNU C11 TESTS 42 31 2048000 1500
66653987 kaiboy B Dec. 11, 2019, 8:55 p.m. OK GNU C11 TESTS 42 31 9625600 1500
32518736 Lych4o_ B Nov. 21, 2017, 7:41 a.m. OK GNU C++11 TESTS 42 15 0 1500
32518766 Lych4o_ B Nov. 21, 2017, 7:42 a.m. OK GNU C++11 TESTS 42 15 0 1500
32510443 MohamedLotfy B Nov. 20, 2017, 8:19 p.m. OK GNU C++11 TESTS 42 15 0 1500
32205492 TUGAAAA B Nov. 10, 2017, 8:30 p.m. OK GNU C++11 TESTS 42 15 0 1500
32196383 ilikebarryallen B Nov. 10, 2017, 1:28 p.m. OK GNU C++11 TESTS 42 15 0 1500
31901092 nondeterministicDecider B Oct. 30, 2017, 5:24 p.m. OK GNU C++11 TESTS 42 15 0 1500
31242266 Prabodh B Oct. 12, 2017, 1:35 p.m. OK GNU C++11 TESTS 42 15 0 1500
31174707 Rezwan.Arefin01 B Oct. 9, 2017, 6:08 p.m. OK GNU C++11 TESTS 42 15 0 1500
30693923 slongle B Sept. 25, 2017, 2:46 a.m. OK GNU C++11 TESTS 42 15 0 1500
30047874 teej B Sept. 4, 2017, 6:29 a.m. OK GNU C++11 TESTS 42 15 0 1500
69434282 prajjwal07 B Jan. 23, 2020, 6:22 p.m. OK GNU C++14 TESTS 42 15 0 1500
56496059 vjudge3 B July 4, 2019, 2:59 a.m. OK GNU C++14 TESTS 42 15 0 1500
55813467 f2016941 B June 20, 2019, 5:17 a.m. OK GNU C++14 TESTS 42 15 0 1500
53888208 quid_ditch B May 8, 2019, 8:14 p.m. OK GNU C++14 TESTS 42 15 0 1500
51610737 Xarr B March 21, 2019, 10:12 a.m. OK GNU C++14 TESTS 42 15 0 1500
57555180 fuboki99 B July 22, 2019, 7:18 p.m. OK GNU C++14 TESTS 42 15 0 1500
69548461 s_e_s B Jan. 26, 2020, 5:01 a.m. OK GNU C++14 TESTS 42 15 0 1500
58482539 bojverdict2 B Aug. 9, 2019, 6:17 a.m. OK GNU C++14 TESTS 42 15 0 1500
59681314 ali2020ali B Aug. 29, 2019, 8:49 p.m. OK GNU C++14 TESTS 42 15 0 1500
68131409 the_ellusionist7 B Jan. 3, 2020, 5:09 p.m. OK GNU C++14 TESTS 42 15 0 1500
53993570 frankost2 B May 11, 2019, 1:25 p.m. OK GNU C++17 TESTS 42 15 0 1500
39773843 aniket9465 B June 29, 2018, 4:23 p.m. OK GNU C++17 TESTS 42 15 0 1500
39670947 alavrov B June 26, 2018, 9:11 a.m. OK GNU C++17 TESTS 42 15 0 1500
40749927 dickynovanto1103 B July 25, 2018, 5:03 p.m. OK GNU C++17 TESTS 42 15 0 1500
68142398 duccling B Jan. 4, 2020, 12:18 a.m. OK GNU C++17 TESTS 42 15 0 1500
66881747 ruo B Dec. 14, 2019, 4:48 p.m. OK GNU C++17 TESTS 42 15 0 1500
66322182 kotamanegi B Dec. 5, 2019, 2:29 p.m. OK GNU C++17 TESTS 42 15 0 1500
61332474 Vankuken B Sept. 26, 2019, 3:25 p.m. OK GNU C++17 TESTS 42 15 0 1500
48532961 vjudge5 B Jan. 18, 2019, 12:54 p.m. OK GNU C++17 TESTS 42 15 204800 1500
50234371 andnyu B Feb. 20, 2019, 10:01 a.m. OK GNU C++17 TESTS 42 15 1638400 1500
34203356 _Abhishek_ B Jan. 15, 2018, 5:29 p.m. OK GNU C++17 Diagnostics TESTS 42 811 100147200 1500
27116262 yuliang B May 15, 2017, 6:06 a.m. OK Go TESTS 42 15 18022400 1500
23991833 goC B Jan. 20, 2017, 3:01 p.m. OK Go TESTS 42 46 24268800 1500
23929433 ItsLastDay B Jan. 18, 2017, 6:49 p.m. OK Haskell TESTS 42 30 53248000 1500
19193359 manikmanshu B July 17, 2016, 4:35 p.m. OK Java 7 TESTS 42 108 0 1500
18591999 harshitbhut14 B June 19, 2016, 6:25 a.m. OK Java 7 TESTS 42 109 0 1500
18134480 frktry B May 28, 2016, 4:37 p.m. OK Java 7 TESTS 42 140 39321600 1500
18580931 anuj64 B June 18, 2016, 2:10 p.m. OK Java 7 TESTS 42 638 0 1500
27107892 IDzekh B May 14, 2017, 2:04 p.m. OK Java 8 TESTS 42 108 0 1500
55224166 the41 B June 6, 2019, 10:49 p.m. OK Java 8 TESTS 42 109 0 1500
64702308 an09mous B Nov. 11, 2019, 3:14 p.m. OK Java 8 TESTS 42 109 0 1500
55230549 abhi2601 B June 7, 2019, 5:20 a.m. OK Java 8 TESTS 42 109 0 1500
46006568 viratK B Nov. 20, 2018, 5:18 p.m. OK Java 8 TESTS 42 109 0 1500
45166893 AhmedSoliman B Nov. 1, 2018, 11:26 a.m. OK Java 8 TESTS 42 109 0 1500
31274186 donder B Oct. 13, 2017, 12:31 p.m. OK Java 8 TESTS 42 109 0 1500
31230239 IntueorDaniel B Oct. 12, 2017, 1:32 a.m. OK Java 8 TESTS 42 109 0 1500
29917293 chojh1222 B Aug. 30, 2017, 12:38 p.m. OK Java 8 TESTS 42 109 0 1500
27116437 sanketmakani B May 15, 2017, 6:24 a.m. OK Java 8 TESTS 42 109 0 1500
59350738 Knight-errant B Aug. 23, 2019, 11:41 a.m. OK Kotlin TESTS 42 233 0 1500
44512200 nemars B Oct. 18, 2018, 5:47 p.m. OK Mono C# TESTS 42 46 0 1500
68037219 mban259 B Jan. 1, 2020, 12:40 p.m. OK Mono C# TESTS 42 46 0 1500
54250072 speed439 B May 16, 2019, 4:46 p.m. OK Mono C# TESTS 42 61 0 1500
44512554 nemars B Oct. 18, 2018, 5:51 p.m. OK Mono C# TESTS 42 62 102400 1500
59350380 alexagapov B Aug. 23, 2019, 11:33 a.m. OK Mono C# TESTS 42 312 409600 1500
24803752 lionvs13 B Feb. 19, 2017, 2:05 p.m. OK MS C# TESTS 42 61 8908800 1500
19484860 vjudge3 B July 29, 2016, 3:15 p.m. OK MS C++ TESTS 42 15 0 1500
19485831 vjudge4 B July 29, 2016, 3:20 p.m. OK MS C++ TESTS 42 15 0 1500
20766785 jzwang B Sept. 20, 2016, 1:21 a.m. OK MS C++ TESTS 42 15 0 1500
27307648 Capitan B May 23, 2017, 7:29 p.m. OK MS C++ TESTS 42 15 204800 1500
25171955 nik1998 B March 3, 2017, 1:39 p.m. OK MS C++ TESTS 42 15 1945600 1500
28598731 green_damn B July 16, 2017, 2:57 p.m. OK MS C++ TESTS 42 15 2048000 1500
26712014 zscoder95 B April 28, 2017, 2:36 a.m. OK MS C++ TESTS 42 15 2048000 1500
34297571 vjudge5 B Jan. 19, 2018, 9:10 a.m. OK MS C++ TESTS 42 15 2048000 1500
34296626 vjudge5 B Jan. 19, 2018, 8:28 a.m. OK MS C++ TESTS 42 15 2048000 1500
34293078 vjudge4 B Jan. 19, 2018, 6 a.m. OK MS C++ TESTS 42 15 2048000 1500
66154131 ahmedo42 B Dec. 1, 2019, 8:51 p.m. OK MS C++ 2017 TESTS 42 31 0 1500
58064335 felix412441 B July 31, 2019, 8:27 a.m. OK MS C++ 2017 TESTS 42 31 0 1500
59538689 r.y B Aug. 26, 2019, 5:58 p.m. OK MS C++ 2017 TESTS 42 31 0 1500
58512318 CtrlAlt B Aug. 9, 2019, 7:49 p.m. OK MS C++ 2017 TESTS 42 31 1638400 1500
59649173 vjudge2 B Aug. 29, 2019, 7:24 a.m. OK MS C++ 2017 TESTS 42 46 0 1500
52806615 lichunyu0212 B April 16, 2019, 5:14 a.m. OK MS C++ 2017 TESTS 42 46 0 1500
66278692 anazmy14 B Dec. 4, 2019, 4:15 p.m. OK MS C++ 2017 TESTS 42 46 307200 1500
39276716 aeternalis1 B June 16, 2018, 12:45 a.m. OK PyPy 2 TESTS 42 93 0 1500
38152448 thyannararug B May 13, 2018, 5:03 a.m. OK PyPy 2 TESTS 42 93 22835200 1500
43020809 brennoflorencio B Sept. 18, 2018, 4:39 a.m. OK PyPy 2 TESTS 42 124 0 1500
42875924 daniel.carlos B Sept. 15, 2018, 12:28 a.m. OK PyPy 2 TESTS 42 124 0 1500
42846694 daniel.carlos B Sept. 14, 2018, 12:43 a.m. OK PyPy 2 TESTS 42 124 0 1500
68465076 beethoven97 B Jan. 9, 2020, 7:52 p.m. OK PyPy 2 TESTS 42 124 204800 1500
19311758 jvmafra B July 22, 2016, 2:22 a.m. OK PyPy 2 TESTS 42 124 921600 1500
25209776 Unlenin B March 4, 2017, 11:40 a.m. OK PyPy 2 TESTS 42 124 22835200 1500
17984910 boombastic B May 18, 2016, 8:06 p.m. OK PyPy 2 TESTS 42 124 23347200 1500
18762020 Yash_ B June 28, 2016, 4:52 a.m. OK PyPy 2 TESTS 42 139 921600 1500
68351413 Pro100Yan B Jan. 7, 2020, 10:02 a.m. OK PyPy 3 TESTS 42 139 0 1500
69492537 alex_rangi B Jan. 25, 2020, 12:04 a.m. OK PyPy 3 TESTS 42 140 0 1500
69248035 SummerPark B Jan. 21, 2020, 1:29 p.m. OK PyPy 3 TESTS 42 140 0 1500
67439008 ram_bharose_jindgi_bitao B Dec. 22, 2019, 6:26 p.m. OK PyPy 3 TESTS 42 140 0 1500
65220581 NullOne B Nov. 16, 2019, 8:38 p.m. OK PyPy 3 TESTS 42 140 0 1500
63064131 RedRanger B Oct. 21, 2019, 10:06 a.m. OK PyPy 3 TESTS 42 140 0 1500
46760750 jfelipe B Dec. 8, 2018, 1:20 p.m. OK PyPy 3 TESTS 42 140 0 1500
42954888 jfelipe B Sept. 16, 2018, 3:45 p.m. OK PyPy 3 TESTS 42 140 0 1500
58512500 XOR-star B Aug. 9, 2019, 7:56 p.m. OK PyPy 3 TESTS 42 140 1331200 1500
60144049 MagedMaher7 B Sept. 5, 2019, 10:08 p.m. OK PyPy 3 TESTS 42 140 1433600 1500
22191260 pr4j B Nov. 13, 2016, 11:03 a.m. OK Python 2 TESTS 42 62 0 1500
33355770 laoliumang B Dec. 17, 2017, 2:20 p.m. OK Python 2 TESTS 42 62 4608000 1500
22655521 vjudge5 B Dec. 2, 2016, 10:16 a.m. OK Python 2 TESTS 42 78 0 1500
19285284 claramm B July 20, 2016, 5:27 p.m. OK Python 2 TESTS 42 93 409600 1500
19386794 mateuslunacc B July 24, 2016, 4:02 p.m. OK Python 2 TESTS 42 93 614400 1500
25065025 peetttiiii B Feb. 26, 2017, 9:13 p.m. OK Python 2 TESTS 42 93 5120000 1500
24554259 pratcodes B Feb. 9, 2017, 4:59 p.m. OK Python 2 TESTS 42 93 5120000 1500
23797609 singh.ece5040 B Jan. 14, 2017, 4:54 a.m. OK Python 2 TESTS 42 93 5120000 1500
29357857 khalednabil B Aug. 11, 2017, 4:28 p.m. OK Python 2 TESTS 42 93 5222400 1500
38152371 GabrielN B May 13, 2018, 4:56 a.m. OK Python 2 TESTS 42 93 6041600 1500
25488247 felipe17 B March 15, 2017, 1:51 a.m. OK Python 3 TESTS 42 62 4608000 1500
17920286 vjudge4 B May 15, 2016, 1:22 p.m. OK Python 3 TESTS 42 62 4915200 1500
34428350 burakbugrul B Jan. 22, 2018, 1:19 a.m. OK Python 3 TESTS 42 62 5632000 1500
31902666 montacir B Oct. 30, 2017, 6:27 p.m. OK Python 3 TESTS 42 77 0 1500
30185908 montacir B Sept. 7, 2017, 4:20 p.m. OK Python 3 TESTS 42 77 102400 1500
38202645 DavdG B May 13, 2018, 11:48 p.m. OK Python 3 TESTS 42 78 7065600 1500
36464112 Slsvcn B March 21, 2018, 8:24 p.m. OK Python 3 TESTS 42 78 7065600 1500
19599750 hypomaniac B Aug. 3, 2016, 2:28 p.m. OK Python 3 TESTS 42 93 0 1500
23675412 stevegregg B Jan. 10, 2017, 6:04 a.m. OK Python 3 TESTS 42 93 4608000 1500
38006214 abrunoaa B May 7, 2018, 8 p.m. OK Python 3 TESTS 42 93 7065600 1500
18648775 redchrom B June 22, 2016, 3:23 p.m. OK Ruby TESTS 42 78 0 1500

remove filters

Back to search problems