Codeforces Round 861 (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
1808 Codeforces Round 861 (Div. 2) FINISHED False 7200 57185663 March 29, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18751 ) A Lucky Numbers PROGRAMMING brute force implementation #MKnez's ConstructiveForces Task 900

B"Olympus City recently launched the production of personal starships. Now everyone on Mars can buy one and fly to other planets inexpensively. Each starship has a number --some positive integer x . Let's define the luckiness of a number x as the difference between the largest and smallest digits of that number. For example, 142857 has 8 as its largest digit and 1 as its smallest digit, so its luckiness is 8-1=7 . And the number 111 has all digits equal to 1 , so its luckiness is zero. Hateehc is a famous Martian blogger who often flies to different corners of the solar system. To release interesting videos even faster, he decided to buy himself a starship. When he came to the store, he saw starships with numbers from l to r inclusively. While in the store, Hateehc wanted to find a starship with the luckiest number. Since there are a lot of starships in the store, and Hateehc can't program, you have to help the blogger and write a program that answers his question. The first line contains an integer t ( 1 <= t <= 10 ,000 ) --the number of test cases. Each of the following t lines contains a description of the test case. The description consists of two integers l and r ( 1 <= l <= r <= 10^6 ) -- the largest and smallest numbers of the starships in the store. Print t lines, one line for each test case, containing the luckiest starship number in the store. If there are several ways to choose the luckiest number, output any of them. Let's look at two test examples: In the fifth test example, the luckiest number is 90 ."...

Tutorials

Codeforces Round #861 (Div. 2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
199932152 2110083 A March 31, 2023, 10:26 a.m. OK C# 10 TESTS 6 93 2969600 900
199904363 JinerGenkai A March 31, 2023, 4:17 a.m. OK C# 10 TESTS 6 156 2150400 900
199773725 bluemegane A March 30, 2023, 2:20 a.m. OK C# 8 TESTS 6 202 3276800 900
199907300 cuican123 A March 31, 2023, 5:15 a.m. OK Clang++17 Diagnostics TESTS 6 373 0 900
199879111 albertyangyhm A March 30, 2023, 8:15 p.m. OK Clang++17 Diagnostics TESTS 6 389 0 900
199747138 noobcoder31 A March 29, 2023, 7:08 p.m. OK Clang++20 Diagnostics TESTS 6 234 0 900
199843748 visitor031 A March 30, 2023, 2:59 p.m. OK Clang++20 Diagnostics TESTS 6 280 0 900
199767900 pnS73fm A March 30, 2023, 12:05 a.m. OK GNU C11 TESTS 6 46 0 900
199954880 dreamtolearn A March 31, 2023, 2:09 p.m. OK GNU C11 TESTS 6 46 0 900
200062300 mxddzd666 A April 1, 2023, 1:48 a.m. OK GNU C11 TESTS 6 46 0 900
199759126 streidi A March 29, 2023, 9:24 p.m. OK GNU C11 TESTS 6 46 0 900
199756617 Elalawy A March 29, 2023, 8:55 p.m. OK GNU C11 TESTS 6 46 0 900
199929692 ahmed_mustafa4590 A March 31, 2023, 9:58 a.m. OK GNU C11 TESTS 6 61 0 900
200070841 ghy401564 A April 1, 2023, 4:13 a.m. OK GNU C11 TESTS 6 61 0 900
199899246 jreb A March 31, 2023, 2:21 a.m. OK GNU C11 TESTS 6 62 0 900
199904079 ManJo A March 31, 2023, 4:11 a.m. OK GNU C11 TESTS 6 62 0 900
199878376 Backs1ash A March 30, 2023, 8:07 p.m. OK GNU C11 TESTS 6 62 0 900
199794644 ZzzRzzZ A March 30, 2023, 7:48 a.m. OK GNU C++14 TESTS 6 15 0 900
199803854 meimingzi1 A March 30, 2023, 9:34 a.m. OK GNU C++14 TESTS 6 15 0 900
199848378 vlgunsdaddy A March 30, 2023, 3:27 p.m. OK GNU C++14 TESTS 6 15 0 900
199913780 princesharma74 A March 31, 2023, 6:44 a.m. OK GNU C++14 TESTS 6 15 0 900
199915603 bvbhu A March 31, 2023, 7:07 a.m. OK GNU C++14 TESTS 6 15 0 900
199927056 coding_evening_love A March 31, 2023, 9:30 a.m. OK GNU C++14 TESTS 6 15 0 900
199933405 riazahmed A March 31, 2023, 10:39 a.m. OK GNU C++14 TESTS 6 15 0 900
199953335 buihui2023 A March 31, 2023, 1:55 p.m. OK GNU C++14 TESTS 6 15 0 900
200060007 Gdfzlcx A April 1, 2023, 12:53 a.m. OK GNU C++14 TESTS 6 15 0 900
200009894 Crwonpanzer A March 31, 2023, 4:12 p.m. OK GNU C++14 TESTS 6 15 0 900
200068867 sohaib_07 A April 1, 2023, 3:43 a.m. OK GNU C++17 TESTS 6 15 0 900
200032474 himanshi18 A March 31, 2023, 6:17 p.m. OK GNU C++17 TESTS 6 15 0 900
200022767 MikholapIvan A March 31, 2023, 5:08 p.m. OK GNU C++17 TESTS 6 15 0 900
199953870 mJing A March 31, 2023, 2 p.m. OK GNU C++17 TESTS 6 15 0 900
199946142 Undead_King A March 31, 2023, 12:45 p.m. OK GNU C++17 TESTS 6 15 0 900
199946117 srijitapaul1977 A March 31, 2023, 12:44 p.m. OK GNU C++17 TESTS 6 15 0 900
199933449 vivekshahcodes A March 31, 2023, 10:40 a.m. OK GNU C++17 TESTS 6 15 0 900
199926380 farukfuadhassan A March 31, 2023, 9:23 a.m. OK GNU C++17 TESTS 6 15 0 900
199924798 zhangsijin A March 31, 2023, 9:05 a.m. OK GNU C++17 TESTS 6 15 0 900
199923283 swatishivam23 A March 31, 2023, 8:47 a.m. OK GNU C++17 TESTS 6 15 0 900
199795826 kuchibi A March 30, 2023, 8:03 a.m. OK GNU C++17 (64) TESTS 6 15 0 900
199922973 tongwentao A March 31, 2023, 8:44 a.m. OK GNU C++17 (64) TESTS 6 15 0 900
199878664 GILGAMESH A March 30, 2023, 8:10 p.m. OK GNU C++17 (64) TESTS 6 15 0 900
199854713 alixeid A March 30, 2023, 4:10 p.m. OK GNU C++17 (64) TESTS 6 15 0 900
199827596 Krzychuo A March 30, 2023, 1:15 p.m. OK GNU C++17 (64) TESTS 6 15 0 900
199826944 bkifhr7 A March 30, 2023, 1:10 p.m. OK GNU C++17 (64) TESTS 6 15 0 900
199811036 bkifhr6 A March 30, 2023, 10:48 a.m. OK GNU C++17 (64) TESTS 6 15 0 900
199791585 Yldar A March 30, 2023, 7:12 a.m. OK GNU C++17 (64) TESTS 6 15 0 900
199771313 Holdout A March 30, 2023, 1:25 a.m. OK GNU C++17 (64) TESTS 6 15 0 900
199801589 Kyrie_x A March 30, 2023, 9:09 a.m. OK GNU C++17 (64) TESTS 6 15 1638400 900
199951967 venspresso A March 31, 2023, 1:43 p.m. OK GNU C++20 (64) TESTS 6 15 0 900
199953028 no_name_07 A March 31, 2023, 1:52 p.m. OK GNU C++20 (64) TESTS 6 15 0 900
199956340 Iliya A March 31, 2023, 2:23 p.m. OK GNU C++20 (64) TESTS 6 15 0 900
200005113 leftover_19 A March 31, 2023, 4 p.m. OK GNU C++20 (64) TESTS 6 15 0 900
200050869 mdalammiah1904102 A March 31, 2023, 9:33 p.m. OK GNU C++20 (64) TESTS 6 15 0 900
200060360 ETL A April 1, 2023, 1:02 a.m. OK GNU C++20 (64) TESTS 6 15 0 900
200071420 Misaqwwe_ A April 1, 2023, 4:21 a.m. OK GNU C++20 (64) TESTS 6 15 0 900
200073007 wa_maker A April 1, 2023, 4:42 a.m. OK GNU C++20 (64) TESTS 6 15 0 900
200075202 nwtdrt A April 1, 2023, 5:08 a.m. OK GNU C++20 (64) TESTS 6 15 0 900
199948042 R0X A March 31, 2023, 1:02 p.m. OK GNU C++20 (64) TESTS 6 15 0 900
199740134 iamdimonis A March 29, 2023, 5:52 p.m. OK Java 11 TESTS 6 218 0 900
199935874 manas8260 A March 31, 2023, 11:06 a.m. OK Java 11 TESTS 6 233 0 900
199829767 m0rka1 A March 30, 2023, 1:32 p.m. OK Java 11 TESTS 6 233 0 900
199899446 tapanr97 A March 31, 2023, 2:25 a.m. OK Java 11 TESTS 6 234 0 900
199838525 NithinBharathi A March 30, 2023, 2:28 p.m. OK Java 11 TESTS 6 280 0 900
199780809 SAY_NO_TO_EDITORIAL A March 30, 2023, 4:43 a.m. OK Java 11 TESTS 6 295 0 900
199871924 HelloWorld03 A March 30, 2023, 6:42 p.m. OK Java 11 TESTS 6 296 0 900
199858929 pahul A March 30, 2023, 4:46 p.m. OK Java 11 TESTS 6 296 0 900
199857684 lawaniasamarth10 A March 30, 2023, 4:35 p.m. OK Java 11 TESTS 6 296 0 900
199841852 ad920024.loveshdutta A March 30, 2023, 2:48 p.m. OK Java 11 TESTS 6 311 0 900
199807146 kartikjoshi267 A March 30, 2023, 10:09 a.m. OK Java 17 TESTS 6 202 409600 900
199924479 swatishivam23 A March 31, 2023, 9:01 a.m. OK Java 17 TESTS 6 217 409600 900
199946202 kaihong A March 31, 2023, 12:45 p.m. OK Java 17 TESTS 6 218 0 900
199965586 CCS_Covenant A March 31, 2023, 2:43 p.m. OK Java 17 TESTS 6 233 307200 900
199966557 palak_05 A March 31, 2023, 2:44 p.m. OK Java 17 TESTS 6 248 307200 900
199763738 bunny06 A March 29, 2023, 10:38 p.m. OK Java 17 TESTS 6 248 614400 900
199838937 vankamamidi_dheeraj A March 30, 2023, 2:30 p.m. OK Java 17 TESTS 6 264 0 900
199826101 mukhopadhyaypushan42 A March 30, 2023, 1:02 p.m. OK Java 17 TESTS 6 264 0 900
199780161 Mohamed_M.M.R A March 30, 2023, 4:33 a.m. OK Java 17 TESTS 6 280 716800 900
200076584 Suludardan A April 1, 2023, 5:25 a.m. OK Java 17 TESTS 6 280 921600 900
200066491 valiente A April 1, 2023, 3:05 a.m. OK Java 8 TESTS 6 108 0 900
199857450 lpychemistry A March 30, 2023, 4:33 p.m. OK Java 8 TESTS 6 109 0 900
199815307 -crazy_coder- A March 30, 2023, 11:27 a.m. OK Java 8 TESTS 6 109 0 900
199755539 Koka A March 29, 2023, 8:44 p.m. OK Java 8 TESTS 6 109 0 900
199826036 Virendra115 A March 30, 2023, 1:02 p.m. OK Java 8 TESTS 6 124 0 900
199816383 vkukretiwork A March 30, 2023, 11:37 a.m. OK Java 8 TESTS 6 124 0 900
199762328 __SSB__ A March 29, 2023, 10:12 p.m. OK Java 8 TESTS 6 139 0 900
199776217 Akmaljon.08 A March 30, 2023, 3:14 a.m. OK Java 8 TESTS 6 140 0 900
199765446 IanISam A March 29, 2023, 11:12 p.m. OK Java 8 TESTS 6 140 0 900
199917866 takato23 A March 31, 2023, 7:38 a.m. OK Java 8 TESTS 6 155 0 900
199909717 cz1137 A March 31, 2023, 5:52 a.m. OK MS C++ 2017 TESTS 6 46 0 900
199944932 nikxd01042004 A March 31, 2023, 12:33 p.m. OK MS C++ 2017 TESTS 6 61 0 900
199846703 FullofEgo A March 30, 2023, 3:17 p.m. OK MS C++ 2017 TESTS 6 61 0 900
199875493 Xsif A March 30, 2023, 7:30 p.m. OK MS C++ 2017 TESTS 6 62 0 900
199874453 Vlad1000_nn A March 30, 2023, 7:15 p.m. OK MS C++ 2017 TESTS 6 62 0 900
199864057 ayushgupta2417 A March 30, 2023, 5:27 p.m. OK MS C++ 2017 TESTS 6 62 0 900
199753263 mukhaledd A March 29, 2023, 8:21 p.m. OK MS C++ 2017 TESTS 6 62 0 900
199856239 Varun_2K A March 30, 2023, 4:23 p.m. OK MS C++ 2017 TESTS 6 77 0 900
199856021 Varun_2K A March 30, 2023, 4:21 p.m. OK MS C++ 2017 TESTS 6 77 0 900
199766771 Dathon_HCMUS A March 29, 2023, 11:40 p.m. OK MS C++ 2017 TESTS 6 77 3993600 900
199870681 swseverance A March 30, 2023, 6:28 p.m. OK Node.js TESTS 6 327 5632000 900
200037383 gyx1000 A March 31, 2023, 7:05 p.m. OK Node.js TESTS 6 420 9011200 900
199818690 orazbek A March 30, 2023, 11:57 a.m. OK PHP TESTS 6 404 0 900
199938395 satyajeetdas045 A March 31, 2023, 11:30 a.m. OK PyPy 2 TESTS 6 265 5017600 900
199744420 4mda4mda A March 29, 2023, 6:36 p.m. OK PyPy 3 TESTS 6 155 7372800 900
199818471 bandiaoz A March 30, 2023, 11:55 a.m. OK PyPy 3 TESTS 6 233 6553600 900
199818446 mega_bot A March 30, 2023, 11:55 a.m. OK PyPy 3 TESTS 6 234 4608000 900
199779079 gojo57 A March 30, 2023, 4:12 a.m. OK PyPy 3 TESTS 6 373 5939200 900
199779057 strawberry57 A March 30, 2023, 4:12 a.m. OK PyPy 3 TESTS 6 373 5939200 900
199749086 lance_lottt A March 29, 2023, 7:31 p.m. OK PyPy 3 TESTS 6 373 7065600 900
199931050 Petalzu A March 31, 2023, 10:14 a.m. OK PyPy 3 TESTS 6 389 9523200 900
199976711 infinitelight A March 31, 2023, 2:58 p.m. OK PyPy 3 TESTS 6 404 7065600 900
199859437 C01V3RT A March 30, 2023, 4:50 p.m. OK PyPy 3 TESTS 6 405 6246400 900
199816731 Vishnu_Actual A March 30, 2023, 11:40 a.m. OK PyPy 3 TESTS 6 405 6246400 900
199744771 4mda4mda A March 29, 2023, 6:41 p.m. OK PyPy 3-64 TESTS 6 109 11571200 900
199751590 mohdaman892 A March 29, 2023, 8:02 p.m. OK PyPy 3-64 TESTS 6 124 6963200 900
199869840 MartinXu6 A March 30, 2023, 6:20 p.m. OK PyPy 3-64 TESTS 6 124 7782400 900
199765327 Lhohelhohehmm A March 29, 2023, 11:10 p.m. OK PyPy 3-64 TESTS 6 124 7782400 900
199784403 maxliang A March 30, 2023, 5:40 a.m. OK PyPy 3-64 TESTS 6 140 9113600 900
199901996 Mars_FN A March 31, 2023, 3:26 a.m. OK PyPy 3-64 TESTS 6 140 9318400 900
199853573 plevande A March 30, 2023, 4:02 p.m. OK PyPy 3-64 TESTS 6 155 6656000 900
199766140 fmoney A March 29, 2023, 11:27 p.m. OK PyPy 3-64 TESTS 6 155 9420800 900
199757326 DP_FORMULA A March 29, 2023, 9:02 p.m. OK PyPy 3-64 TESTS 6 171 9113600 900
199752931 rmr A March 29, 2023, 8:17 p.m. OK PyPy 3-64 TESTS 6 186 8908800 900
199883789 Parzival-0_0 A March 30, 2023, 9:03 p.m. OK Python 3 TESTS 6 296 204800 900
199758099 elistark A March 29, 2023, 9:11 p.m. OK Python 3 TESTS 6 311 204800 900
199801421 khhhhhhh A March 30, 2023, 9:08 a.m. OK Python 3 TESTS 6 420 0 900
199790156 Nanthakumar06 A March 30, 2023, 6:55 a.m. OK Python 3 TESTS 6 420 0 900
199864080 PranavBadBoy A March 30, 2023, 5:27 p.m. OK Python 3 TESTS 6 421 204800 900
200025741 sh3llvik A March 31, 2023, 5:23 p.m. OK Python 3 TESTS 6 436 307200 900
199806374 phlai326 A March 30, 2023, 10:01 a.m. OK Python 3 TESTS 6 514 0 900
199764804 _GSV_ A March 29, 2023, 10:59 p.m. OK Python 3 TESTS 6 514 409600 900
199897253 linkm2016 A March 31, 2023, 1:30 a.m. OK Python 3 TESTS 6 530 0 900
199904285 rannn A March 31, 2023, 4:15 a.m. OK Python 3 TESTS 6 545 0 900
199852581 Franciscopaco A March 30, 2023, 3:54 p.m. OK Rust 2021 TESTS 6 30 0 900
200004145 dhikshith12 A March 31, 2023, 3:57 p.m. OK Rust 2021 TESTS 6 108 0 900
199931208 weittay A March 31, 2023, 10:15 a.m. OK Rust 2021 TESTS 6 109 0 900

remove filters

Back to search problems