Codeforces Round 325 (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
585 Codeforces Round 325 (Div. 1) FINISHED False 7200 331764623 Oct. 12, 2015, 9:10 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1062 ) C Alice, Bob, Oranges and Apples PROGRAMMING number theory 2400

Alice and Bob decided to eat some fruit. In the kitchen they found a large bag of oranges and apples. Alice immediately took an orange for herself, Bob took an apple. To make the process of sharing the remaining fruit more fun, the friends decided to play a game. They put multiple cards and on each one they wrote a letter, either ' A ', or the letter ' B '. Then they began to remove the cards one by one from left to right, every time they removed a card with the letter ' A ', Alice gave Bob all the fruits she had at that moment and took out of the bag as many apples and as many oranges as she had before. Thus the number of oranges and apples Alice had, did not change. If the card had written letter ' B ', then Bob did the same, that is, he gave Alice all the fruit that he had, and took from the bag the same set of fruit. After the last card way removed, all the fruit in the bag were over. You know how many oranges and apples was in the bag at first. Your task is to find any sequence of cards that Alice and Bob could have played with. The first line of the input contains two integers, x , y ( 1 ≤ x , y ≤ 10 18 , xy > 1 ) — the number of oranges and apples that were initially in the bag. Print any sequence of cards that would meet the problem conditions as a compressed string of characters ' A ' and ' B . That means that you need to replace the segments of identical consecutive characters by the number of repetitions of the characters and the actual character. For example, string AAABAABBB should be replaced by string 3A1B2A3B , but cannot be replaced by 2A1A1B2A3B or by 3AB2A3B . See the samples for clarifications of the output format. The string that you print should consist of at most 10 6 characters. It is guaranteed that if the answer exists, its compressed representation exists, consisting of at most 10 6 characters. If there are several possible answers, you are allowed to print any of them. If the sequence of cards that meet the problem statement doe

Tutorials

Разбор Codeforces Round #325

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
13587602 ruban C Oct. 13, 2015, 5:50 a.m. OK Delphi TESTS 54 31 144384000 2400
19443762 saharshluthra C July 27, 2016, 2:14 p.m. OK GNU C++ TESTS 54 15 0 2400
19217649 Andrew_Makar C July 18, 2016, 5:45 p.m. OK GNU C++ TESTS 54 15 0 2400
16270170 alex20030190 C Feb. 22, 2016, 2:37 a.m. OK GNU C++ TESTS 54 15 0 2400
15968348 RNS3 C Feb. 12, 2016, 9:12 a.m. OK GNU C++ TESTS 54 15 0 2400
15169630 Ultimate_Black C Jan. 3, 2016, 2:50 p.m. OK GNU C++ TESTS 54 15 0 2400
15169597 vjudge5 C Jan. 3, 2016, 2:47 p.m. OK GNU C++ TESTS 54 15 0 2400
15169583 Ultimate_Black C Jan. 3, 2016, 2:46 p.m. OK GNU C++ TESTS 54 15 0 2400
15150194 vjudge5 C Jan. 1, 2016, 4:25 p.m. OK GNU C++ TESTS 54 15 0 2400
15142195 HappyNewYearMike C Dec. 31, 2015, 10:12 p.m. OK GNU C++ TESTS 54 15 0 2400
26974912 vjudge4 C May 9, 2017, 1:43 p.m. OK GNU C++ TESTS 54 15 0 2400
61090451 rainboy C Sept. 22, 2019, 9 p.m. OK GNU C11 TESTS 54 31 1024000 2400
19216962 Trumen C July 18, 2016, 4:57 p.m. OK GNU C++11 TESTS 54 15 0 2400
18635790 yarak C June 21, 2016, 7:39 p.m. OK GNU C++11 TESTS 54 15 0 2400
18620485 Maestro_ C June 20, 2016, 8:07 p.m. OK GNU C++11 TESTS 54 15 0 2400
18588110 SherifWaly C June 18, 2016, 11:04 p.m. OK GNU C++11 TESTS 54 15 0 2400
21813952 Duxar C Oct. 27, 2016, 7:18 a.m. OK GNU C++11 TESTS 54 15 0 2400
16724385 Arpa C March 15, 2016, 7:44 a.m. OK GNU C++11 TESTS 54 15 0 2400
16403262 ybh1998 lzr010506 DK-Thirtyseventh C Feb. 28, 2016, 12:46 p.m. OK GNU C++11 TESTS 54 15 0 2400
15602390 suchir C Jan. 26, 2016, 10:23 p.m. OK GNU C++11 TESTS 54 15 0 2400
15446058 OB.Zhou C Jan. 20, 2016, 2:34 a.m. OK GNU C++11 TESTS 54 15 0 2400
16778173 chitanda C March 18, 2016, 8:41 a.m. OK GNU C++11 TESTS 54 15 0 2400
32496991 FallDream C Nov. 20, 2017, 11:12 a.m. OK GNU C++14 TESTS 54 15 0 2400
39340314 Toxel C June 17, 2018, 4:56 p.m. OK GNU C++14 TESTS 54 15 0 2400
31030775 andwho C Oct. 5, 2017, 11:36 a.m. OK GNU C++14 TESTS 54 15 0 2400
30831366 saeed_odak C Sept. 29, 2017, 1:56 p.m. OK GNU C++14 TESTS 54 15 0 2400
27362384 please_delete_account C May 26, 2017, 7:02 p.m. OK GNU C++14 TESTS 54 15 0 2400
26973037 vjudge5 C May 9, 2017, 11:55 a.m. OK GNU C++14 TESTS 54 15 0 2400
35610504 born2rule C Feb. 23, 2018, 10:02 p.m. OK GNU C++14 TESTS 54 15 1945600 2400
35867548 Marckess C March 3, 2018, 3:43 a.m. OK GNU C++14 TESTS 54 15 1945600 2400
34571069 RUSH_D_CAT C Jan. 26, 2018, 9:27 a.m. OK GNU C++14 TESTS 54 15 1945600 2400
36300598 bojverdict1 C March 15, 2018, 1:05 p.m. OK GNU C++14 TESTS 54 15 1945600 2400
60689637 Phortox C Sept. 16, 2019, 4:48 p.m. OK GNU C++17 TESTS 54 31 0 2400
58249196 CQXYM C Aug. 4, 2019, 7:01 a.m. OK GNU C++17 TESTS 54 31 0 2400
55954462 89264270823 C June 23, 2019, 6:01 a.m. OK GNU C++17 TESTS 54 31 0 2400
54096360 vjudge1 C May 14, 2019, 1:14 p.m. OK GNU C++17 TESTS 54 31 0 2400
47017030 heno239 C Dec. 14, 2018, 7:44 p.m. OK GNU C++17 TESTS 54 31 0 2400
44390963 cxt C Oct. 16, 2018, 8:33 a.m. OK GNU C++17 TESTS 54 31 0 2400
58165011 vjudge3 C Aug. 2, 2019, 8:44 a.m. OK GNU C++17 TESTS 54 31 0 2400
68827796 alexradu04 C Jan. 14, 2020, 8:03 p.m. OK GNU C++17 TESTS 54 31 0 2400
66997637 ruo C Dec. 16, 2019, 3:22 a.m. OK GNU C++17 TESTS 54 31 0 2400
65914419 kostia244 C Nov. 28, 2019, 2:03 p.m. OK GNU C++17 TESTS 54 31 0 2400
14050459 CyberZHG C Nov. 4, 2015, 2:06 a.m. OK Haskell TESTS 54 15 0 2400
14050421 vjudge2 C Nov. 4, 2015, 2 a.m. OK Haskell TESTS 54 15 0 2400
13570730 cvm C Oct. 12, 2015, 10:58 a.m. OK Java 7 TESTS 54 78 0 2400
13570276 alexyz C Oct. 12, 2015, 10:54 a.m. OK Java 7 TESTS 54 78 0 2400
13568106 Slamur C Oct. 12, 2015, 10:34 a.m. OK Java 7 TESTS 54 78 0 2400
14768320 edorundo C Dec. 12, 2015, 2:54 a.m. OK Java 7 TESTS 54 140 0 2400
14363095 stacy992 C Nov. 20, 2015, 4:36 p.m. OK Java 7 TESTS 54 140 0 2400
14320302 mkirsche C Nov. 18, 2015, 3:45 a.m. OK Java 8 TESTS 54 108 0 2400
15854326 foobarbaz1 C Feb. 7, 2016, 9:04 a.m. OK Java 8 TESTS 54 109 0 2400
14299457 jin03002 C Nov. 16, 2015, 2:45 p.m. OK Java 8 TESTS 54 109 0 2400
13598450 triveni C Oct. 13, 2015, 7:12 p.m. OK Java 8 TESTS 54 109 0 2400
13598072 triveni C Oct. 13, 2015, 6:41 p.m. OK Java 8 TESTS 54 109 0 2400
13597488 Infoshoc C Oct. 13, 2015, 5:58 p.m. OK Java 8 TESTS 54 109 0 2400
57600616 dodoBehind C July 23, 2019, 3:38 p.m. OK Java 8 TESTS 54 124 0 2400
16054833 alibaba C Feb. 16, 2016, 11:30 a.m. OK Java 8 TESTS 54 124 0 2400
15868279 foobarbaz1 C Feb. 7, 2016, 10:30 a.m. OK Java 8 TESTS 54 124 0 2400
13614320 marcose18 C Oct. 14, 2015, 7:50 p.m. OK Java 8 TESTS 54 124 0 2400
13625085 vanvector C Oct. 15, 2015, 2:43 p.m. OK MS C# TESTS 54 62 3481600 2400
14211607 NVAL C Nov. 12, 2015, 10:38 a.m. OK MS C++ TESTS 54 15 0 2400
13713195 kirixs C Oct. 18, 2015, 1:18 p.m. OK MS C++ TESTS 54 15 0 2400
13652311 wi_lius C Oct. 15, 2015, 7:53 p.m. OK MS C++ TESTS 54 15 0 2400
13614687 AleksanderBalobanov C Oct. 14, 2015, 8:22 p.m. OK MS C++ TESTS 54 15 0 2400
13607995 Death_Knight_DK C Oct. 14, 2015, 1:43 p.m. OK MS C++ TESTS 54 15 0 2400
13587013 TonySnark C Oct. 13, 2015, 4:50 a.m. OK MS C++ TESTS 54 15 0 2400
13565134 Milanin C Oct. 12, 2015, 10:09 a.m. OK MS C++ TESTS 54 15 0 2400
13608085 Infertom C Oct. 14, 2015, 1:48 p.m. OK MS C++ TESTS 54 30 0 2400
13579317 Carups C Oct. 12, 2015, 4:43 p.m. OK MS C++ TESTS 54 30 0 2400
13577190 Waldis C Oct. 12, 2015, 3:33 p.m. OK MS C++ TESTS 54 30 16076800 2400
13566070 qwer C Oct. 12, 2015, 10:16 a.m. OK PyPy 2 TESTS 54 77 0 2400
65112173 xiaowuc1 C Nov. 15, 2019, 11:52 p.m. OK PyPy 2 TESTS 54 265 8089600 2400
13720945 Licia C Oct. 19, 2015, 2:29 a.m. OK PyPy 3 TESTS 54 108 307200 2400
13588747 XelMed C Oct. 13, 2015, 7:44 a.m. OK PyPy 3 TESTS 54 140 307200 2400
57758689 sonali9 C July 25, 2019, 5:11 p.m. OK PyPy 3 TESTS 54 155 0 2400
13564361 ainu7 C Oct. 12, 2015, 10:03 a.m. OK Python 2 TESTS 54 46 0 2400
13563129 Golovanov399 C Oct. 12, 2015, 9:54 a.m. OK Python 2 TESTS 54 46 0 2400
13571987 Swistakk C Oct. 12, 2015, 11:07 a.m. OK Python 2 TESTS 54 61 0 2400
13626565 wuyouwulv C Oct. 15, 2015, 4:25 p.m. OK Python 2 TESTS 54 62 0 2400
13723881 cyborgtk C Oct. 19, 2015, 8:27 a.m. OK Python 2 TESTS 54 124 5324800 2400
13853931 lazzzis C Oct. 25, 2015, 1:08 p.m. OK Python 3 TESTS 54 46 0 2400
28593669 estelle0500 meeeep C July 16, 2017, 10:26 a.m. OK Python 3 TESTS 54 61 5529600 2400
13854071 lazzzis C Oct. 25, 2015, 1:24 p.m. OK Python 3 TESTS 54 62 0 2400
13581529 Thomas_Ahle C Oct. 12, 2015, 6:29 p.m. OK Python 3 TESTS 54 62 0 2400
35788961 Kalam KMAASZRAA C Feb. 28, 2018, 3:07 p.m. OK Python 3 TESTS 54 62 5632000 2400
42136106 Mk_Python_v1 C Aug. 27, 2018, 12:08 a.m. OK Python 3 TESTS 54 124 0 2400
16259065 cugel C Feb. 21, 2016, 1:04 p.m. OK Python 3 TESTS 54 124 1228800 2400
13723925 pro_ars C Oct. 19, 2015, 8:30 a.m. OK Ruby TESTS 54 109 1536000 2400

remove filters

Back to search problems