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 |
---|---|---|---|---|---|---|
1543 | Codeforces Round 730 (Div. 2) | FINISHED | False | 8100 | 106154699 | July 7, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 28693 ) | A | Exciting Bets | PROGRAMMING | greedy math number theory |
B"Welcome to Rockport City! It is time for your first ever race in the game against Ronnie. To make the race interesting, you have bet a dollars and Ronnie has bet b dollars. But the fans seem to be disappointed. The excitement of the fans is given by gcd(a,b) , where gcd(x, y) denotes the greatest common divisor (GCD) of integers x and y . To make the race more exciting, you can perform two types of operations: In one move, you can perform any one of these operations. You can perform arbitrary (possibly zero) number of moves. Determine the maximum excitement the fans can get and the minimum number of moves required to achieve it. Note that gcd(x,0)=x for any x ge 0 . The first line of input contains a single integer t ( 1 <= q t <= q 5 cdot 10^3 ) -- the number of test cases. The first and the only line of each test case contains two integers a and b ( 0 <= q a, b <= q 10^{18} ). For each test case, print a single line containing two integers. If the fans can get infinite excitement, print 0 0. Otherwise, the first integer must be the maximum excitement the fans can get, and the second integer must be the minimum number of moves required to achieve that excitement. For the first test case, you can apply the first operation 1 time to get a=9 and b=6 . It can be shown that 3 is the maximum excitement possible. For the second test case, no matter how many operations you apply, the fans will always have an excitement equal to 1 . Since the initial excitement is also 1 , you don't need to apply any operation. For the third case, the fans can get infinite excitement by applying the first operation an infinite amount of times. For the fourth test case, you can apply the second operation 3 times to get a=0 and b=6 . Since, gcd(0,6)=6 , the fans will get an excitement of 6 . "... |
Codeforces Round #730 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
121676289 | patil98varad | A | July 8, 2021, 3:13 a.m. | OK | GNU C11 | TESTS | 10 | 31 | 0 | ||
121684106 | __rahul005 | A | July 8, 2021, 5:20 a.m. | OK | GNU C11 | TESTS | 10 | 46 | 0 | ||
121648080 | son_of_a_dentist | A | July 7, 2021, 4:48 p.m. | OK | GNU C11 | TESTS | 10 | 46 | 0 | ||
121674676 | abhinandank626 | A | July 8, 2021, 2:44 a.m. | OK | GNU C11 | TESTS | 10 | 46 | 0 | ||
121642809 | boolean_life | A | July 7, 2021, 4:37 p.m. | OK | GNU C11 | TESTS | 10 | 61 | 0 | ||
121681871 | siddu2001 | A | July 8, 2021, 4:50 a.m. | OK | GNU C11 | TESTS | 10 | 62 | 0 | ||
121642796 | AESTRIX | A | July 7, 2021, 4:37 p.m. | OK | GNU C11 | TESTS | 10 | 62 | 0 | ||
121642597 | ThursdayLoser | A | July 7, 2021, 4:36 p.m. | OK | GNU C11 | TESTS | 10 | 78 | 0 | ||
121653989 | Momo_zzz | A | July 7, 2021, 6:28 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
121671096 | minhnhat21012005 | A | July 8, 2021, 1:22 a.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
121669666 | zrr12138 | A | July 8, 2021, 12:36 a.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
121670471 | PIL_grim07 | A | July 8, 2021, 1:04 a.m. | OK | GNU C++11 | TESTS | 10 | 15 | 1024000 | ||
121671714 | never_stop_rating | A | July 8, 2021, 1:37 a.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | ||
121670837 | yiwangzhifeng | A | July 8, 2021, 1:15 a.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | ||
121677010 | XY_cpp | A | July 8, 2021, 3:27 a.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | ||
121673165 | xqbf | A | July 8, 2021, 2:11 a.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | ||
121672251 | gnored | A | July 8, 2021, 1:50 a.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | ||
121672239 | grass8cow | A | July 8, 2021, 1:49 a.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | ||
121674018 | Demon-Slayer | A | July 8, 2021, 2:29 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121672429 | john9925 | A | July 8, 2021, 1:54 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121682579 | chongyatu | A | July 8, 2021, 5 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121682723 | mohit_ahirwar | A | July 8, 2021, 5:02 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121684466 | shadow.matter | A | July 8, 2021, 5:24 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121686693 | bkifhr6 | A | July 8, 2021, 5:51 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121682341 | yxy2222 | A | July 8, 2021, 4:56 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121681508 | SuperJ6 | A | July 8, 2021, 4:44 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121678769 | jasonlin1222 | A | July 8, 2021, 3:57 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121677792 | ss_fb | A | July 8, 2021, 3:40 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
121684078 | rathod0045 | A | July 8, 2021, 5:20 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121687240 | lsjy | A | July 8, 2021, 5:57 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121686313 | GCMango | A | July 8, 2021, 5:47 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121685320 | jaimehta | A | July 8, 2021, 5:35 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121684695 | Shivam_2611 | A | July 8, 2021, 5:27 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121684247 | saivignesh_adepu | A | July 8, 2021, 5:22 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121683582 | dibyanshu47 | A | July 8, 2021, 5:14 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121683407 | pranay7 | A | July 8, 2021, 5:11 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121682959 | danielcm5583 | A | July 8, 2021, 5:05 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121682333 | Aditya_Gujrati | A | July 8, 2021, 4:56 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
121681368 | Kalesh | A | July 8, 2021, 4:42 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121681267 | MMMim | A | July 8, 2021, 4:40 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121682915 | uraniumcentipede | A | July 8, 2021, 5:04 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121683633 | avinash_89 | A | July 8, 2021, 5:14 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121685532 | red_09 | A | July 8, 2021, 5:38 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121685570 | mips | A | July 8, 2021, 5:38 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121685572 | Eccentric_9 | A | July 8, 2021, 5:38 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121685662 | Divya_Patel | A | July 8, 2021, 5:39 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121686881 | PaliLo | A | July 8, 2021, 5:53 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121687192 | _Qrcode_ | A | July 8, 2021, 5:56 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
121656364 | mihau | A | July 7, 2021, 6:49 p.m. | OK | Go | TESTS | 10 | 685 | 0 | ||
121661094 | kareemabdelrhmane | A | July 7, 2021, 8 p.m. | OK | Java 11 | TESTS | 10 | 202 | 0 | ||
121681971 | geek-kalpeshk | A | July 8, 2021, 4:51 a.m. | OK | Java 11 | TESTS | 10 | 217 | 0 | ||
121662587 | adarsh_goku | A | July 7, 2021, 8:29 p.m. | OK | Java 11 | TESTS | 10 | 218 | 0 | ||
121680125 | RuthlessAggression | A | July 8, 2021, 4:21 a.m. | OK | Java 11 | TESTS | 10 | 218 | 0 | ||
121653760 | MubtasimShahriar | A | July 7, 2021, 6:26 p.m. | OK | Java 11 | TESTS | 10 | 218 | 0 | ||
121655826 | _merlin_ | A | July 7, 2021, 6:44 p.m. | OK | Java 11 | TESTS | 10 | 233 | 0 | ||
121665446 | jamesfan961101 | A | July 7, 2021, 9:45 p.m. | OK | Java 11 | TESTS | 10 | 249 | 102400 | ||
121670621 | mitulgarg | A | July 8, 2021, 1:08 a.m. | OK | Java 11 | TESTS | 10 | 264 | 0 | ||
121687693 | Rachitkumar | A | July 8, 2021, 6:02 a.m. | OK | Java 11 | TESTS | 10 | 280 | 0 | ||
121680232 | RahulJangir | A | July 8, 2021, 4:23 a.m. | OK | Java 11 | TESTS | 10 | 280 | 0 | ||
121676445 | slow.coder | A | July 8, 2021, 3:16 a.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
121673575 | yuzui | A | July 8, 2021, 2:21 a.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
121665554 | dev_14 | A | July 7, 2021, 9:48 p.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
121653615 | athu18 | A | July 7, 2021, 6:25 p.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
121659940 | gagan_6730 | A | July 7, 2021, 7:39 p.m. | OK | Java 8 | TESTS | 10 | 139 | 0 | ||
121682453 | manan_0104 | A | July 8, 2021, 4:58 a.m. | OK | Java 8 | TESTS | 10 | 140 | 0 | ||
121665986 | Zicko-77 | A | July 7, 2021, 10:03 p.m. | OK | Java 8 | TESTS | 10 | 140 | 0 | ||
121685892 | C_P_T_N | A | July 8, 2021, 5:42 a.m. | OK | Java 8 | TESTS | 10 | 155 | 0 | ||
121680458 | pribic | A | July 8, 2021, 4:27 a.m. | OK | Java 8 | TESTS | 10 | 155 | 0 | ||
121669075 | amit_roy | A | July 8, 2021, 12:14 a.m. | OK | Java 8 | TESTS | 10 | 155 | 0 | ||
121676522 | Spheniscine | A | July 8, 2021, 3:18 a.m. | OK | Kotlin | TESTS | 10 | 124 | 0 | ||
121667340 | SlavaG | A | July 7, 2021, 10:55 p.m. | OK | Kotlin | TESTS | 10 | 202 | 716800 | ||
121685012 | Kartik_V_Divate | A | July 8, 2021, 5:31 a.m. | OK | MS C++ | TESTS | 10 | 61 | 0 | ||
121685253 | Kartik_V_Divate | A | July 8, 2021, 5:34 a.m. | OK | MS C++ | TESTS | 10 | 62 | 0 | ||
121669382 | RibbonDragon | A | July 8, 2021, 12:25 a.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 0 | ||
121672982 | jrhmq | A | July 8, 2021, 2:07 a.m. | OK | MS C++ 2017 | TESTS | 10 | 30 | 0 | ||
121672076 | swz | A | July 8, 2021, 1:46 a.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 0 | ||
121672093 | swz | A | July 8, 2021, 1:46 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
121672060 | swz | A | July 8, 2021, 1:46 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
121670299 | inferno_ | A | July 8, 2021, 12:59 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
121667697 | ZTFeng | A | July 7, 2021, 11:10 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
121664431 | simpissa | A | July 7, 2021, 9:12 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
121653525 | Tangerine | A | July 7, 2021, 6:24 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
121662264 | Baobab0304 | A | July 7, 2021, 8:22 p.m. | OK | MS C++ 2017 | TESTS | 10 | 61 | 0 | ||
121685517 | Devansh1309 | A | July 8, 2021, 5:37 a.m. | OK | PyPy 3 | TESTS | 10 | 171 | 5120000 | ||
121686818 | kirito18086 | A | July 8, 2021, 5:52 a.m. | OK | PyPy 3 | TESTS | 10 | 171 | 5529600 | ||
121676948 | AdvithDesu | A | July 8, 2021, 3:26 a.m. | OK | PyPy 3 | TESTS | 10 | 202 | 6860800 | ||
121676731 | Terryobeyes | A | July 8, 2021, 3:21 a.m. | OK | PyPy 3 | TESTS | 10 | 217 | 7987200 | ||
121667727 | light_yagami52 | A | July 7, 2021, 11:11 p.m. | OK | PyPy 3 | TESTS | 10 | 217 | 8806400 | ||
121669351 | majay1638 | A | July 8, 2021, 12:24 a.m. | OK | PyPy 3 | TESTS | 10 | 218 | 9420800 | ||
121680259 | ksd_3 | A | July 8, 2021, 4:23 a.m. | OK | PyPy 3 | TESTS | 10 | 265 | 9523200 | ||
121677197 | ksd_3 | A | July 8, 2021, 3:30 a.m. | OK | PyPy 3 | TESTS | 10 | 295 | 9625600 | ||
121680024 | ksd_3 | A | July 8, 2021, 4:19 a.m. | OK | PyPy 3 | TESTS | 10 | 295 | 10342400 | ||
121683075 | vjudge2 | A | July 8, 2021, 5:07 a.m. | OK | PyPy 3 | TESTS | 10 | 296 | 9420800 | ||
121666460 | mrwiredancer | A | July 7, 2021, 10:19 p.m. | OK | Python 3 | TESTS | 10 | 62 | 716800 | ||
121676308 | arvind.iyer.2001 | A | July 8, 2021, 3:14 a.m. | OK | Python 3 | TESTS | 10 | 77 | 204800 | ||
121667179 | radoan.sharkar.richi | A | July 7, 2021, 10:49 p.m. | OK | Python 3 | TESTS | 10 | 77 | 307200 | ||
121652304 | phamxuanhien15 | A | July 7, 2021, 6:17 p.m. | OK | Python 3 | TESTS | 10 | 78 | 307200 | ||
121684489 | jainil4801 | A | July 8, 2021, 5:24 a.m. | OK | Python 3 | TESTS | 10 | 92 | 409600 | ||
121672436 | jeongdongha | A | July 8, 2021, 1:54 a.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
121674832 | megs15 | A | July 8, 2021, 2:47 a.m. | OK | Python 3 | TESTS | 10 | 108 | 0 | ||
121686346 | Tejasri53 | A | July 8, 2021, 5:47 a.m. | OK | Python 3 | TESTS | 10 | 109 | 0 | ||
121681723 | ZYZi | A | July 8, 2021, 4:47 a.m. | OK | Python 3 | TESTS | 10 | 109 | 0 | ||
121674980 | ritesh_43 | A | July 8, 2021, 2:49 a.m. | OK | Python 3 | TESTS | 10 | 109 | 0 | ||
121656712 | IvanDyachenko | A | July 7, 2021, 6:53 p.m. | OK | Scala | TESTS | 10 | 951 | 0 |
Back to search problems