Codeforces Round 432 (Div. 1, based on IndiaHacks Final Round 2017)

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
850 Codeforces Round 432 (Div. 1, based on IndiaHacks Final Round 2017) FINISHED False 9000 227287499 Sept. 4, 2017, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1511 ) C Arpa and a game with Mojtaba PROGRAMMING bitmasks dp games 2400

B'Mojtaba and Arpa are playing a game. They have a list of n numbers in the game. In a player 's turn, he chooses a number pk (where p is a prime number and k is a positive integer) such that pk divides at least one number in the list. For each number in the list divisible by pk, call it x, the player will delete x and add to the list. The player who can not make a valid choice of p and k loses. Mojtaba starts the game and the players alternatively make moves. Determine which one of players will be the winner if both players play optimally. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of elements in the list. The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the elements of the list. If Mojtaba wins, print "Mojtaba", otherwise print "Arpa" (without quotes). You can print each letter in any case (upper or lower). In the first sample test, Mojtaba can 't move. In the second sample test, Mojtaba chooses p xe2 x80 x89= xe2 x80 x8917 and k xe2 x80 x89= xe2 x80 x891, then the list changes to [1, xe2 x80 x891, xe2 x80 x891, xe2 x80 x891]. In the third sample test, if Mojtaba chooses p xe2 x80 x89= xe2 x80 x8917 and k xe2 x80 x89= xe2 x80 x891, then Arpa chooses p xe2 x80 x89= xe2 x80 x8917 and k xe2 x80 x89= xe2 x80 x891 and wins, if Mojtaba chooses p xe2 x80 x89= xe2 x80 x8917 and k xe2 x80 x89= xe2 x80 x892, then Arpa chooses p xe2 x80 x89= xe2 x80 x8917 and k xe2 x80 x89= xe2 x80 x891 and wins. '...

Tutorials

Codeforces Round #432 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
30084309 Gassa C Sept. 4, 2017, 8:25 p.m. OK D TESTS 57 31 4198400 2400
30083732 Gassa C Sept. 4, 2017, 7:56 p.m. OK D TESTS 57 31 4198400 2400
30073923 Gassa C Sept. 4, 2017, 4:12 p.m. OK D TESTS 57 31 4198400 2400
30084742 Gassa C Sept. 4, 2017, 8:49 p.m. OK D TESTS 57 31 4198400 2400
30084578 Gassa C Sept. 4, 2017, 8:39 p.m. OK D TESTS 57 31 4198400 2400
30082370 FalseMirror C Sept. 4, 2017, 7:05 p.m. OK D TESTS 57 62 11878400 2400
30746623 ddfsb C Sept. 26, 2017, 10:04 a.m. OK GNU C++ TESTS 57 15 0 2400
30280421 ToErr C Sept. 12, 2017, 8:07 a.m. OK GNU C++ TESTS 57 15 102400 2400
30268104 massimodong C Sept. 11, 2017, 2:41 p.m. OK GNU C++ TESTS 57 15 102400 2400
30201571 Feeey C Sept. 8, 2017, 11:58 a.m. OK GNU C++ TESTS 57 15 102400 2400
30174066 nhho C Sept. 7, 2017, 6:58 a.m. OK GNU C++ TESTS 57 15 102400 2400
30128495 spiderbatman C Sept. 6, 2017, 10:21 a.m. OK GNU C++ TESTS 57 15 102400 2400
30854776 Lhtie C Sept. 30, 2017, 4:48 a.m. OK GNU C++ TESTS 57 15 102400 2400
30283065 kmyiu C Sept. 12, 2017, 9:56 a.m. OK GNU C++ TESTS 57 15 102400 2400
30327153 peehs_moorhsum C Sept. 14, 2017, 11:52 a.m. OK GNU C++ TESTS 57 15 102400 2400
30120551 __stdcall C Sept. 6, 2017, 1:17 a.m. OK GNU C++ TESTS 57 15 102400 2400
60779886 rainboy C Sept. 18, 2019, 3:53 p.m. OK GNU C11 TESTS 57 62 1024000 2400
30175692 xy961218 C Sept. 7, 2017, 8:12 a.m. OK GNU C++11 TESTS 57 15 102400 2400
30582871 bloodbound C Sept. 21, 2017, 3:13 p.m. OK GNU C++11 TESTS 57 15 102400 2400
30582448 bloodbound C Sept. 21, 2017, 3:11 p.m. OK GNU C++11 TESTS 57 15 102400 2400
30362172 jihoon C Sept. 15, 2017, 11:55 a.m. OK GNU C++11 TESTS 57 15 102400 2400
30329281 sxy_cnyali C Sept. 14, 2017, 1:16 p.m. OK GNU C++11 TESTS 57 15 102400 2400
30324601 Georeth C Sept. 14, 2017, 9:59 a.m. OK GNU C++11 TESTS 57 15 102400 2400
30293268 ericxu0 C Sept. 12, 2017, 6:21 p.m. OK GNU C++11 TESTS 57 15 102400 2400
30225539 PlayfulPanda C Sept. 9, 2017, 12:34 p.m. OK GNU C++11 TESTS 57 15 102400 2400
30219457 Arpa C Sept. 9, 2017, 7:12 a.m. OK GNU C++11 TESTS 57 15 102400 2400
30179262 garuna C Sept. 7, 2017, 11:15 a.m. OK GNU C++11 TESTS 57 15 102400 2400
30954256 Mjgonzales C Oct. 2, 2017, 10:22 p.m. OK GNU C++14 TESTS 57 15 204800 2400
31856940 tanishka_1997 C Oct. 29, 2017, 5:51 a.m. OK GNU C++14 TESTS 57 15 204800 2400
31185838 sincerity C Oct. 10, 2017, 9:42 a.m. OK GNU C++14 TESTS 57 15 204800 2400
30994855 Stupid_cdd C Oct. 4, 2017, 2:44 p.m. OK GNU C++14 TESTS 57 15 204800 2400
30975728 KarlFreecss C Oct. 3, 2017, 6:32 p.m. OK GNU C++14 TESTS 57 15 204800 2400
30954402 Mohinem C Oct. 2, 2017, 10:41 p.m. OK GNU C++14 TESTS 57 15 204800 2400
30851157 longNH.IT17 C Sept. 29, 2017, 11:08 p.m. OK GNU C++14 TESTS 57 15 204800 2400
30809183 ShakuganSky C Sept. 28, 2017, 3:29 p.m. OK GNU C++14 TESTS 57 15 204800 2400
30566509 regmsif C Sept. 21, 2017, 3:52 a.m. OK GNU C++14 TESTS 57 15 204800 2400
30529796 Daniar C Sept. 19, 2017, 9:32 p.m. OK GNU C++14 TESTS 57 15 204800 2400
54808709 ZhihuiLiu C May 29, 2019, 3:36 p.m. OK GNU C++17 TESTS 57 30 204800 2400
36794632 vjudge4 C April 1, 2018, 9:56 a.m. OK GNU C++17 TESTS 57 30 3584000 2400
68624892 hmjudge0 C Jan. 11, 2020, 9:02 p.m. OK GNU C++17 TESTS 57 31 204800 2400
68624884 hmjudge0 C Jan. 11, 2020, 9:02 p.m. OK GNU C++17 TESTS 57 31 204800 2400
68457544 icecuber C Jan. 9, 2020, 4:49 p.m. OK GNU C++17 TESTS 57 31 204800 2400
60658321 chuducanhchy C Sept. 16, 2019, 2:21 a.m. OK GNU C++17 TESTS 57 31 204800 2400
58388016 tfg C Aug. 6, 2019, 12:41 p.m. OK GNU C++17 TESTS 57 31 204800 2400
56254160 cheetose C June 29, 2019, 5:20 a.m. OK GNU C++17 TESTS 57 31 204800 2400
69518845 SGHD C Jan. 25, 2020, 12:50 p.m. OK GNU C++17 TESTS 57 31 204800 2400
69442205 ffern C Jan. 23, 2020, 10:41 p.m. OK GNU C++17 TESTS 57 31 204800 2400
30084983 tbuzzelli C Sept. 4, 2017, 9:04 p.m. OK Java 8 TESTS 57 124 0 2400
30209351 alexyz C Sept. 8, 2017, 5:46 p.m. OK Java 8 TESTS 57 139 0 2400
30085365 ebaalhuis C Sept. 4, 2017, 9:35 p.m. OK Java 8 TESTS 57 140 0 2400
30336133 RP_9 C Sept. 14, 2017, 6:19 p.m. OK Java 8 TESTS 57 140 0 2400
30082449 pitfall C Sept. 4, 2017, 7:07 p.m. OK Java 8 TESTS 57 140 0 2400
30081238 mmaxio C Sept. 4, 2017, 6:41 p.m. OK Java 8 TESTS 57 140 0 2400
30085383 ebaalhuis C Sept. 4, 2017, 9:37 p.m. OK Java 8 TESTS 57 155 0 2400
60779885 Dukkha C Sept. 18, 2019, 3:53 p.m. OK Java 8 TESTS 57 234 0 2400
30081250 sas4eka C Sept. 4, 2017, 6:41 p.m. OK Java 8 TESTS 57 264 0 2400
32919369 janr C Dec. 4, 2017, 11:40 a.m. OK Java 8 TESTS 57 280 20889600 2400
30087263 riantkb C Sept. 5, 2017, 12:53 a.m. OK Mono C# TESTS 57 108 3174400 2400
30087279 riantkb C Sept. 5, 2017, 12:54 a.m. OK Mono C# TESTS 57 108 3174400 2400
30083042 AleksanderBalobanov C Sept. 4, 2017, 7:28 p.m. OK MS C++ TESTS 57 15 20275200 2400
30116719 natalia C Sept. 5, 2017, 6:56 p.m. OK MS C++ TESTS 57 30 204800 2400
44952243 vjudge3 C Oct. 27, 2018, 12:39 p.m. OK MS C++ TESTS 57 31 102400 2400
30089326 waltz C Sept. 5, 2017, 3:18 a.m. OK MS C++ TESTS 57 62 4403200 2400

remove filters

Back to search problems