Codeforces Round 734 (Div. 3)

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
1551 Codeforces Round 734 (Div. 3) FINISHED False 7200 104772299 July 23, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 51452 ) A Polycarp and Coins PROGRAMMING math #(624A)

B'Polycarp must pay exactly n burles at the checkout. He has coins of two nominal values: 1 burle and 2 burles. Polycarp likes both kinds of coins equally. So he doesn 't want to pay with more coins of one type than with the other. Thus, Polycarp wants to minimize the difference between the count of coins of 1 burle and 2 burles being used. Help him by determining two non-negative integer values c_1 and c_2 which are the number of coins of 1 burle and 2 burles, respectively, so that the total value of that number of coins is exactly n (i. xe2 x80 x89e. c_1 + 2 cdot c_2 = n ), and the absolute value of the difference between c_1 and c_2 is as little as possible (i. xe2 x80 x89e. you must minimize |c_1-c_2| ). The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then t test cases follow. Each test case consists of one line. This line contains one integer n ( 1 <= n <= 10^9 ) -- the number of burles to be paid by Polycarp. For each test case, output a separate line containing two integers c_1 and c_2 ( c_1, c_2 ge 0 ) separated by a space where c_1 is the number of coins of 1 burle and c_2 is the number of coins of 2 burles. If there are multiple optimal solutions, print any one. The answer for the first test case is "334 333". The sum of the nominal values of all coins is 334 cdot 1 + 333 cdot 2 = 1000 , whereas |334 - 333| = 1 . One can 't get the better value because if |c_1 - c_2| = 0 , then c_1 = c_2 and c_1 cdot 1 + c_1 cdot 2 = 1000 , but then the value of c_1 isn 't an integer. The answer for the second test case is "10 10". The sum of the nominal values is 10 cdot 1 + 10 cdot 2 = 30 and |10 - 10| = 0 , whereas there 's no number having an absolute value less than 0 . '...

Tutorials

Editorial for Codeforces Round #734 (Div.3)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
123556970 ssvb A July 24, 2021, 12:50 a.m. OK D TESTS 2 15 3686400
123543553 satvik777 A July 23, 2021, 7:11 p.m. OK GNU C11 TESTS 2 31 3686400
123533381 Marsflat A July 23, 2021, 5:07 p.m. OK GNU C11 TESTS 2 46 3686400
123541090 sandbad A July 23, 2021, 6:37 p.m. OK GNU C11 TESTS 2 46 3686400
123561339 pritishcf307 A July 24, 2021, 2:28 a.m. OK GNU C11 TESTS 2 46 3686400
123568623 abdur52 A July 24, 2021, 4:33 a.m. OK GNU C11 TESTS 2 46 3686400
123572211 souravrax A July 24, 2021, 5:32 a.m. OK GNU C11 TESTS 5 46 3686400
123525852 _anshalprasad A July 23, 2021, 4:31 p.m. OK GNU C11 TESTS 2 46 3686400
123527467 Kulido A July 23, 2021, 4:34 p.m. OK GNU C11 TESTS 2 46 3686400
123525312 LuongVanMinh A July 23, 2021, 4:31 p.m. OK GNU C11 TESTS 2 46 3686400
123540223 6945752024PhucLX A July 23, 2021, 6:26 p.m. OK GNU C11 TESTS 2 61 3686400
123559588 _Sunrise A July 24, 2021, 1:53 a.m. OK GNU C++11 TESTS 2 0 3891200
123556867 I_do_not_know A July 24, 2021, 12:46 a.m. OK GNU C++11 TESTS 2 15 3686400
123556818 Miniqwq A July 24, 2021, 12:45 a.m. OK GNU C++11 TESTS 2 15 3686400
123556031 pride123 A July 24, 2021, 12:14 a.m. OK GNU C++11 TESTS 2 15 3686400
123565975 PsephurusGladius A July 24, 2021, 3:46 a.m. OK GNU C++11 TESTS 2 15 3686400
123564794 Aehnuwx A July 24, 2021, 3:28 a.m. OK GNU C++11 TESTS 2 15 3686400
123561966 luogu_bot2 A July 24, 2021, 2:40 a.m. OK GNU C++11 TESTS 2 15 3686400
123561067 Harry_jzr A July 24, 2021, 2:23 a.m. OK GNU C++11 TESTS 2 15 3686400
123558115 excellent123 A July 24, 2021, 1:20 a.m. OK GNU C++11 TESTS 2 15 3686400
123557280 NXYorz A July 24, 2021, 1 a.m. OK GNU C++11 TESTS 2 15 3686400
123536333 Archit47 A July 23, 2021, 5:37 p.m. OK GNU C++14 TESTS 2 0 3686400
123538122 Shivang27 A July 23, 2021, 6 p.m. OK GNU C++14 TESTS 2 0 3686400
123555212 FedoretsVadim A July 23, 2021, 11:38 p.m. OK GNU C++14 TESTS 2 0 3686400
123536286 mokshith002 A July 23, 2021, 5:37 p.m. OK GNU C++14 TESTS 2 0 3686400
123567337 tetat A July 24, 2021, 4:10 a.m. OK GNU C++14 TESTS 2 0 3788800
123564962 milind_iet A July 24, 2021, 3:31 a.m. OK GNU C++14 TESTS 2 15 3686400
123569141 dheeraj_kumar75 A July 24, 2021, 4:42 a.m. OK GNU C++14 TESTS 5 15 3686400
123568047 dintComeSoFarToStopHere A July 24, 2021, 4:22 a.m. OK GNU C++14 TESTS 2 15 3686400
123565737 mk1212 A July 24, 2021, 3:42 a.m. OK GNU C++14 TESTS 2 15 3686400
123562531 wsl200211 A July 24, 2021, 2:49 a.m. OK GNU C++14 TESTS 2 15 3686400
123558813 Pinky_coder A July 24, 2021, 1:37 a.m. OK GNU C++17 TESTS 2 0 3686400
123567533 nanoblob A July 24, 2021, 4:13 a.m. OK GNU C++17 TESTS 2 0 3686400
123565084 phthuCL A July 24, 2021, 3:33 a.m. OK GNU C++17 TESTS 2 0 3686400
123562129 Khatrivatsal A July 24, 2021, 2:42 a.m. OK GNU C++17 TESTS 2 0 3686400
123561383 cw093 A July 24, 2021, 2:29 a.m. OK GNU C++17 TESTS 2 0 3686400
123559900 teevra A July 24, 2021, 2 a.m. OK GNU C++17 TESTS 2 0 3686400
123558727 032_ayue A July 24, 2021, 1:35 a.m. OK GNU C++17 TESTS 2 0 3686400
123558458 Natsuzora A July 24, 2021, 1:28 a.m. OK GNU C++17 TESTS 2 0 3686400
123556796 Cx330_L A July 24, 2021, 12:44 a.m. OK GNU C++17 TESTS 2 0 3686400
123555912 celestialcoder A July 24, 2021, 12:09 a.m. OK GNU C++17 TESTS 2 0 3686400
123560683 dutinmeow A July 24, 2021, 2:16 a.m. OK GNU C++17 (64) TESTS 2 0 4300800
123568881 Mr.Hmian A July 24, 2021, 4:37 a.m. OK GNU C++17 (64) TESTS 2 0 4300800
123528509 pranshu820 A July 23, 2021, 4:36 p.m. OK GNU C++17 (64) TESTS 2 0 4300800
123530924 soham0_0 A July 23, 2021, 4:48 p.m. OK GNU C++17 (64) TESTS 2 0 4300800
123537670 khushi_26 A July 23, 2021, 5:54 p.m. OK GNU C++17 (64) TESTS 2 0 4300800
123542884 AB.devil A July 23, 2021, 7:03 p.m. OK GNU C++17 (64) TESTS 2 0 4300800
123550253 MazenBatrawi A July 23, 2021, 9:01 p.m. OK GNU C++17 (64) TESTS 2 0 4300800
123556833 Ezreal_Yz A July 24, 2021, 12:45 a.m. OK GNU C++17 (64) TESTS 2 0 4300800
123556284 yzy1 A July 24, 2021, 12:26 a.m. OK GNU C++17 (64) TESTS 2 0 8499200
123536344 ayman25mohammad A July 23, 2021, 5:37 p.m. OK GNU C++17 (64) TESTS 2 15 4198400
123547864 solo07 A July 23, 2021, 8:15 p.m. OK Java 11 TESTS 2 186 23961600
123545570 xypher_007 A July 23, 2021, 7:39 p.m. OK Java 11 TESTS 2 186 23961600
123539533 Erasylll A July 23, 2021, 6:17 p.m. OK Java 11 TESTS 2 186 24064000
123531435 tirth485 A July 23, 2021, 4:52 p.m. OK Java 11 TESTS 2 186 24473600
123563052 mphillotry A July 24, 2021, 2:57 a.m. OK Java 11 TESTS 2 187 23859200
123570184 zenilharia26 A July 24, 2021, 5 a.m. OK Java 11 TESTS 5 187 23961600
123536125 ramuked A July 23, 2021, 5:35 p.m. OK Java 11 TESTS 2 187 23961600
123528846 Debojit219 A July 23, 2021, 4:37 p.m. OK Java 11 TESTS 2 187 23961600
123538899 gourav02 A July 23, 2021, 6:09 p.m. OK Java 11 TESTS 2 187 24473600
123570736 SaberXpro A July 24, 2021, 5:09 a.m. OK Java 11 TESTS 5 202 23961600
123532224 gssakash A July 23, 2021, 4:57 p.m. OK Java 8 TESTS 2 77 20480000
123536089 Devil__ A July 23, 2021, 5:34 p.m. OK Java 8 TESTS 2 93 20480000
123573043 Halix A July 24, 2021, 5:44 a.m. OK Java 8 TESTS 5 93 20480000
123567755 jim_carig A July 24, 2021, 4:17 a.m. OK Java 8 TESTS 2 93 20480000
123566474 jim_carig A July 24, 2021, 3:54 a.m. OK Java 8 TESTS 2 93 20480000
123566450 arpit31 A July 24, 2021, 3:54 a.m. OK Java 8 TESTS 2 93 20480000
123555051 fareedahmaheeb A July 23, 2021, 11:31 p.m. OK Java 8 TESTS 2 93 20480000
123530912 PRIYANSH_TOMAR A July 23, 2021, 4:48 p.m. OK Java 8 TESTS 2 93 20480000
123535873 medude A July 23, 2021, 5:32 p.m. OK Java 8 TESTS 2 109 20480000
123552924 coolManit A July 23, 2021, 10:11 p.m. OK Java 8 TESTS 2 155 20480000
123554584 adam.arabicbooks A July 23, 2021, 11:09 p.m. OK JavaScript TESTS 2 62 7168000
123558365 Spheniscine A July 24, 2021, 1:26 a.m. OK Kotlin TESTS 2 109 20582400
123546245 Tomkowski A July 23, 2021, 7:49 p.m. OK Kotlin TESTS 2 170 20582400
123529148 codersanjeev A July 23, 2021, 4:38 p.m. OK Kotlin TESTS 2 202 20582400
123572839 wbars A July 24, 2021, 5:41 a.m. OK Kotlin TESTS 5 218 21299200
123572891 wbars A July 24, 2021, 5:42 a.m. OK Kotlin TESTS 5 234 21299200
123557168 ygnnjmq A July 24, 2021, 12:56 a.m. OK MS C++ 2017 TESTS 2 15 3686400
123556974 202014930113 A July 24, 2021, 12:50 a.m. OK MS C++ 2017 TESTS 2 15 3686400
123526870 Ethereal. A July 23, 2021, 4:33 p.m. OK MS C++ 2017 TESTS 2 46 3686400
123560402 vjudge3 A July 24, 2021, 2:11 a.m. OK MS C++ 2017 TESTS 2 46 3686400
123533538 gabalawy A July 23, 2021, 5:08 p.m. OK MS C++ 2017 TESTS 2 46 3686400
123555675 gleb32 A July 23, 2021, 11:57 p.m. OK MS C++ 2017 TESTS 2 46 3788800
123559277 js1915wzh A July 24, 2021, 1:47 a.m. OK MS C++ 2017 TESTS 2 61 3686400
123558310 kobedavis A July 24, 2021, 1:25 a.m. OK MS C++ 2017 TESTS 2 61 3686400
123556682 Xiaomostream A July 24, 2021, 12:41 a.m. OK MS C++ 2017 TESTS 2 61 3686400
123555248 UdeaJl1337 A July 23, 2021, 11:40 p.m. OK MS C++ 2017 TESTS 2 61 3686400
123556057 silxi A July 24, 2021, 12:16 a.m. OK .NET Core C# TESTS 2 108 12902400
123564389 tryingit A July 24, 2021, 3:21 a.m. OK Node.js TESTS 2 140 17510400
123533339 armsusman A July 23, 2021, 5:06 p.m. OK PyPy 3 TESTS 2 124 24473600
123534221 sjay111 A July 23, 2021, 5:15 p.m. OK PyPy 3 TESTS 2 139 25497600
123537711 sarthakmanna A July 23, 2021, 5:54 p.m. OK PyPy 3 TESTS 2 140 25804800
123534190 n00bc0d3r69 A July 23, 2021, 5:15 p.m. OK PyPy 3 TESTS 2 155 26521600
123572898 skhan_org A July 24, 2021, 5:42 a.m. OK PyPy 3 TESTS 5 171 25600000
123551458 songtae A July 23, 2021, 9:31 p.m. OK PyPy 3 TESTS 2 171 25907200
123542854 akshitm16 A July 23, 2021, 7:02 p.m. OK PyPy 3 TESTS 2 171 27033600
123560540 not_akshitm16 A July 24, 2021, 2:13 a.m. OK PyPy 3 TESTS 2 171 27033600
123551161 yash490 A July 23, 2021, 9:24 p.m. OK PyPy 3 TESTS 2 186 27033600
123529609 caow A July 23, 2021, 4:40 p.m. OK PyPy 3 TESTS 2 249 30720000
123572146 sergeantsnape A July 24, 2021, 5:31 a.m. OK Python 3 TESTS 5 61 6963200
123525256 Paritd A July 23, 2021, 4:30 p.m. OK Python 3 TESTS 2 77 7475200
123531001 radoan.sharkar.richi A July 23, 2021, 4:49 p.m. OK Python 3 TESTS 2 77 7680000
123561508 AbhiByte A July 24, 2021, 2:32 a.m. OK Python 3 TESTS 2 78 7270400
123569597 jashu1602 A July 24, 2021, 4:51 a.m. OK Python 3 TESTS 5 93 6963200
123538196 so_h A July 23, 2021, 6:01 p.m. OK Python 3 TESTS 2 93 7372800
123530449 SAJJU_24 A July 23, 2021, 4:45 p.m. OK Python 3 TESTS 2 93 7372800
123564799 Mayank-Bhardwaj-404 A July 24, 2021, 3:28 a.m. OK Python 3 TESTS 2 108 7270400
123538516 miraniy A July 23, 2021, 6:05 p.m. OK Python 3 TESTS 2 108 7270400
123538211 P.B.V.Kameshwararao A July 23, 2021, 6:01 p.m. OK Python 3 TESTS 2 109 7372800
123534369 perinze A July 23, 2021, 5:16 p.m. OK Rust TESTS 2 93 3788800

remove filters

Back to search problems