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 |
---|---|---|---|---|---|---|
1605 | Codeforces Round 754 (Div. 2) | FINISHED | False | 7200 | 100538663 | Nov. 12, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20776 ) | A | A.M. Deviation | PROGRAMMING | math number theory | 800 |
B'A number a_2 is said to be the arithmetic mean of two numbers a_1 and a_3 , if the following condition holds: a_1 + a_3 = 2 cdot a_2 . We define an arithmetic mean deviation of three numbers a_1 , a_2 and a_3 as follows: d(a_1, a_2, a_3) = |a_1 + a_3 - 2 cdot a_2| . Arithmetic means a lot to Jeevan. He has three numbers a_1 , a_2 and a_3 and he wants to minimize the arithmetic mean deviation d(a_1, a_2, a_3) . To do so, he can perform the following operation any number of times (possibly zero): Help Jeevan find out the minimum value of d(a_1, a_2, a_3) that can be obtained after applying the operation any number of times. The first line contains a single integer t (1 <= t <= 5000) -- the number of test cases. The first and only line of each test case contains three integers a_1 , a_2 and a_3 (1 <= a_1, a_2, a_3 <= 10^{8}) . For each test case, output the minimum value of d(a_1, a_2, a_3) that can be obtained after applying the operation any number of times. Note that after applying a few operations, the values of a_1 , a_2 and a_3 may become negative. In the first test case, 4 is already the Arithmetic Mean of 3 and 5 . d(3, 4, 5) = |3 + 5 - 2 cdot 4| = 0 In the second test case, we can apply the following operation: (2, 2, 6) xrightarrow[ text{increment a_2 }]{ text{decrement a_1 }} (1, 3, 6) d(1, 3, 6) = |1 + 6 - 2 cdot 3| = 1 It can be proven that answer can not be improved any further. In the third test case, we can apply the following operations: (1, 6, 5) xrightarrow[ text{increment a_3 }]{ text{decrement a_2 }} (1, 5, 6) xrightarrow[ text{increment a_1 }]{ text{decrement a_2 }} (2, 4, 6) d(2, 4, 6) = |2 + 6 - 2 cdot 4| = 0 '... |
tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
135178177 | ThursdayLoser | A | Nov. 12, 2021, 5:33 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135178419 | ThursdayLoser | A | Nov. 12, 2021, 5:35 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135180207 | S.M._Nafis_Ahmed | A | Nov. 12, 2021, 5:49 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135181610 | murali_33 | A | Nov. 12, 2021, 6 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135185414 | Md.Asraful_Islam_Subbir | A | Nov. 12, 2021, 6:34 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135197672 | Iizshit | A | Nov. 12, 2021, 9:36 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135212455 | 21GuoBn_Hua | A | Nov. 13, 2021, 3:51 a.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135216709 | bhminh322 | A | Nov. 13, 2021, 5 a.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135167375 | Break_codder | A | Nov. 12, 2021, 4:28 p.m. | OK | GNU C11 | TESTS | 10 | 31 | 3686400 | 800 | |
135217509 | adrunkard | A | Nov. 13, 2021, 5:11 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 1024000 | 800 | |
135217632 | vjudge1 | A | Nov. 13, 2021, 5:13 a.m. | OK | GNU C++14 | TESTS | 10 | 0 | 1024000 | 800 | |
135216025 | Jie0355 | A | Nov. 13, 2021, 4:50 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135221450 | Developer2020 | A | Nov. 13, 2021, 5:57 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135220991 | XIBRA | A | Nov. 13, 2021, 5:52 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135220862 | S.TanK | A | Nov. 13, 2021, 5:51 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135220708 | DivyanshAgrawal | A | Nov. 13, 2021, 5:49 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135218546 | gnored | A | Nov. 13, 2021, 5:24 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135217704 | angel1990. | A | Nov. 13, 2021, 5:14 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135217631 | m1979823301m | A | Nov. 13, 2021, 5:13 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1024000 | 800 | |
135220000 | opel_howard | A | Nov. 13, 2021, 5:41 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135220049 | huwenbo | A | Nov. 13, 2021, 5:42 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135219985 | vikaspandey1206 | A | Nov. 13, 2021, 5:41 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135221769 | Hien | A | Nov. 13, 2021, 6 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135221842 | Ken_Kaneki_ | A | Nov. 13, 2021, 6:01 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135221367 | aissaayoub186 | A | Nov. 13, 2021, 5:56 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135220591 | keshavsingh200100 | A | Nov. 13, 2021, 5:48 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135220561 | yaduvanshi_Satyam. | A | Nov. 13, 2021, 5:47 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135220382 | g9_briceno | A | Nov. 13, 2021, 5:45 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135220336 | mandar_2411 | A | Nov. 13, 2021, 5:45 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 1024000 | 800 | |
135213777 | augg1e | A | Nov. 13, 2021, 4:12 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 0 | 1228800 | 800 | |
135202529 | w23c3c3 | A | Nov. 13, 2021, 12:07 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1126400 | 800 | |
135221104 | geeta_Krishna_dev | A | Nov. 13, 2021, 5:53 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135218422 | vora_dev | A | Nov. 13, 2021, 5:22 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135217181 | robinsen | A | Nov. 13, 2021, 5:07 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135217079 | czswez | A | Nov. 13, 2021, 5:06 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135216409 | OnMyZenith | A | Nov. 13, 2021, 4:56 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135215161 | prithvijitbasak | A | Nov. 13, 2021, 4:36 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135215085 | aTSL | A | Nov. 13, 2021, 4:35 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135214974 | sagar_vala | A | Nov. 13, 2021, 4:33 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135187747 | cosenza | A | Nov. 12, 2021, 6:59 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 1228800 | 800 | |
135195086 | ErCierony | A | Nov. 12, 2021, 8:44 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 1228800 | 800 | |
135211252 | Shohan_Suvro | A | Nov. 13, 2021, 3:29 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 0 | 1228800 | 800 | |
135213586 | _DuYuHan_ | A | Nov. 13, 2021, 4:09 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135214004 | Mikhail2004 | A | Nov. 13, 2021, 4:17 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135217126 | Joseph1314 | A | Nov. 13, 2021, 5:06 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135217395 | SHK84 | A | Nov. 13, 2021, 5:10 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135208003 | Gromp15 | A | Nov. 13, 2021, 2:30 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135211819 | ac2hu | A | Nov. 13, 2021, 3:40 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135212960 | wty2016 | A | Nov. 13, 2021, 3:59 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1228800 | 800 | |
135215832 | vtiptop | A | Nov. 13, 2021, 4:48 a.m. | OK | Go | TESTS | 10 | 31 | 8192000 | 800 | |
135165286 | meooow | A | Nov. 12, 2021, 4:23 p.m. | OK | Haskell | TESTS | 10 | 30 | 11161600 | 800 | |
135199964 | Toinfinity | A | Nov. 12, 2021, 10:37 p.m. | OK | Java 11 | TESTS | 10 | 171 | 24576000 | 800 | |
135181469 | insane_banda | A | Nov. 12, 2021, 5:59 p.m. | OK | Java 11 | TESTS | 10 | 171 | 24576000 | 800 | |
135213616 | himanshu_0624 | A | Nov. 13, 2021, 4:10 a.m. | OK | Java 11 | TESTS | 10 | 171 | 24678400 | 800 | |
135207977 | Abhishek_patel_ | A | Nov. 13, 2021, 2:30 a.m. | OK | Java 11 | TESTS | 10 | 171 | 24678400 | 800 | |
135179488 | MubtasimShahriar | A | Nov. 12, 2021, 5:44 p.m. | OK | Java 11 | TESTS | 10 | 171 | 24678400 | 800 | |
135215477 | BiggEr. | A | Nov. 13, 2021, 4:42 a.m. | OK | Java 11 | TESTS | 10 | 186 | 24576000 | 800 | |
135182331 | KarMa_ | A | Nov. 12, 2021, 6:06 p.m. | OK | Java 11 | TESTS | 10 | 186 | 24678400 | 800 | |
135172894 | henrychenOutlook | A | Nov. 12, 2021, 5 p.m. | OK | Java 11 | TESTS | 10 | 187 | 24678400 | 800 | |
135173453 | ayush__1411 | A | Nov. 12, 2021, 5:03 p.m. | OK | Java 11 | TESTS | 10 | 187 | 24678400 | 800 | |
135214474 | DedsecKnight | A | Nov. 13, 2021, 4:25 a.m. | OK | Java 11 | TESTS | 10 | 187 | 24985600 | 800 | |
135208932 | saltedfish54250 | A | Nov. 13, 2021, 2:47 a.m. | OK | Java 8 | TESTS | 10 | 93 | 18944000 | 800 | |
135201540 | kzhang2012 | A | Nov. 12, 2021, 11:32 p.m. | OK | Java 8 | TESTS | 10 | 108 | 18841600 | 800 | |
135208998 | saltedfish54250 | A | Nov. 13, 2021, 2:48 a.m. | OK | Java 8 | TESTS | 10 | 108 | 18944000 | 800 | |
135203697 | me_asutosh | A | Nov. 13, 2021, 12:46 a.m. | OK | Java 8 | TESTS | 10 | 109 | 18841600 | 800 | |
135209171 | saltedfish54250 | A | Nov. 13, 2021, 2:51 a.m. | OK | Java 8 | TESTS | 10 | 109 | 18944000 | 800 | |
135209106 | saltedfish54250 | A | Nov. 13, 2021, 2:50 a.m. | OK | Java 8 | TESTS | 10 | 109 | 18944000 | 800 | |
135208962 | saltedfish54250 | A | Nov. 13, 2021, 2:48 a.m. | OK | Java 8 | TESTS | 10 | 109 | 18944000 | 800 | |
135209064 | saltedfish54250 | A | Nov. 13, 2021, 2:49 a.m. | OK | Java 8 | TESTS | 10 | 124 | 18944000 | 800 | |
135209016 | saltedfish54250 | A | Nov. 13, 2021, 2:49 a.m. | OK | Java 8 | TESTS | 10 | 124 | 18944000 | 800 | |
135172843 | Hasib_Ullah | A | Nov. 12, 2021, 4:59 p.m. | OK | Java 8 | TESTS | 10 | 124 | 18944000 | 800 | |
135207899 | aislanfgc | A | Nov. 13, 2021, 2:28 a.m. | OK | Kotlin 1.5 | TESTS | 10 | 264 | 25600000 | 800 | |
135204867 | cunyu___ | A | Nov. 13, 2021, 1:20 a.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 1126400 | 800 | |
135204211 | MDKL | A | Nov. 13, 2021, 1:01 a.m. | OK | MS C++ 2017 | TESTS | 10 | 15 | 1126400 | 800 | |
135216578 | Subrashi316 | A | Nov. 13, 2021, 4:59 a.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 1126400 | 800 | |
135208667 | bkifhr10 | A | Nov. 13, 2021, 2:43 a.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 1126400 | 800 | |
135206134 | rongyan | A | Nov. 13, 2021, 1:51 a.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 1126400 | 800 | |
135196931 | chika10 | A | Nov. 12, 2021, 9:21 p.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 1126400 | 800 | |
135221712 | gabalawy | A | Nov. 13, 2021, 6 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 1126400 | 800 | |
135221476 | gabalawy | A | Nov. 13, 2021, 5:57 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 1126400 | 800 | |
135220063 | Aayush5sep | A | Nov. 13, 2021, 5:42 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 1126400 | 800 | |
135208621 | start666 | A | Nov. 13, 2021, 2:42 a.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 1126400 | 800 | |
135211192 | chinesedfan | A | Nov. 13, 2021, 3:28 a.m. | OK | Node.js | TESTS | 10 | 93 | 14233600 | 800 | |
135196486 | s3vin | A | Nov. 12, 2021, 9:13 p.m. | OK | Perl | TESTS | 10 | 46 | 2048000 | 800 | |
135172773 | 1_2_3_4_5_9 | A | Nov. 12, 2021, 4:59 p.m. | OK | PyPy 2 | TESTS | 10 | 202 | 25702400 | 800 | |
135195622 | whatshisbucket | A | Nov. 12, 2021, 8:55 p.m. | OK | PyPy 3 | TESTS | 10 | 139 | 22323200 | 800 | |
135194551 | wolfram_ | A | Nov. 12, 2021, 8:35 p.m. | OK | PyPy 3 | TESTS | 10 | 139 | 23961600 | 800 | |
135212968 | nicku123 | A | Nov. 13, 2021, 3:59 a.m. | OK | PyPy 3 | TESTS | 10 | 140 | 22630400 | 800 | |
135172303 | akshitm16 | A | Nov. 12, 2021, 4:57 p.m. | OK | PyPy 3 | TESTS | 10 | 155 | 23040000 | 800 | |
135185010 | sw_enthusiast | A | Nov. 12, 2021, 6:30 p.m. | OK | PyPy 3 | TESTS | 10 | 155 | 89088000 | 800 | |
135181065 | kritarth21 | A | Nov. 12, 2021, 5:56 p.m. | OK | PyPy 3 | TESTS | 10 | 156 | 22732800 | 800 | |
135213214 | rocker143 | A | Nov. 13, 2021, 4:03 a.m. | OK | PyPy 3 | TESTS | 10 | 202 | 26214400 | 800 | |
135190938 | tars_rigel | A | Nov. 12, 2021, 7:41 p.m. | OK | PyPy 3 | TESTS | 10 | 217 | 23552000 | 800 | |
135221728 | akshat11 | A | Nov. 13, 2021, 6 a.m. | OK | PyPy 3 | TESTS | 10 | 218 | 23244800 | 800 | |
135185857 | vladislav.u | A | Nov. 12, 2021, 6:39 p.m. | OK | PyPy 3 | TESTS | 10 | 233 | 23244800 | 800 | |
135194072 | feelme | A | Nov. 12, 2021, 8:26 p.m. | OK | PyPy 3-64 | TESTS | 10 | 124 | 35225600 | 800 | |
135219494 | chiakimio | A | Nov. 13, 2021, 5:35 a.m. | OK | PyPy 3-64 | TESTS | 10 | 140 | 38912000 | 800 | |
135216764 | yuvrajparashar710 | A | Nov. 13, 2021, 5:01 a.m. | OK | PyPy 3-64 | TESTS | 10 | 186 | 38400000 | 800 | |
135217199 | yuvrajparashar710 | A | Nov. 13, 2021, 5:07 a.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38092800 | 800 | |
135205723 | rutz12 | A | Nov. 13, 2021, 1:42 a.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38092800 | 800 | |
135203132 | WinterFlowers_ | A | Nov. 13, 2021, 12:27 a.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38092800 | 800 | |
135173201 | R.Ayush777 | A | Nov. 12, 2021, 5:01 p.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38297600 | 800 | |
135178622 | Sinkumen | A | Nov. 12, 2021, 5:36 p.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38604800 | 800 | |
135221667 | naimish18 | A | Nov. 13, 2021, 5:59 a.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38707200 | 800 | |
135199932 | freakbuoyancy | A | Nov. 12, 2021, 10:36 p.m. | OK | PyPy 3-64 | TESTS | 10 | 202 | 38707200 | 800 | |
135175395 | OLOGY | A | Nov. 12, 2021, 5:13 p.m. | OK | Python 2 | TESTS | 10 | 46 | 3993600 | 800 | |
135190706 | thhsu | A | Nov. 12, 2021, 7:37 p.m. | OK | Python 3 | TESTS | 10 | 46 | 4608000 | 800 | |
135166790 | zkoong | A | Nov. 12, 2021, 4:26 p.m. | OK | Python 3 | TESTS | 10 | 61 | 4505600 | 800 | |
135219609 | chiakimio | A | Nov. 13, 2021, 5:36 a.m. | OK | Python 3 | TESTS | 10 | 62 | 4608000 | 800 | |
135163001 | shikhabhat16 | A | Nov. 12, 2021, 4:18 p.m. | OK | Python 3 | TESTS | 10 | 62 | 4608000 | 800 | |
135185419 | hoops | A | Nov. 12, 2021, 6:34 p.m. | OK | Python 3 | TESTS | 10 | 62 | 4710400 | 800 | |
135218129 | LeeTuan | A | Nov. 13, 2021, 5:19 a.m. | OK | Python 3 | TESTS | 10 | 77 | 4300800 | 800 | |
135206023 | sukhawat | A | Nov. 13, 2021, 1:49 a.m. | OK | Python 3 | TESTS | 10 | 77 | 4300800 | 800 | |
135173176 | NaZaR.IO | A | Nov. 12, 2021, 5:01 p.m. | OK | Python 3 | TESTS | 10 | 77 | 4300800 | 800 | |
135191065 | Mercury_7.0 | A | Nov. 12, 2021, 7:43 p.m. | OK | Python 3 | TESTS | 10 | 78 | 4300800 | 800 | |
135190804 | Fran5 | A | Nov. 12, 2021, 7:39 p.m. | OK | Python 3 | TESTS | 10 | 78 | 4300800 | 800 | |
135173122 | p00f | A | Nov. 12, 2021, 5:01 p.m. | OK | Rust | TESTS | 10 | 15 | 1228800 | 800 | |
135202307 | Spheniscine | A | Nov. 12, 2021, 11:59 p.m. | OK | Rust | TESTS | 10 | 15 | 1331200 | 800 | |
135177264 | Hyrulia | A | Nov. 12, 2021, 5:27 p.m. | OK | Rust | TESTS | 10 | 77 | 1228800 | 800 |
Back to search problems