Mail.Ru Cup 2018 Round 3

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
1056 Mail.Ru Cup 2018 Round 3 FINISHED False 9000 194361923 Nov. 25, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4266 ) B Divide Candies PROGRAMMING math number theory 1600

B'Arkady and his friends love playing checkers on an n x n field. The rows and the columns of the field are enumerated from 1 to n . The friends have recently won a championship, so Arkady wants to please them with some candies. Remembering an old parable (but not its moral), Arkady wants to give to his friends one set of candies per each cell of the field: the set of candies for cell (i, j) will have exactly (i^2 + j^2) candies of unique type. There are m friends who deserve the present. How many of these n x n sets of candies can be split equally into m parts without cutting a candy into pieces? Note that each set has to be split independently since the types of candies in different sets are different. The only line contains two integers n and m ( 1 <= n <= 10^9 , 1 <= m <= 1000 ) -- the size of the field and the number of parts to split the sets into. Print a single integer -- the number of sets that can be split equally. In the first example, only the set for cell (3, 3) can be split equally ( 3^2 + 3^2 = 18 , which is divisible by m=3 ). In the second example, the sets for the following cells can be divided equally: In the third example, sets in all cells can be divided equally, since m = 1 . '...

Tutorials

Mail.Ru Cup 2018 Round 3 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46215744 ruban B Nov. 25, 2018, 5:15 p.m. OK Delphi TESTS 20 31 86937600 1600
46215167 LeoPro B Nov. 25, 2018, 5:10 p.m. OK FPC TESTS 20 31 0 1600
46222419 EgorShibaev B Nov. 25, 2018, 6:15 p.m. OK FPC TESTS 20 46 1024000 1600
46226056 dahaeehossein B Nov. 25, 2018, 6:51 p.m. OK GNU C11 TESTS 20 15 0 1600
46272477 VivekNannaka B Nov. 27, 2018, 9:09 a.m. OK GNU C11 TESTS 20 15 0 1600
46218273 DedMartyn B Nov. 25, 2018, 5:36 p.m. OK GNU C11 TESTS 20 30 0 1600
46223156 wawac B Nov. 25, 2018, 6:22 p.m. OK GNU C11 TESTS 20 30 0 1600
46217168 akshat_goyal B Nov. 25, 2018, 5:27 p.m. OK GNU C11 TESTS 20 31 0 1600
46220022 Sachin105 B Nov. 25, 2018, 5:52 p.m. OK GNU C11 TESTS 20 31 0 1600
46221721 jasshangoel B Nov. 25, 2018, 6:08 p.m. OK GNU C11 TESTS 20 31 0 1600
46217644 EthanITargaryen B Nov. 25, 2018, 5:31 p.m. OK GNU C11 TESTS 20 31 0 1600
46217708 vikr_182 B Nov. 25, 2018, 5:31 p.m. OK GNU C11 TESTS 20 46 16076800 1600
46238624 arobindo B Nov. 26, 2018, 6:02 a.m. OK GNU C++11 TESTS 20 15 0 1600
46245892 S.A.O_3 B Nov. 26, 2018, 11:23 a.m. OK GNU C++11 TESTS 20 15 0 1600
46344556 WyldeCat B Nov. 28, 2018, 5:25 p.m. OK GNU C++11 TESTS 20 15 0 1600
46236805 more-981630 B Nov. 26, 2018, 3:56 a.m. OK GNU C++11 TESTS 20 15 0 1600
49355827 Ali_ElMasry B Feb. 2, 2019, 11:01 a.m. OK GNU C++11 TESTS 20 15 0 1600
46392409 ACMWGR B Nov. 30, 2018, 6:53 a.m. OK GNU C++11 TESTS 20 15 0 1600
51955514 vjudge2 B March 29, 2019, 1:53 a.m. OK GNU C++11 TESTS 20 15 0 1600
50646500 SayGB B March 1, 2019, 3:53 p.m. OK GNU C++11 TESTS 20 15 0 1600
59196735 vjudge2 B Aug. 21, 2019, 2:08 a.m. OK GNU C++11 TESTS 20 15 0 1600
69802359 duality B Jan. 29, 2020, 11:21 p.m. OK GNU C++11 TESTS 20 15 0 1600
66137603 Surf B Dec. 1, 2019, 12:55 p.m. OK GNU C++14 TESTS 20 15 0 1600
69627452 sahil.kalamkar B Jan. 27, 2020, 4:12 p.m. OK GNU C++14 TESTS 20 15 0 1600
68991716 Rajprasad_dora B Jan. 17, 2020, 3:29 p.m. OK GNU C++14 TESTS 20 15 0 1600
67423034 appleofdiscord B Dec. 22, 2019, 12:26 p.m. OK GNU C++14 TESTS 20 15 0 1600
65057985 mijatolaxd B Nov. 15, 2019, 3:51 p.m. OK GNU C++14 TESTS 20 15 0 1600
64718719 luogu_bot1 B Nov. 12, 2019, 1:26 a.m. OK GNU C++14 TESTS 20 15 0 1600
64718702 vjudge5 B Nov. 12, 2019, 1:25 a.m. OK GNU C++14 TESTS 20 15 0 1600
63122712 amphilyon B Oct. 22, 2019, 11:51 a.m. OK GNU C++14 TESTS 20 15 0 1600
62626027 Strange_Evil B Oct. 15, 2019, 2:05 p.m. OK GNU C++14 TESTS 20 15 0 1600
61318401 Nima1313 B Sept. 26, 2019, 11:49 a.m. OK GNU C++14 TESTS 20 15 0 1600
54876548 rutul204 B May 31, 2019, 12:05 p.m. OK GNU C++17 TESTS 20 15 0 1600
56424908 Patwari26 B July 2, 2019, 9:06 a.m. OK GNU C++17 TESTS 20 15 0 1600
54810742 TheFenrir B May 29, 2019, 4:42 p.m. OK GNU C++17 TESTS 20 15 0 1600
56451644 vjudge2 B July 2, 2019, 11:13 p.m. OK GNU C++17 TESTS 20 15 0 1600
56483838 vjudge4 B July 3, 2019, 5:22 p.m. OK GNU C++17 TESTS 20 15 0 1600
56508090 vjudge2 B July 4, 2019, 9:18 a.m. OK GNU C++17 TESTS 20 15 0 1600
58235533 not_me B Aug. 3, 2019, 7:17 p.m. OK GNU C++17 TESTS 20 15 0 1600
58914723 vjudge4 B Aug. 16, 2019, 2:29 p.m. OK GNU C++17 TESTS 20 15 0 1600
59563194 praveenpathak B Aug. 27, 2019, 9:32 a.m. OK GNU C++17 TESTS 20 15 0 1600
60510547 _Madotsuki_ B Sept. 14, 2019, 2:33 a.m. OK GNU C++17 TESTS 20 15 0 1600
48649106 oserde B Jan. 20, 2019, 7:25 p.m. OK Go TESTS 20 31 0 1600
46216298 life_is_not_bed_of_roses B Nov. 25, 2018, 5:20 p.m. OK Go TESTS 20 46 0 1600
46310226 haskell_brooks_curry B Nov. 28, 2018, 12:44 p.m. OK Haskell TESTS 20 31 8396800 1600
47316257 abhi2601 B Dec. 21, 2018, 3:54 a.m. OK Java 8 TESTS 20 93 0 1600
47230353 xodiac B Dec. 18, 2018, 5:51 p.m. OK Java 8 TESTS 20 93 0 1600
46232081 YahiaBadr B Nov. 25, 2018, 9:32 p.m. OK Java 8 TESTS 20 108 0 1600
54410807 hasan5788 B May 20, 2019, 9:36 a.m. OK Java 8 TESTS 20 108 0 1600
46254569 Kharouba B Nov. 26, 2018, 3:54 p.m. OK Java 8 TESTS 20 108 0 1600
46229467 ViciousCoder B Nov. 25, 2018, 8:05 p.m. OK Java 8 TESTS 20 108 0 1600
46219096 Alex_Gal B Nov. 25, 2018, 5:43 p.m. OK Java 8 TESTS 20 108 0 1600
46218473 YahiaBadr B Nov. 25, 2018, 5:38 p.m. OK Java 8 TESTS 20 108 0 1600
46217454 jenish9599 B Nov. 25, 2018, 5:29 p.m. OK Java 8 TESTS 20 108 0 1600
46214576 habibulka B Nov. 25, 2018, 5:05 p.m. OK Java 8 TESTS 20 108 0 1600
46564069 shaviava B Dec. 3, 2018, 8:38 p.m. OK Kotlin TESTS 20 109 0 1600
46212213 shaviava B Nov. 25, 2018, 4:47 p.m. OK Kotlin TESTS 20 124 0 1600
46213244 alexey.enkov B Nov. 25, 2018, 4:54 p.m. OK Kotlin TESTS 20 140 0 1600
46216677 raynald B Nov. 25, 2018, 5:23 p.m. OK Kotlin TESTS 20 155 102400 1600
46220379 Anastasiya_Andreevna B Nov. 25, 2018, 5:55 p.m. OK Mono C# TESTS 20 46 0 1600
46215271 omikad B Nov. 25, 2018, 5:11 p.m. OK Mono C# TESTS 20 46 0 1600
46214205 eki B Nov. 25, 2018, 5:02 p.m. OK Mono C# TESTS 20 61 0 1600
46214548 Roverandom B Nov. 25, 2018, 5:05 p.m. OK Mono C# TESTS 20 62 3481600 1600
46212633 peregrinus B Nov. 25, 2018, 4:50 p.m. OK Mono C# TESTS 20 62 68812800 1600
46217474 teru B Nov. 25, 2018, 5:29 p.m. OK Mono C# TESTS 20 77 7884800 1600
46261925 ncrec B Nov. 26, 2018, 8:51 p.m. OK MS C++ TESTS 20 30 0 1600
46971871 lxga B Dec. 13, 2018, 2:17 p.m. OK MS C++ TESTS 20 31 0 1600
56618259 vjudge1 B July 6, 2019, 10:46 a.m. OK MS C++ TESTS 20 31 0 1600
53852723 vjudge3 B May 7, 2019, 2:16 p.m. OK MS C++ TESTS 20 31 0 1600
46452208 vjudge1 B Dec. 1, 2018, 4 p.m. OK MS C++ TESTS 20 31 0 1600
46362633 vjudge1 B Nov. 29, 2018, 11:52 a.m. OK MS C++ TESTS 20 31 0 1600
46249058 XDIMANX007 B Nov. 26, 2018, 1:12 p.m. OK MS C++ TESTS 20 31 0 1600
46235539 Houbunsha B Nov. 26, 2018, 2:15 a.m. OK MS C++ TESTS 20 31 0 1600
46220157 LoneFox B Nov. 25, 2018, 5:53 p.m. OK MS C++ TESTS 20 31 0 1600
46218909 solenji B Nov. 25, 2018, 5:41 p.m. OK MS C++ TESTS 20 31 0 1600
69668942 Mad112233 B Jan. 28, 2020, 12:22 p.m. OK MS C++ 2017 TESTS 20 31 0 1600
63115351 pmitkov B Oct. 22, 2019, 9:07 a.m. OK MS C++ 2017 TESTS 20 46 0 1600
46281750 sk0 B Nov. 27, 2018, 1:43 p.m. OK Ocaml TESTS 20 30 0 1600
46215711 katalama B Nov. 25, 2018, 5:14 p.m. OK PHP TESTS 20 124 31027200 1600
46215710 sarthakmanna B Nov. 25, 2018, 5:14 p.m. OK PyPy 2 TESTS 20 124 0 1600
46265294 wangkan2001 B Nov. 27, 2018, 1:43 a.m. OK PyPy 2 TESTS 20 124 204800 1600
46214779 FatherofBenoni B Nov. 25, 2018, 5:07 p.m. OK PyPy 2 TESTS 20 139 0 1600
46214262 sallyyao2001 B Nov. 25, 2018, 5:03 p.m. OK PyPy 2 TESTS 20 139 204800 1600
46222721 supachai_pay B Nov. 25, 2018, 6:18 p.m. OK PyPy 2 TESTS 20 139 307200 1600
46213871 c1729 B Nov. 25, 2018, 5 p.m. OK PyPy 2 TESTS 20 139 614400 1600
46212827 tastymath75025 B Nov. 25, 2018, 4:51 p.m. OK PyPy 2 TESTS 20 140 409600 1600
66073714 xiaowuc1 B Nov. 30, 2019, 9:14 p.m. OK PyPy 2 TESTS 20 140 1536000 1600
46224387 akshay125 B Nov. 25, 2018, 6:34 p.m. OK PyPy 2 TESTS 20 140 5120000 1600
46387358 arman.t B Nov. 30, 2018, 12:57 a.m. OK PyPy 2 TESTS 20 155 409600 1600
46212607 zvv B Nov. 25, 2018, 4:49 p.m. OK PyPy 3 TESTS 20 124 102400 1600
68450093 latter0206 B Jan. 9, 2020, 2:02 p.m. OK PyPy 3 TESTS 20 140 0 1600
46216841 111vad111 B Nov. 25, 2018, 5:24 p.m. OK PyPy 3 TESTS 20 140 0 1600
46237627 omega_alpha B Nov. 26, 2018, 4:56 a.m. OK PyPy 3 TESTS 20 140 204800 1600
46224471 KhTA B Nov. 25, 2018, 6:35 p.m. OK PyPy 3 TESTS 20 140 204800 1600
46219785 coffee_machine B Nov. 25, 2018, 5:49 p.m. OK PyPy 3 TESTS 20 140 204800 1600
46217238 sound_of_silence B Nov. 25, 2018, 5:27 p.m. OK PyPy 3 TESTS 20 140 204800 1600
46214521 eusdima B Nov. 25, 2018, 5:05 p.m. OK PyPy 3 TESTS 20 140 409600 1600
46224241 arikpamnani B Nov. 25, 2018, 6:32 p.m. OK PyPy 3 TESTS 20 140 512000 1600
58549824 plourde27 B Aug. 10, 2019, 7 p.m. OK PyPy 3 TESTS 20 140 2048000 1600
46212040 nwi B Nov. 25, 2018, 4:46 p.m. OK Python 2 TESTS 20 171 0 1600
46231307 Mulx10 B Nov. 25, 2018, 8:58 p.m. OK Python 2 TESTS 20 233 102400 1600
46387353 arman.t B Nov. 30, 2018, 12:56 a.m. OK Python 2 TESTS 20 280 102400 1600
51348232 vjudge4 B March 15, 2019, 7:45 p.m. OK Python 2 TESTS 20 327 0 1600
51348116 akotadi B March 15, 2019, 7:41 p.m. OK Python 2 TESTS 20 343 0 1600
46411895 riz_1_ B Nov. 30, 2018, 5:24 p.m. OK Python 2 TESTS 20 343 0 1600
46264142 aeternalis1 B Nov. 26, 2018, 11:47 p.m. OK Python 2 TESTS 20 420 0 1600
46238496 ashashwat B Nov. 26, 2018, 5:54 a.m. OK Python 2 TESTS 20 420 5324800 1600
46230045 striver_79 B Nov. 25, 2018, 8:17 p.m. OK Python 2 TESTS 20 421 0 1600
46212477 ManasG B Nov. 25, 2018, 4:49 p.m. OK Python 2 TESTS 20 670 8499200 1600
48986781 aakk B Jan. 26, 2019, 12:39 p.m. OK Python 3 TESTS 20 108 0 1600
69647065 nealzane B Jan. 28, 2020, 2:16 a.m. OK Python 3 TESTS 20 109 0 1600
47828608 saku7 B Jan. 2, 2019, 4:02 a.m. OK Python 3 TESTS 20 109 0 1600
46656497 online6731 B Dec. 5, 2018, 4:36 p.m. OK Python 3 TESTS 20 109 0 1600
46342273 LintuStorm B Nov. 28, 2018, 4:44 p.m. OK Python 3 TESTS 20 109 0 1600
46272651 III_Wolverine_III B Nov. 27, 2018, 9:16 a.m. OK Python 3 TESTS 20 109 0 1600
46247675 III_Wolverine_III B Nov. 26, 2018, 12:23 p.m. OK Python 3 TESTS 20 109 0 1600
46213320 r57shell B Nov. 25, 2018, 4:55 p.m. OK Python 3 TESTS 20 109 0 1600
46211656 mstang B Nov. 25, 2018, 4:44 p.m. OK Python 3 TESTS 20 109 0 1600
48593603 kyuna B Jan. 20, 2019, 4:53 a.m. OK Python 3 TESTS 20 124 0 1600
46213212 geckods B Nov. 25, 2018, 4:54 p.m. OK Ruby TESTS 20 187 0 1600
46232741 Leonardone B Nov. 25, 2018, 10:09 p.m. OK Rust TESTS 20 30 0 1600
46430482 ancv1990 B Dec. 1, 2018, 5:13 a.m. OK Rust TESTS 20 31 0 1600
46232831 Leonardone B Nov. 25, 2018, 10:16 p.m. OK Rust TESTS 20 31 0 1600
46232609 Leonardone B Nov. 25, 2018, 10:01 p.m. OK Rust TESTS 20 31 0 1600
46213499 limed B Nov. 25, 2018, 4:56 p.m. OK Scala TESTS 20 498 0 1600

remove filters

Back to search problems