Codeforces Round 657 (Div. 2)

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
1379 Codeforces Round 657 (Div. 2) FINISHED False 7200 142203611 July 19, 2020, 9 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12783 ) B Dubious Cyrpto PROGRAMMING binary search brute force math number theory 1500

B'Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer n , he encrypts it in the following way: he picks three integers a , b and c such that l <= q a,b,c <= q r , and then he computes the encrypted value m = n cdot a + b - c . Unfortunately, an adversary intercepted the values l , r and m . Is it possible to recover the original values of a , b and c from this information? More formally, you are asked to find any values of a , b and c such that The first line contains the only integer t ( 1 <= q t <= q 20 ) -- the number of test cases. The following t lines describe one test case each. Each test case consists of three integers l , r and m ( 1 <= q l <= q r <= q 500 ,000 , 1 <= q m <= q 10^{10} ). The numbers are such that the answer to the problem exists. For each test case output three integers a , b and c such that, l <= q a, b, c <= q r and there exists a strictly positive integer n such that n cdot a + b - c = m . It is guaranteed that there is at least one possible solution, and you can output any possible combination if there are multiple solutions. In the first example n = 3 is possible, then n cdot 4 + 6 - 5 = 13 = m . Other possible solutions include: a = 4 , b = 5 , c = 4 (when n = 3 ); a = 5 , b = 4 , c = 6 (when n = 3 ); a = 6 , b = 6 , c = 5 (when n = 2 ); a = 6 , b = 5 , c = 4 (when n = 2 ). In the second example the only possible case is n = 1 : in this case n cdot 2 + 2 - 3 = 1 = m . Note that, n = 0 is not possible, since in that case n is not a strictly positive integer. '...

Tutorials

Codeforces Round #657 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
87328821 ruban B July 19, 2020, 10:30 a.m. OK FPC TESTS 4 46 3481600 1500
87382102 SeongMenJeon B July 19, 2020, 7:37 p.m. OK GNU C11 TESTS 5 15 3686400 1500
87332307 raman0971 B July 19, 2020, 10:39 a.m. OK GNU C11 TESTS 4 15 3686400 1500
87324678 lalith_krg1 B July 19, 2020, 10:21 a.m. OK GNU C11 TESTS 4 31 3686400 1500
87333663 singerl B July 19, 2020, 10:42 a.m. OK GNU C11 TESTS 4 31 3686400 1500
87360767 AjMain129 B July 19, 2020, 2:14 p.m. OK GNU C11 TESTS 4 31 3686400 1500
87308367 divrthor345 B July 19, 2020, 9:47 a.m. OK GNU C11 TESTS 4 31 3686400 1500
87313189 YOK B July 19, 2020, 9:56 a.m. OK GNU C11 TESTS 4 31 3686400 1500
87316712 sai.tharun B July 19, 2020, 10:04 a.m. OK GNU C11 TESTS 4 46 3686400 1500
87360984 AbirChy B July 19, 2020, 2:16 p.m. OK GNU C11 TESTS 4 46 3686400 1500
87314721 hungryNewton B July 19, 2020, 9:59 a.m. OK GNU C11 TESTS 4 46 3686400 1500
87340602 tadshi B July 19, 2020, 10:56 a.m. OK GNU C++11 TESTS 4 15 3891200 1500
87339565 ABIR B July 19, 2020, 10:54 a.m. OK GNU C++11 TESTS 4 15 3891200 1500
87394086 agctXY B July 20, 2020, 2:54 a.m. OK GNU C++11 TESTS 5 15 3891200 1500
87389222 hasanyilmaz B July 19, 2020, 11:50 p.m. OK GNU C++11 TESTS 5 15 3891200 1500
87370953 Lipoicyclic B July 19, 2020, 4:13 p.m. OK GNU C++11 TESTS 4 15 3891200 1500
87365796 jcsxky B July 19, 2020, 3:08 p.m. OK GNU C++11 TESTS 4 15 3891200 1500
87359753 Sanjina_nowshin B July 19, 2020, 2:03 p.m. OK GNU C++11 TESTS 4 15 3891200 1500
87359689 Its_meM B July 19, 2020, 2:02 p.m. OK GNU C++11 TESTS 4 15 3891200 1500
87353320 FYH_SSGSS B July 19, 2020, 12:52 p.m. OK GNU C++11 TESTS 4 15 3891200 1500
87346101 Man_In_Danger B July 19, 2020, 11:45 a.m. OK GNU C++11 TESTS 4 15 3891200 1500
87318000 MoBeau B July 19, 2020, 10:06 a.m. OK GNU C++14 TESTS 4 0 3686400 1500
87393450 WaheguruAnurag B July 20, 2020, 2:38 a.m. OK GNU C++14 TESTS 5 15 3686400 1500
87373598 Subhankar79 B July 19, 2020, 4:56 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87368908 MH_179 B July 19, 2020, 3:46 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87363298 man_of_hope B July 19, 2020, 2:41 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87363090 rehank478 B July 19, 2020, 2:39 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87361165 sayankgp B July 19, 2020, 2:18 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87351234 Sezal0811 B July 19, 2020, 12:32 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87399834 msid78641 B July 20, 2020, 5:27 a.m. OK GNU C++14 TESTS 5 15 3686400 1500
87350758 _Yamraj- B July 19, 2020, 12:27 p.m. OK GNU C++14 TESTS 4 15 3686400 1500
87385412 Jonna_Jinton B July 19, 2020, 9:04 p.m. OK GNU C++17 TESTS 5 15 3686400 1500
87397242 baap100 B July 20, 2020, 4:19 a.m. OK GNU C++17 TESTS 5 15 3686400 1500
87395042 zuiyu B July 20, 2020, 3:19 a.m. OK GNU C++17 TESTS 5 15 3686400 1500
87394398 vjudge3 B July 20, 2020, 3:01 a.m. OK GNU C++17 TESTS 5 15 3686400 1500
87389084 xyzyzl_ B July 19, 2020, 11:41 p.m. OK GNU C++17 TESTS 5 15 3686400 1500
87383486 SlavicG B July 19, 2020, 8:11 p.m. OK GNU C++17 TESTS 5 15 3686400 1500
87381876 div12gau B July 19, 2020, 7:32 p.m. OK GNU C++17 TESTS 5 15 3686400 1500
87381867 vidhi02 B July 19, 2020, 7:32 p.m. OK GNU C++17 TESTS 5 15 3686400 1500
87375543 shivag4321 B July 19, 2020, 5:29 p.m. OK GNU C++17 TESTS 4 15 3686400 1500
87370556 quick_fuse B July 19, 2020, 4:08 p.m. OK GNU C++17 TESTS 4 15 3686400 1500
87321311 fugii B July 19, 2020, 10:13 a.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87324161 smit_37_mist B July 19, 2020, 10:20 a.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87342149 lonelydoomer B July 19, 2020, 10:59 a.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87345868 Anthony_Jakson B July 19, 2020, 11:44 a.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87349145 LethalPuppy B July 19, 2020, 12:12 p.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87356180 zuhn B July 19, 2020, 1:25 p.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87356458 Emilan B July 19, 2020, 1:28 p.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87365465 parampamparam B July 19, 2020, 3:05 p.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87376101 Clu3l3ss B July 19, 2020, 5:39 p.m. OK GNU C++17 (64) TESTS 4 15 4300800 1500
87396800 vatsal_nagelia B July 20, 2020, 4:06 a.m. OK GNU C++17 (64) TESTS 5 15 4300800 1500
87394850 synapse B July 20, 2020, 3:14 a.m. OK Go TESTS 5 46 10649600 1500
87394788 synapse B July 20, 2020, 3:12 a.m. OK Go TESTS 5 61 10649600 1500
87320234 snow_bear_328 B July 19, 2020, 10:11 a.m. OK Go TESTS 4 61 10649600 1500
87331314 Hasker B July 19, 2020, 10:36 a.m. OK Haskell TESTS 4 529 11673600 1500
87328548 cprayer B July 19, 2020, 10:30 a.m. OK Java 11 TESTS 4 186 24576000 1500
87320192 Relief B July 19, 2020, 10:11 a.m. OK Java 11 TESTS 4 187 24576000 1500
87387968 codingIsFun1234 B July 19, 2020, 10:45 p.m. OK Java 11 TESTS 5 187 24883200 1500
87372219 iamgabruh B July 19, 2020, 4:33 p.m. OK Java 11 TESTS 4 202 24883200 1500
87365231 pgupta9830 B July 19, 2020, 3:02 p.m. OK Java 11 TESTS 4 202 24883200 1500
87373075 unicorn-io B July 19, 2020, 4:47 p.m. OK Java 11 TESTS 4 202 24985600 1500
87329387 Tatsuyaaaa B July 19, 2020, 10:32 a.m. OK Java 11 TESTS 4 217 24883200 1500
87393104 jhu123 B July 20, 2020, 2:29 a.m. OK Java 11 TESTS 5 217 25600000 1500
87330518 chris_11 B July 19, 2020, 10:34 a.m. OK Java 11 TESTS 4 218 24883200 1500
87366017 kamesh.joshi B July 19, 2020, 3:11 p.m. OK Java 11 TESTS 4 218 25600000 1500
87381685 vishu03 B July 19, 2020, 7:28 p.m. OK Java 8 TESTS 5 93 20889600 1500
87326303 rreeennnnn B July 19, 2020, 10:25 a.m. OK Java 8 TESTS 4 93 20889600 1500
87323296 JHope B July 19, 2020, 10:18 a.m. OK Java 8 TESTS 4 93 20992000 1500
87346043 adityakaushik99 B July 19, 2020, 11:45 a.m. OK Java 8 TESTS 4 108 20992000 1500
87319968 sizzula B July 19, 2020, 10:10 a.m. OK Java 8 TESTS 4 108 20992000 1500
87352825 4qqqqzzz B July 19, 2020, 12:47 p.m. OK Java 8 TESTS 4 109 20787200 1500
87311769 BNL B July 19, 2020, 9:54 a.m. OK Java 8 TESTS 4 109 20787200 1500
87385861 mareshkau B July 19, 2020, 9:19 p.m. OK Java 8 TESTS 5 109 20889600 1500
87332460 glider.g B July 19, 2020, 10:39 a.m. OK Java 8 TESTS 4 109 20889600 1500
87325744 prem_cse B July 19, 2020, 10:23 a.m. OK Java 8 TESTS 4 109 20889600 1500
87320675 Loremon B July 19, 2020, 10:12 a.m. OK JavaScript TESTS 4 77 7065600 1500
87310616 batkhuyag B July 19, 2020, 9:51 a.m. OK Kotlin TESTS 4 139 22118400 1500
87312834 koper B July 19, 2020, 9:56 a.m. OK Kotlin TESTS 4 155 22118400 1500
87326740 cmplx-xyttmt B July 19, 2020, 10:26 a.m. OK Kotlin TESTS 4 327 22118400 1500
87324233 terry_u16 B July 19, 2020, 10:20 a.m. OK Mono C# TESTS 4 61 8601600 1500
87324125 fiver B July 19, 2020, 10:20 a.m. OK Mono C# TESTS 4 62 222515200 1500
87317798 kuuso B July 19, 2020, 10:06 a.m. OK Mono C# TESTS 4 77 8601600 1500
87314988 hibatibati B July 19, 2020, 10 a.m. OK Mono C# TESTS 4 77 10342400 1500
87353029 osthir B July 19, 2020, 12:49 p.m. OK Mono C# TESTS 4 155 8601600 1500
87324915 r57shell B July 19, 2020, 10:21 a.m. OK MS C++ TESTS 4 31 4096000 1500
87314123 siscon_org B July 19, 2020, 9:58 a.m. OK MS C++ TESTS 4 46 4096000 1500
87319742 godovald B July 19, 2020, 10:10 a.m. OK MS C++ TESTS 4 46 4096000 1500
87327722 violet716 B July 19, 2020, 10:28 a.m. OK MS C++ 2017 TESTS 4 15 3686400 1500
87339977 pjh6792 B July 19, 2020, 10:55 a.m. OK MS C++ 2017 TESTS 4 30 3686400 1500
87375593 grimkel B July 19, 2020, 5:29 p.m. OK MS C++ 2017 TESTS 4 30 3686400 1500
87350689 little_lion B July 19, 2020, 12:26 p.m. OK MS C++ 2017 TESTS 4 31 3686400 1500
87391518 1520193025 B July 20, 2020, 1:43 a.m. OK MS C++ 2017 TESTS 5 31 3686400 1500
87334454 lhs8928 B July 19, 2020, 10:43 a.m. OK MS C++ 2017 TESTS 4 31 3686400 1500
87348436 grey B July 19, 2020, 12:05 p.m. OK MS C++ 2017 TESTS 4 31 3686400 1500
87324747 cleverhero B July 19, 2020, 10:21 a.m. OK MS C++ 2017 TESTS 4 31 3788800 1500
87331884 tygrysek B July 19, 2020, 10:38 a.m. OK MS C++ 2017 TESTS 4 31 19763200 1500
87357990 akulinich B July 19, 2020, 1:44 p.m. OK MS C++ 2017 TESTS 4 46 3686400 1500
87345282 Loremon B July 19, 2020, 11:40 a.m. OK Node.js TESTS 4 62 12492800 1500
87310269 Zhengxu B July 19, 2020, 9:51 a.m. OK PyPy 2 TESTS 4 93 23347200 1500
87333551 Mukundan314 B July 19, 2020, 10:41 a.m. OK PyPy 2 TESTS 4 108 23142400 1500
87311476 MVP B July 19, 2020, 9:53 a.m. OK PyPy 2 TESTS 4 124 23244800 1500
87312334 bazzyadb B July 19, 2020, 9:55 a.m. OK PyPy 2 TESTS 4 124 23244800 1500
87325623 realnimish B July 19, 2020, 10:23 a.m. OK PyPy 2 TESTS 4 124 23859200 1500
87341635 pratikjain226 B July 19, 2020, 10:58 a.m. OK PyPy 2 TESTS 4 124 29184000 1500
87308866 snape_here B July 19, 2020, 9:48 a.m. OK PyPy 2 TESTS 4 233 30617600 1500
87338093 chris-md B July 19, 2020, 10:51 a.m. OK PyPy 2 TESTS 4 249 31641600 1500
87328710 crackcraft B July 19, 2020, 10:30 a.m. OK PyPy 3 TESTS 4 124 20172800 1500
87353398 tusshar B July 19, 2020, 12:53 p.m. OK PyPy 3 TESTS 4 124 21401600 1500
87353057 tusshar B July 19, 2020, 12:50 p.m. OK PyPy 3 TESTS 4 124 21401600 1500
87352443 tusshar B July 19, 2020, 12:44 p.m. OK PyPy 3 TESTS 4 124 21401600 1500
87336633 unknown_2433 B July 19, 2020, 10:48 a.m. OK PyPy 3 TESTS 4 124 21401600 1500
87335067 shubhamkumar27 B July 19, 2020, 10:45 a.m. OK PyPy 3 TESTS 4 124 21401600 1500
87371019 akanksha25 B July 19, 2020, 4:14 p.m. OK PyPy 3 TESTS 4 124 21504000 1500
87384970 bit_2 B July 19, 2020, 8:51 p.m. OK PyPy 3 TESTS 5 139 21401600 1500
87354677 BlackBook9406 B July 19, 2020, 1:07 p.m. OK PyPy 3 TESTS 4 139 21401600 1500
87353630 tusshar B July 19, 2020, 12:55 p.m. OK PyPy 3 TESTS 4 139 21401600 1500
87373906 Ekinak B July 19, 2020, 5 p.m. OK Python 2 TESTS 4 514 41984000 1500
87377661 ajrun666 B July 19, 2020, 6:06 p.m. OK Python 2 TESTS 4 623 14848000 1500
87332503 Naphthalene B July 19, 2020, 10:39 a.m. OK Python 3 TESTS 4 108 6963200 1500
87326640 akar_ B July 19, 2020, 10:26 a.m. OK Python 3 TESTS 4 108 6963200 1500
87373009 badKiam B July 19, 2020, 4:46 p.m. OK Python 3 TESTS 4 155 6963200 1500
87353316 pyaari_pinky B July 19, 2020, 12:52 p.m. OK Python 3 TESTS 4 156 6963200 1500
87350258 pyaari_pinky B July 19, 2020, 12:22 p.m. OK Python 3 TESTS 4 171 6963200 1500
87358628 Towhed80 B July 19, 2020, 1:50 p.m. OK Python 3 TESTS 4 202 6963200 1500
87378443 LintuStorm B July 19, 2020, 6:20 p.m. OK Python 3 TESTS 5 217 6656000 1500
87350106 Vibhu2000 B July 19, 2020, 12:21 p.m. OK Python 3 TESTS 4 218 6963200 1500
87369366 Abhishek128 B July 19, 2020, 3:51 p.m. OK Python 3 TESTS 4 233 6656000 1500
87362152 sel_t B July 19, 2020, 2:28 p.m. OK Python 3 TESTS 4 233 6656000 1500
87355241 komorin95 B July 19, 2020, 1:14 p.m. OK Rust TESTS 4 30 3788800 1500
87335240 rustafarian B July 19, 2020, 10:45 a.m. OK Rust TESTS 4 31 6246400 1500
87323380 fatemender B July 19, 2020, 10:18 a.m. OK Rust TESTS 4 46 3788800 1500
87316658 wweihao.zj B July 19, 2020, 10:04 a.m. OK Rust TESTS 4 61 3788800 1500
87310570 robostac B July 19, 2020, 9:51 a.m. OK Rust TESTS 4 61 3788800 1500
87315872 springroll B July 19, 2020, 10:02 a.m. OK Rust TESTS 4 77 3788800 1500

remove filters

Back to search problems