Codeforces Round 835 (Div. 4)

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
1760 Codeforces Round 835 (Div. 4) FINISHED False 8700 68138663 Nov. 21, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 38532 ) C Advantage PROGRAMMING data structures data structures implementation implementation

B'There are n participants in a competition, participant i having a strength of s_i . Every participant wonders how much of an advantage they have over the other best participant. In other words, each participant i wants to know the difference between s_i and s_j , where j is the strongest participant in the competition, not counting i (a difference can be negative). So, they ask you for your help! For each i ( 1 <= q i <= q n ) output the difference between s_i and the maximum strength of any participant other than participant i . The input consists of multiple test cases. The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The descriptions of the test cases follow. The first line of each test case contains an integer n ( 2 <= q n <= q 2 cdot10^5 ) -- the length of the array. The following line contains n space-separated positive integers s_1 , s_2 , ..., s_n ( 1 <= q s_i <= q 10^9 ) -- the strengths of the participants. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot10^5 . For each test case, output n space-separated integers. For each i ( 1 <= q i <= q n ) output the difference between s_i and the maximum strength of any other participant. For the first test case: '...

Tutorials

109348

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
182050508 WAAAAAAAAAAAAAAAAAAAAA C Nov. 21, 2022, 7:01 p.m. OK C# 10 TESTS 5 639 31436800
182039768 Kels910 C Nov. 21, 2022, 5:26 p.m. OK C# 8 TESTS 5 686 31948800
182036114 mirmuddassir78 C Nov. 21, 2022, 5:07 p.m. OK Clang++17 Diagnostics TESTS 5 1668 819200
182082696 KingBob C Nov. 22, 2022, 3:59 a.m. OK Clang++20 Diagnostics TESTS 5 1684 1126400
182072909 Wanderkind C Nov. 22, 2022, 1:33 a.m. OK D TESTS 5 62 819200
182037281 souro303 C Nov. 21, 2022, 5:12 p.m. OK GNU C11 TESTS 5 93 819200
182084856 manga5669 C Nov. 22, 2022, 4:39 a.m. OK GNU C11 TESTS 5 873 819200
182043006 Nahida10 C Nov. 21, 2022, 5:50 p.m. OK GNU C11 TESTS 5 888 1638400
182084021 manga5669 C Nov. 22, 2022, 4:24 a.m. OK GNU C11 TESTS 5 889 819200
182044645 Nazmul_TheDarkHorse C Nov. 21, 2022, 6:03 p.m. OK GNU C11 TESTS 5 889 819200
182082836 Warriorkhalid C Nov. 22, 2022, 4:02 a.m. OK GNU C11 TESTS 5 889 819200
182038941 siddique32 C Nov. 21, 2022, 5:21 p.m. OK GNU C11 TESTS 5 889 1638400
182041935 Xsif C Nov. 21, 2022, 5:41 p.m. OK GNU C11 TESTS 5 919 819200
182083733 manga5669 C Nov. 22, 2022, 4:18 a.m. OK GNU C11 TESTS 5 920 819200
182034648 I.W.E.C_BAIGEI_ C Nov. 21, 2022, 5:01 p.m. OK GNU C11 TESTS 5 920 819200
182068232 zxr00000 C Nov. 22, 2022, 12:56 a.m. OK GNU C++14 TESTS 5 78 819200
182067804 ftuknights C Nov. 22, 2022, 12:45 a.m. OK GNU C++14 TESTS 5 78 819200
182040895 ahmedabdelaziz60 C Nov. 21, 2022, 5:33 p.m. OK GNU C++14 TESTS 5 92 3174400
182076493 taotaotao123 C Nov. 22, 2022, 2:09 a.m. OK GNU C++14 TESTS 5 93 819200
182087984 apophis1342 C Nov. 22, 2022, 5:30 a.m. OK GNU C++14 TESTS 5 93 819200
182082655 AIM-9M C Nov. 22, 2022, 3:58 a.m. OK GNU C++14 TESTS 5 93 819200
182078851 BerryPie C Nov. 22, 2022, 2:55 a.m. OK GNU C++14 TESTS 5 93 819200
182059992 younis_wagih C Nov. 21, 2022, 9:17 p.m. OK GNU C++14 TESTS 5 93 1638400
182056158 Pranayhalo C Nov. 21, 2022, 8:12 p.m. OK GNU C++14 TESTS 5 93 1638400
182083150 yogahh C Nov. 22, 2022, 4:08 a.m. OK GNU C++14 TESTS 5 93 2662400
182088413 panyan7 C Nov. 22, 2022, 5:37 a.m. OK GNU C++17 TESTS 5 78 1638400
182049517 BlankYang C Nov. 21, 2022, 6:50 p.m. OK GNU C++17 TESTS 5 92 819200
182082485 manjunath11march C Nov. 22, 2022, 3:55 a.m. OK GNU C++17 TESTS 5 93 819200
182078142 Narendramaddigunta C Nov. 22, 2022, 2:41 a.m. OK GNU C++17 TESTS 5 93 819200
182070216 uxinglaohu C Nov. 22, 2022, 1:23 a.m. OK GNU C++17 TESTS 5 93 819200
182085563 mahfuza_nasrin C Nov. 22, 2022, 4:52 a.m. OK GNU C++17 TESTS 5 93 819200
182088094 ankhanhng0304 C Nov. 22, 2022, 5:32 a.m. OK GNU C++17 TESTS 5 93 819200
182083827 B.Shahrom C Nov. 22, 2022, 4:20 a.m. OK GNU C++17 TESTS 5 93 819200
182082501 yash1402_ C Nov. 22, 2022, 3:56 a.m. OK GNU C++17 TESTS 5 93 819200
182079784 himanshupatil45h C Nov. 22, 2022, 3:13 a.m. OK GNU C++17 TESTS 5 93 819200
182056195 ebarbs C Nov. 21, 2022, 8:13 p.m. OK GNU C++17 (64) TESTS 5 46 15564800
182078405 Calanosay C Nov. 22, 2022, 2:46 a.m. OK GNU C++17 (64) TESTS 5 61 819200
182047005 MagedTarek C Nov. 21, 2022, 6:25 p.m. OK GNU C++17 (64) TESTS 5 62 819200
182042227 lunchbox C Nov. 21, 2022, 5:43 p.m. OK GNU C++17 (64) TESTS 5 77 819200
182043039 Ghanem22 C Nov. 21, 2022, 5:50 p.m. OK GNU C++17 (64) TESTS 5 77 819200
182051356 arwamohmd.32 C Nov. 21, 2022, 7:11 p.m. OK GNU C++17 (64) TESTS 5 77 1638400
182079028 Evang C Nov. 22, 2022, 2:59 a.m. OK GNU C++17 (64) TESTS 5 77 1638400
182056384 FMassa C Nov. 21, 2022, 8:15 p.m. OK GNU C++17 (64) TESTS 5 77 1638400
182083228 firtree C Nov. 22, 2022, 4:09 a.m. OK GNU C++17 (64) TESTS 5 77 3174400
182087695 manant C Nov. 22, 2022, 5:26 a.m. OK GNU C++17 (64) TESTS 5 77 3174400
182042399 mysteri0us7 C Nov. 21, 2022, 5:45 p.m. OK GNU C++20 (64) TESTS 5 31 2457600
182050447 Alyalsayed C Nov. 21, 2022, 7:01 p.m. OK GNU C++20 (64) TESTS 5 31 2457600
182077446 lololu C Nov. 22, 2022, 2:29 a.m. OK GNU C++20 (64) TESTS 5 46 819200
182084267 Mortus C Nov. 22, 2022, 4:29 a.m. OK GNU C++20 (64) TESTS 5 46 819200
182086314 HuParry C Nov. 22, 2022, 5:04 a.m. OK GNU C++20 (64) TESTS 5 46 819200
182088697 devRoar C Nov. 22, 2022, 5:41 a.m. OK GNU C++20 (64) TESTS 5 46 819200
182053160 Shehata.1 C Nov. 21, 2022, 7:32 p.m. OK GNU C++20 (64) TESTS 5 46 819200
182051125 jaime06rr C Nov. 21, 2022, 7:08 p.m. OK GNU C++20 (64) TESTS 5 46 819200
182054801 mahersefo C Nov. 21, 2022, 7:52 p.m. OK GNU C++20 (64) TESTS 5 46 819200
182076076 baiwang C Nov. 22, 2022, 2 a.m. OK GNU C++20 (64) TESTS 5 46 819200
182067063 pepradere C Nov. 22, 2022, 12:25 a.m. OK Go TESTS 5 624 11776000
182064570 Bahaalization C Nov. 21, 2022, 11:06 p.m. OK Java 11 TESTS 5 265 0
182061073 Yousef_Badr C Nov. 21, 2022, 9:40 p.m. OK Java 11 TESTS 5 265 0
182090145 Deepak4466 C Nov. 22, 2022, 6:01 a.m. OK Java 11 TESTS 5 295 0
182082024 rajneesh.osho C Nov. 22, 2022, 3:46 a.m. OK Java 11 TESTS 5 295 3686400
182055067 df08.22_ C Nov. 21, 2022, 7:56 p.m. OK Java 11 TESTS 5 311 0
182064568 pakkapapad C Nov. 21, 2022, 11:06 p.m. OK Java 11 TESTS 5 327 716800
182047393 vijender_8601 C Nov. 21, 2022, 6:29 p.m. OK Java 11 TESTS 5 358 6553600
182054835 wolfy_thee_wolf C Nov. 21, 2022, 7:53 p.m. OK Java 11 TESTS 5 514 0
182083579 x21svage C Nov. 22, 2022, 4:16 a.m. OK Java 11 TESTS 5 857 0
182050698 Abdelrahim303 C Nov. 21, 2022, 7:04 p.m. OK Java 11 TESTS 5 873 0
182047899 dat0-0 C Nov. 21, 2022, 6:34 p.m. OK Java 17 TESTS 5 248 819200
182086360 waynebruce1704 C Nov. 22, 2022, 5:04 a.m. OK Java 17 TESTS 5 295 819200
182040025 Eslam_Ahmed C Nov. 21, 2022, 5:27 p.m. OK Java 17 TESTS 5 311 1126400
182064554 Bahaalization C Nov. 21, 2022, 11:06 p.m. OK Java 17 TESTS 5 373 614400
182057090 Eslam_Ahmed C Nov. 21, 2022, 8:26 p.m. OK Java 17 TESTS 5 421 3788800
182043511 gc2645 C Nov. 21, 2022, 5:54 p.m. OK Java 17 TESTS 5 592 409600
182083642 sharadtandale2878 C Nov. 22, 2022, 4:17 a.m. OK Java 17 TESTS 5 826 716800
182060489 kevy15 C Nov. 21, 2022, 9:27 p.m. OK Java 17 TESTS 5 873 819200
182040938 vijay_kaushal C Nov. 21, 2022, 5:34 p.m. OK Java 17 TESTS 5 1092 1126400
182042954 conqueror_of_everyone C Nov. 21, 2022, 5:49 p.m. OK Java 17 TESTS 5 1122 1024000
182063240 BBEG C Nov. 21, 2022, 10:29 p.m. OK Java 8 TESTS 5 139 0
182064836 BBEG C Nov. 21, 2022, 11:13 p.m. OK Java 8 TESTS 5 140 0
182046289 Sussykin C Nov. 21, 2022, 6:18 p.m. OK Java 8 TESTS 5 155 0
182056247 PhoenixDemon C Nov. 21, 2022, 8:13 p.m. OK Java 8 TESTS 5 155 3276800
182068430 Xu_127 C Nov. 22, 2022, 1:01 a.m. OK Java 8 TESTS 5 156 0
182068413 Xu_127 C Nov. 22, 2022, 1 a.m. OK Java 8 TESTS 5 171 0
182064535 Bahaalization C Nov. 21, 2022, 11:06 p.m. OK Java 8 TESTS 5 186 3072000
182063543 mohamedhassan_c C Nov. 21, 2022, 10:37 p.m. OK Java 8 TESTS 5 186 3174400
182084039 ikillmyself C Nov. 22, 2022, 4:24 a.m. OK Java 8 TESTS 5 187 0
182038465 Koka C Nov. 21, 2022, 5:18 p.m. OK Java 8 TESTS 5 187 2867200
182084202 in_the_Air C Nov. 22, 2022, 4:28 a.m. OK Kotlin 1.6 TESTS 5 1045 18841600
182084187 debk007 C Nov. 22, 2022, 4:27 a.m. OK Kotlin 1.7 TESTS 5 1435 90214400
182047692 LightYagami674 C Nov. 21, 2022, 6:32 p.m. OK Kotlin 1.7 TESTS 5 1824 66252800
182083942 _Safar C Nov. 22, 2022, 4:22 a.m. OK Kotlin 1.7 TESTS 5 1934 44236800
182035338 Faber C Nov. 21, 2022, 5:04 p.m. OK Kotlin 1.7 TESTS 5 1934 76492800
182083910 _Safar C Nov. 22, 2022, 4:22 a.m. OK Kotlin 1.7 TESTS 5 1965 60928000
182041011 timusmanovs C Nov. 21, 2022, 5:34 p.m. OK MS C++ 2017 TESTS 5 296 819200
182048548 alex0511 C Nov. 21, 2022, 6:40 p.m. OK MS C++ 2017 TESTS 5 311 819200
182084320 ShiYiiiii C Nov. 22, 2022, 4:30 a.m. OK MS C++ 2017 TESTS 5 312 819200
182041750 1783034644 C Nov. 21, 2022, 5:40 p.m. OK MS C++ 2017 TESTS 5 312 819200
182049151 Samekekz C Nov. 21, 2022, 6:46 p.m. OK MS C++ 2017 TESTS 5 312 1638400
182036615 zayaz3802 C Nov. 21, 2022, 5:09 p.m. OK MS C++ 2017 TESTS 5 312 1638400
182083588 JRose1121 C Nov. 22, 2022, 4:16 a.m. OK MS C++ 2017 TESTS 5 327 1638400
182086347 mohmadarqan C Nov. 22, 2022, 5:04 a.m. OK MS C++ 2017 TESTS 5 327 2252800
182053240 reversir C Nov. 21, 2022, 7:33 p.m. OK MS C++ 2017 TESTS 5 327 2457600
182057066 rsFalse C Nov. 21, 2022, 8:26 p.m. OK Perl TESTS 5 311 45568000
182075335 keerthanagk152002 C Nov. 22, 2022, 1:44 a.m. OK PyPy 3 TESTS 5 467 20582400
182086657 stephenx7 C Nov. 22, 2022, 5:10 a.m. OK PyPy 3 TESTS 5 483 21196800
182050336 andrey.starodubtsev C Nov. 21, 2022, 7 p.m. OK PyPy 3 TESTS 5 498 34099200
182067467 benaichayyoub22 C Nov. 22, 2022, 12:36 a.m. OK PyPy 3 TESTS 5 560 22220800
182061376 timofey256 C Nov. 21, 2022, 9:46 p.m. OK PyPy 3 TESTS 5 577 19148800
182058144 magnuseifr C Nov. 21, 2022, 8:43 p.m. OK PyPy 3-64 TESTS 5 139 30822400
182035989 only_noob C Nov. 21, 2022, 5:06 p.m. OK PyPy 3-64 TESTS 5 140 30515200
182041157 crapcode C Nov. 21, 2022, 5:35 p.m. OK PyPy 3-64 TESTS 5 140 31539200
182086671 ramz1109 C Nov. 22, 2022, 5:10 a.m. OK PyPy 3-64 TESTS 5 155 28160000
182043590 phoenix2811 C Nov. 21, 2022, 5:55 p.m. OK PyPy 3-64 TESTS 5 155 28672000
182039685 TisAU C Nov. 21, 2022, 5:25 p.m. OK PyPy 3-64 TESTS 5 155 30515200
182055994 AAE C Nov. 21, 2022, 8:10 p.m. OK PyPy 3-64 TESTS 5 156 27136000
182089378 chauhanankush37 C Nov. 22, 2022, 5:51 a.m. OK PyPy 3-64 TESTS 5 156 29184000
182049346 nealzane C Nov. 21, 2022, 6:49 p.m. OK PyPy 3-64 TESTS 5 156 29286400
182045817 abc_noob C Nov. 21, 2022, 6:14 p.m. OK PyPy 3-64 TESTS 5 170 28979200
182037825 longvb48 C Nov. 21, 2022, 5:15 p.m. OK Python 3 TESTS 5 234 17305600
182063509 EinPy C Nov. 21, 2022, 10:36 p.m. OK Python 3 TESTS 5 327 22835200
182075067 Mian_Talha_g C Nov. 22, 2022, 1:37 a.m. OK Python 3 TESTS 5 374 17203200
182052988 AAE C Nov. 21, 2022, 7:30 p.m. OK Python 3 TESTS 5 390 16384000
182055922 AAE C Nov. 21, 2022, 8:09 p.m. OK Python 3 TESTS 5 405 16384000
182075967 Muhammad_Zain_Ul_Abideen C Nov. 22, 2022, 1:58 a.m. OK Python 3 TESTS 5 405 16691200
182050234 Ashrith07 C Nov. 21, 2022, 6:59 p.m. OK Python 3 TESTS 5 405 16691200
182083751 dmnewone C Nov. 22, 2022, 4:19 a.m. OK Python 3 TESTS 5 405 17203200
182083687 manamsriram C Nov. 22, 2022, 4:18 a.m. OK Python 3 TESTS 5 405 17203200
182035177 naniraju_10 C Nov. 21, 2022, 5:03 p.m. OK Python 3 TESTS 5 436 16691200
182047265 nikgaevoy C Nov. 21, 2022, 6:28 p.m. OK Rust 2021 TESTS 5 93 17510400

remove filters

Back to search problems