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 |
---|---|---|---|---|---|---|
1872 | Codeforces Round 895 (Div. 3) | FINISHED | False | 8100 | 43082663 | Sept. 7, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 24056 ) | C | Non-coprime Split | PROGRAMMING | math number theory |
B'You are given two integers l <= r . You need to find positive integers a and b such that the following conditions are simultaneously satisfied: or report that they do not exist. gcd(a, b) denotes the greatest common divisor of numbers a and b . For example, gcd(6, 9) = 3 , gcd(8, 9) = 1 , gcd(4, 2) = 2 . The first line of the input contains an integer t ( 1 <= t <= 500 ) -- the number of test cases. Then the descriptions of the test cases follow. The only line of the description of each test case contains 2 integers l, r ( 1 <= l <= r <= 10^7 ). For each test case, output the integers a, b that satisfy all the conditions on a separate line. If there is no answer, instead output a single number -1 . If there are multiple answers, you can output any of them. In the first test case, 11 <= 6 + 9 <= 15 , gcd(6, 9) = 3 , and all conditions are satisfied. Note that this is not the only possible answer, for example, {4, 10 }, {5, 10 }, {6, 6 } are also valid answers for this test case. In the second test case, the only pairs {a, b } that satisfy the condition 1 <= a + b <= 3 are {1, 1 }, {1, 2 }, {2, 1 } , but in each of these pairs gcd(a, b) equals 1 , so there is no answer. In the third sample test, gcd(14, 4) = 2 . '... |
Codeforces Round 895 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
222368376 | ansergeyg | C | Sept. 7, 2023, 8:21 p.m. | OK | C# 10 | TESTS | 5 | 61 | 409600 | ||
222383546 | bluemegane | C | Sept. 8, 2023, 1:47 a.m. | OK | C# 8 | TESTS | 5 | 109 | 307200 | ||
222383288 | bluemegane | C | Sept. 8, 2023, 1:42 a.m. | OK | C# 8 | TESTS | 5 | 155 | 307200 | ||
222377884 | durduryu | C | Sept. 7, 2023, 11:27 p.m. | OK | Clang++17 Diagnostics | TESTS | 5 | 46 | 0 | ||
222378289 | durduryu | C | Sept. 7, 2023, 11:39 p.m. | OK | Clang++17 Diagnostics | TESTS | 5 | 46 | 0 | ||
222385534 | Redpo | C | Sept. 8, 2023, 2:25 a.m. | OK | Clang++20 Diagnostics | TESTS | 5 | 46 | 0 | ||
222351856 | abhi____123 | C | Sept. 7, 2023, 5:32 p.m. | OK | GNU C11 | TESTS | 5 | 31 | 0 | ||
222374903 | jhmm1905 | C | Sept. 7, 2023, 10:15 p.m. | OK | GNU C11 | TESTS | 5 | 77 | 0 | ||
222370609 | c0derro | C | Sept. 7, 2023, 8:55 p.m. | OK | GNU C11 | TESTS | 5 | 77 | 0 | ||
222347730 | iffatul_anon | C | Sept. 7, 2023, 5:08 p.m. | OK | GNU C11 | TESTS | 5 | 78 | 0 | ||
222356426 | fnn0 | C | Sept. 7, 2023, 6:07 p.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
222364767 | Piyush__23 | C | Sept. 7, 2023, 7:36 p.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
222372002 | Mickeysofine | C | Sept. 7, 2023, 9:20 p.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
222398817 | mingzi123 | C | Sept. 8, 2023, 5:34 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222397025 | efdsa | C | Sept. 8, 2023, 5:09 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222396788 | thakur_17 | C | Sept. 8, 2023, 5:06 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222400936 | cmdevanand8696 | C | Sept. 8, 2023, 5:56 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222400245 | beiwwen | C | Sept. 8, 2023, 5:49 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222399981 | rakshitha123 | C | Sept. 8, 2023, 5:47 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222399473 | lonewolf2609 | C | Sept. 8, 2023, 5:42 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
222374659 | abhishek_the_coder | C | Sept. 7, 2023, 10:09 p.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222370413 | chicken_man | C | Sept. 7, 2023, 8:52 p.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222368983 | partho_03 | C | Sept. 7, 2023, 8:30 p.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222368809 | tikhar | C | Sept. 7, 2023, 8:27 p.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222355860 | e_l_a_h_i | C | Sept. 7, 2023, 6:02 p.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222352825 | aman_here | C | Sept. 7, 2023, 5:39 p.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222386484 | LoveDuck | C | Sept. 8, 2023, 2:42 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222390867 | jowotulen | C | Sept. 8, 2023, 3:56 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222397874 | sudhanshu_21 | C | Sept. 8, 2023, 5:21 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222379475 | applese | C | Sept. 8, 2023, 12:11 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
222388450 | crucal | C | Sept. 8, 2023, 3:16 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
222386632 | Njaso | C | Sept. 8, 2023, 2:45 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
222386343 | Njaso | C | Sept. 8, 2023, 2:39 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
222397458 | ThreeOfHeart | C | Sept. 8, 2023, 5:15 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222398282 | nmd98911 | C | Sept. 8, 2023, 5:27 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222397121 | Higuchi | C | Sept. 8, 2023, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222397084 | rahul_o15 | C | Sept. 8, 2023, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222392534 | ashikaslam | C | Sept. 8, 2023, 4:20 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222391320 | Orthofox | C | Sept. 8, 2023, 4:03 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222388393 | EotUL8d7 | C | Sept. 8, 2023, 3:15 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
222396530 | Ycy0fmine | C | Sept. 8, 2023, 5:02 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222395717 | shinzanmono | C | Sept. 8, 2023, 4:53 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222391233 | tahmidarefin | C | Sept. 8, 2023, 4:01 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222390820 | huyminh | C | Sept. 8, 2023, 3:55 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222390520 | Vijay | C | Sept. 8, 2023, 3:50 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222389868 | S360 | C | Sept. 8, 2023, 3:40 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222396721 | sahadathossain11 | C | Sept. 8, 2023, 5:05 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222397427 | Akimizussq | C | Sept. 8, 2023, 5:15 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222398400 | saikumarailwar9 | C | Sept. 8, 2023, 5:28 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222399417 | Ikuyo | C | Sept. 8, 2023, 5:41 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
222374408 | DedsecKnight | C | Sept. 7, 2023, 10:04 p.m. | OK | Go | TESTS | 5 | 61 | 0 | ||
222398607 | krahul1996 | C | Sept. 8, 2023, 5:31 a.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | ||
222379697 | cwjjbbs | C | Sept. 8, 2023, 12:16 a.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
222370070 | theSSS | C | Sept. 7, 2023, 8:46 p.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
222352628 | vijender_8601 | C | Sept. 7, 2023, 5:38 p.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
222369387 | Daniel112 | C | Sept. 7, 2023, 8:35 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
222348493 | ujjwal_a0001 | C | Sept. 7, 2023, 5:12 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
222351431 | priyanz | C | Sept. 7, 2023, 5:29 p.m. | OK | Java 11 | TESTS | 5 | 217 | 0 | ||
222394684 | vijay21 | C | Sept. 8, 2023, 4:43 a.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
222394405 | vijay21 | C | Sept. 8, 2023, 4:40 a.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
222361723 | niti.chandra007 | C | Sept. 7, 2023, 7 p.m. | OK | Java 11 | TESTS | 5 | 233 | 0 | ||
222379211 | hamossa | C | Sept. 8, 2023, 12:04 a.m. | OK | Java 17 | TESTS | 5 | 171 | 409600 | ||
222352933 | iamdimonis | C | Sept. 7, 2023, 5:40 p.m. | OK | Java 17 | TESTS | 5 | 186 | 0 | ||
222349172 | flicktoss | C | Sept. 7, 2023, 5:15 p.m. | OK | Java 17 | TESTS | 5 | 202 | 307200 | ||
222378083 | TheLastDanceCoder | C | Sept. 7, 2023, 11:32 p.m. | OK | Java 17 | TESTS | 5 | 202 | 409600 | ||
222364406 | rahiljakir | C | Sept. 7, 2023, 7:31 p.m. | OK | Java 17 | TESTS | 5 | 217 | 614400 | ||
222377938 | TheLastDanceCoder | C | Sept. 7, 2023, 11:29 p.m. | OK | Java 17 | TESTS | 5 | 218 | 512000 | ||
222379191 | hamossa | C | Sept. 8, 2023, 12:04 a.m. | OK | Java 17 | TESTS | 5 | 233 | 614400 | ||
222366445 | rahiljakir | C | Sept. 7, 2023, 7:56 p.m. | OK | Java 17 | TESTS | 5 | 248 | 921600 | ||
222379733 | goalboy | C | Sept. 8, 2023, 12:17 a.m. | OK | Java 17 | TESTS | 5 | 248 | 1024000 | ||
222346650 | aquafrost16 | C | Sept. 7, 2023, 5:03 p.m. | OK | Java 17 | TESTS | 5 | 249 | 716800 | ||
222388471 | Tomatos03 | C | Sept. 8, 2023, 3:16 a.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
222379816 | cwjjbbs | C | Sept. 8, 2023, 12:19 a.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
222367563 | gagan_6730 | C | Sept. 7, 2023, 8:11 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
222358417 | Prankishor | C | Sept. 7, 2023, 6:25 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
222351508 | ahmeddragon700 | C | Sept. 7, 2023, 5:30 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
222358047 | Yousef_Badr | C | Sept. 7, 2023, 6:22 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | ||
222398595 | gyani1088 | C | Sept. 8, 2023, 5:31 a.m. | OK | Java 8 | TESTS | 5 | 109 | 0 | ||
222400387 | klsane04 | C | Sept. 8, 2023, 5:51 a.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
222362829 | jitu7033 | C | Sept. 7, 2023, 7:12 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
222362662 | jitu70337 | C | Sept. 7, 2023, 7:10 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
222366388 | Roma_the_king | C | Sept. 7, 2023, 7:56 p.m. | OK | MS C++ 2017 | TESTS | 5 | 0 | 0 | ||
222361015 | ooomm | C | Sept. 7, 2023, 6:51 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 1638400 | ||
222360950 | rukawa0111 | C | Sept. 7, 2023, 6:51 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 1638400 | ||
222375556 | yym1617518805 | C | Sept. 7, 2023, 10:28 p.m. | OK | MS C++ 2017 | TESTS | 5 | 31 | 0 | ||
222358401 | GauravKrOO7 | C | Sept. 7, 2023, 6:25 p.m. | OK | MS C++ 2017 | TESTS | 5 | 31 | 0 | ||
222357046 | kiNkraD | C | Sept. 7, 2023, 6:13 p.m. | OK | MS C++ 2017 | TESTS | 5 | 31 | 0 | ||
222386452 | biltharesatyendra | C | Sept. 8, 2023, 2:41 a.m. | OK | PyPy 2 | TESTS | 5 | 109 | 819200 | ||
222391626 | ezahid1662 | C | Sept. 8, 2023, 4:08 a.m. | OK | PyPy 3 | TESTS | 5 | 93 | 2457600 | ||
222378379 | grente | C | Sept. 7, 2023, 11:41 p.m. | OK | PyPy 3 | TESTS | 5 | 108 | 1945600 | ||
222391486 | satanclaws | C | Sept. 8, 2023, 4:05 a.m. | OK | PyPy 3 | TESTS | 5 | 108 | 2252800 | ||
222369131 | Anupam_1925 | C | Sept. 7, 2023, 8:32 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 2355200 | ||
222349563 | jvatsal0709 | C | Sept. 7, 2023, 5:17 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 3276800 | ||
222357197 | udaypnayar | C | Sept. 7, 2023, 6:14 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 3686400 | ||
222355539 | MShah2003 | C | Sept. 7, 2023, 5:59 p.m. | OK | PyPy 3 | TESTS | 5 | 187 | 3686400 | ||
222392081 | momenelmesady4803 | C | Sept. 8, 2023, 4:14 a.m. | OK | PyPy 3 | TESTS | 5 | 187 | 6860800 | ||
222387196 | stan23456 | C | Sept. 8, 2023, 2:55 a.m. | OK | PyPy 3 | TESTS | 5 | 233 | 5222400 | ||
222362591 | miloud001 | C | Sept. 7, 2023, 7:10 p.m. | OK | PyPy 3 | TESTS | 5 | 327 | 2867200 | ||
222390944 | SapperBeret | C | Sept. 8, 2023, 3:57 a.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 3174400 | ||
222349870 | rmr | C | Sept. 7, 2023, 5:19 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 1740800 | ||
222353930 | Quick-One | C | Sept. 7, 2023, 5:47 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 1843200 | ||
222361519 | sushmanth.dampur8780 | C | Sept. 7, 2023, 6:57 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 1945600 | ||
222386152 | harshk_52 | C | Sept. 8, 2023, 2:36 a.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 2048000 | ||
222377342 | riroan | C | Sept. 7, 2023, 11:13 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 2048000 | ||
222370035 | gardengnome | C | Sept. 7, 2023, 8:46 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 2867200 | ||
222357693 | I_Am_That | C | Sept. 7, 2023, 6:19 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 3686400 | ||
222351206 | TrivialZzy | C | Sept. 7, 2023, 5:28 p.m. | OK | PyPy 3-64 | TESTS | 5 | 78 | 2252800 | ||
222353220 | samliu12 | C | Sept. 7, 2023, 5:42 p.m. | OK | PyPy 3-64 | TESTS | 5 | 92 | 4198400 | ||
222348553 | KawaiiNahida | C | Sept. 7, 2023, 5:12 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
222346967 | arvaybenedek | C | Sept. 7, 2023, 5:05 p.m. | OK | Python 3 | TESTS | 5 | 77 | 0 | ||
222390614 | lmsenavirathne | C | Sept. 8, 2023, 3:52 a.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | ||
222392772 | dsanurag520 | C | Sept. 8, 2023, 4:23 a.m. | OK | Python 3 | TESTS | 5 | 108 | 0 | ||
222351209 | Fahim_foyshal_Demo | C | Sept. 7, 2023, 5:28 p.m. | OK | Python 3 | TESTS | 5 | 108 | 0 | ||
222347839 | ropzrode | C | Sept. 7, 2023, 5:09 p.m. | OK | Python 3 | TESTS | 5 | 108 | 0 | ||
222390459 | nil_zhuang | C | Sept. 8, 2023, 3:49 a.m. | OK | Python 3 | TESTS | 5 | 109 | 0 | ||
222389834 | karthik_605 | C | Sept. 8, 2023, 3:39 a.m. | OK | Python 3 | TESTS | 5 | 109 | 0 | ||
222362796 | sevlll777 | C | Sept. 7, 2023, 7:12 p.m. | OK | Python 3 | TESTS | 5 | 109 | 0 | ||
222350500 | wdllmh | C | Sept. 7, 2023, 5:23 p.m. | OK | Python 3 | TESTS | 5 | 109 | 0 | ||
222359772 | matheusdacach | C | Sept. 7, 2023, 6:38 p.m. | OK | Rust 2021 | TESTS | 5 | 15 | 0 | ||
222374101 | TecTrixer | C | Sept. 7, 2023, 9:58 p.m. | OK | Rust 2021 | TESTS | 5 | 30 | 0 |
Back to search problems