Codeforces Round 802 (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
1700 Codeforces Round 802 (Div. 2) FINISHED False 7200 76193699 June 19, 2022, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18841 ) B Palindromic Numbers PROGRAMMING constructive algorithms implementation math 1100

B'During a daily walk Alina noticed a long number written on the ground. Now Alina wants to find some positive number of same length without leading zeroes, such that the sum of these two numbers is a palindrome. Recall that a number is called a palindrome, if it reads the same right to left and left to right. For example, numbers 121, 66, 98989 are palindromes, and 103, 239, 1241 are not palindromes. Alina understands that a valid number always exist. Help her find one! The first line of input data contains an integer t ( 1 <= q t <= q 100 ) -- the number of test cases. Next, descriptions of t test cases follow. The first line of each test case contains a single integer n ( 2 <= q n <= q 100 ,000 ) -- the length of the number that is written on the ground. The second line of contains the positive n -digit integer without leading zeroes -- the number itself. It is guaranteed that the sum of the values n over all test cases does not exceed 100 ,000 . For each of t test cases print an answer -- a positive n -digit integer without leading zeros, such that the sum of the input integer and this number is a palindrome. We can show that at least one number satisfying the constraints exists. If there are multiple solutions, you can output any of them. In the first test case 99 + 32 = 131 is a palindrome. Note that another answer is 12 , because 99 + 12 = 111 is also a palindrome. In the second test case 1023 + 8646 = 9669 . In the third test case 385 + 604 = 989 . '...

Tutorials

103978

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
161221897 nfcl B June 19, 2022, 12:02 p.m. OK Clang++17 Diagnostics TESTS 22 280 13619200 1100
161211487 abusayeid B June 19, 2022, 10:52 a.m. OK GNU C11 TESTS 21 30 409600 1100
161212839 GTrigger B June 19, 2022, 10:57 a.m. OK GNU C11 TESTS 21 31 307200 1100
161217317 nrm B June 19, 2022, 11:26 a.m. OK GNU C11 TESTS 21 389 921600 1100
161259803 Ambh B June 19, 2022, 10:07 p.m. OK GNU C11 TESTS 23 405 819200 1100
161211088 Param_1729 B June 19, 2022, 10:51 a.m. OK GNU C11 TESTS 21 405 1024000 1100
161213211 Souradeep_Dey B June 19, 2022, 10:58 a.m. OK GNU C11 TESTS 21 421 204800 1100
161212082 aerobe B June 19, 2022, 10:54 a.m. OK GNU C++14 TESTS 21 15 204800 1100
161267562 TeFuir123455 B June 20, 2022, 3:14 a.m. OK GNU C++14 TESTS 23 15 204800 1100
161235091 22. B June 19, 2022, 2:40 p.m. OK GNU C++14 TESTS 23 15 204800 1100
161211678 Mohammad_Miraz B June 19, 2022, 10:53 a.m. OK GNU C++14 TESTS 21 15 307200 1100
161216486 Yossef B June 19, 2022, 11:22 a.m. OK GNU C++14 TESTS 21 15 307200 1100
161215176 amanxjha_ B June 19, 2022, 11:03 a.m. OK GNU C++14 TESTS 21 15 307200 1100
161212731 abhishek._nigam_158 B June 19, 2022, 10:56 a.m. OK GNU C++14 TESTS 21 15 307200 1100
161269940 arko385 B June 20, 2022, 4:18 a.m. OK GNU C++14 TESTS 23 15 307200 1100
161273992 the_grignard_reagent B June 20, 2022, 5:47 a.m. OK GNU C++14 TESTS 23 15 307200 1100
161271562 bruce_wayne05 B June 20, 2022, 4:57 a.m. OK GNU C++14 TESTS 23 15 307200 1100
161265183 kobeforces B June 20, 2022, 2:11 a.m. OK GNU C++17 TESTS 23 15 102400 1100
161221737 new_rating B June 19, 2022, noon OK GNU C++17 TESTS 22 15 102400 1100
161212652 unanon B June 19, 2022, 10:56 a.m. OK GNU C++17 TESTS 21 15 204800 1100
161212645 sedev5757 B June 19, 2022, 10:56 a.m. OK GNU C++17 TESTS 21 15 204800 1100
161254956 kshitiz6969 B June 19, 2022, 7:50 p.m. OK GNU C++17 TESTS 23 15 204800 1100
161251596 mohul44 B June 19, 2022, 6:42 p.m. OK GNU C++17 TESTS 23 15 204800 1100
161229616 Mallika_ B June 19, 2022, 1:28 p.m. OK GNU C++17 TESTS 23 15 204800 1100
161217776 prilily B June 19, 2022, 11:28 a.m. OK GNU C++17 TESTS 21 15 204800 1100
161274653 GreyHatRR17 B June 20, 2022, 5:57 a.m. OK GNU C++17 TESTS 23 15 307200 1100
161274712 prabhu013 B June 20, 2022, 5:58 a.m. OK GNU C++17 TESTS 23 15 307200 1100
161225785 Prem1802065p B June 19, 2022, 12:44 p.m. OK GNU C++17 (64) TESTS 22 0 409600 1100
161230930 thesinhajee B June 19, 2022, 1:44 p.m. OK GNU C++17 (64) TESTS 23 0 512000 1100
161209816 Andreasyan B June 19, 2022, 10:46 a.m. OK GNU C++17 (64) TESTS 21 15 204800 1100
161228049 ilia_rr B June 19, 2022, 1:10 p.m. OK GNU C++17 (64) TESTS 23 15 307200 1100
161250130 kira11 B June 19, 2022, 6:20 p.m. OK GNU C++17 (64) TESTS 23 15 307200 1100
161264183 gqf123 B June 20, 2022, 1:40 a.m. OK GNU C++17 (64) TESTS 23 15 409600 1100
161271967 ebi_fly B June 20, 2022, 5:07 a.m. OK GNU C++17 (64) TESTS 23 15 409600 1100
161264071 gqf123 B June 20, 2022, 1:37 a.m. OK GNU C++17 (64) TESTS 23 15 409600 1100
161258025 kal013 B June 19, 2022, 9:06 p.m. OK GNU C++17 (64) TESTS 23 15 409600 1100
161249841 Mohammed_faizan B June 19, 2022, 6:16 p.m. OK GNU C++17 (64) TESTS 23 15 409600 1100
161236096 Lextyle B June 19, 2022, 2:52 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161237674 aspireboy B June 19, 2022, 3:20 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161239355 Saarthak_10 B June 19, 2022, 3:47 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161249047 mdolchik B June 19, 2022, 6:03 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161253831 mohamd.h.yousuf B June 19, 2022, 7:27 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161254342 smgr B June 19, 2022, 7:37 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161256972 dark_knight_786 B June 19, 2022, 8:38 p.m. OK GNU C++20 (64) TESTS 23 0 409600 1100
161222000 Bulbul101 B June 19, 2022, 12:03 p.m. OK GNU C++20 (64) TESTS 22 0 512000 1100
161261575 tanvir___ju B June 19, 2022, 11:42 p.m. OK GNU C++20 (64) TESTS 23 0 614400 1100
161216726 nikhilanand49 B June 19, 2022, 11:23 a.m. OK GNU C++20 (64) TESTS 21 0 819200 1100
161245334 koqo B June 19, 2022, 5:10 p.m. OK Go TESTS 23 31 1126400 1100
161235845 koqo B June 19, 2022, 2:49 p.m. OK Go TESTS 23 31 1126400 1100
161225627 Ganesha_ B June 19, 2022, 12:43 p.m. OK Java 11 TESTS 22 171 0 1100
161267619 naman5811 B June 20, 2022, 3:16 a.m. OK Java 11 TESTS 23 171 0 1100
161225784 abhayptsr B June 19, 2022, 12:44 p.m. OK Java 11 TESTS 22 171 0 1100
161262856 TimmyThinMints B June 20, 2022, 12:48 a.m. OK Java 11 TESTS 23 186 0 1100
161251764 g_square B June 19, 2022, 6:45 p.m. OK Java 11 TESTS 23 186 0 1100
161212437 akwarrier304 B June 19, 2022, 10:55 a.m. OK Java 11 TESTS 21 187 0 1100
161212351 mjamiol1 B June 19, 2022, 10:55 a.m. OK Java 11 TESTS 21 202 0 1100
161269594 giridhrubajyoti2002 B June 20, 2022, 4:08 a.m. OK Java 11 TESTS 23 202 0 1100
161227895 MBilal B June 19, 2022, 1:08 p.m. OK Java 11 TESTS 23 202 0 1100
161224459 todzh B June 19, 2022, 12:30 p.m. OK Java 11 TESTS 22 202 0 1100
161242980 AhmedEl-Gohary B June 19, 2022, 4:35 p.m. OK Java 8 TESTS 23 93 0 1100
161234798 lcheeme1 B June 19, 2022, 2:36 p.m. OK Java 8 TESTS 23 93 0 1100
161233709 BhargavModha B June 19, 2022, 2:21 p.m. OK Java 8 TESTS 23 93 0 1100
161223410 naveenkant227 B June 19, 2022, 12:18 p.m. OK Java 8 TESTS 22 93 0 1100
161220836 anshulchou_123 B June 19, 2022, 11:51 a.m. OK Java 8 TESTS 21 93 0 1100
161262291 FirePegasus B June 20, 2022, 12:22 a.m. OK Java 8 TESTS 23 108 0 1100
161264630 govindrajput B June 20, 2022, 1:53 a.m. OK Java 8 TESTS 23 109 0 1100
161242226 ahmedtawfik B June 19, 2022, 4:25 p.m. OK Java 8 TESTS 23 109 0 1100
161223613 naveenkant227 B June 19, 2022, 12:20 p.m. OK Java 8 TESTS 22 109 0 1100
161212865 Hajan B June 19, 2022, 10:57 a.m. OK Java 8 TESTS 21 109 0 1100
161218304 Pus9vGang B June 19, 2022, 11:32 a.m. OK Kotlin 1.6 TESTS 21 1793 0 1100
161217428 poketred12 B June 19, 2022, 11:26 a.m. OK Kotlin 1.6 TESTS 21 1981 0 1100
161211291 K_0_R_D B June 19, 2022, 10:51 a.m. OK MS C++ 2017 TESTS 21 15 409600 1100
161210539 kevskillz B June 19, 2022, 10:49 a.m. OK MS C++ 2017 TESTS 21 15 614400 1100
161267495 MoonWithoutTheStars B June 20, 2022, 3:12 a.m. OK MS C++ 2017 TESTS 23 61 2150400 1100
161220336 OptimuS99 B June 19, 2022, 11:47 a.m. OK MS C++ 2017 TESTS 21 62 2150400 1100
161232221 ToxicalNoob3062 B June 19, 2022, 2:01 p.m. OK Node.js TESTS 23 140 11980800 1100
161219769 n.n.n.kz B June 19, 2022, 11:43 a.m. OK PHP TESTS 21 31 614400 1100
161223646 yoralbayev B June 19, 2022, 12:20 p.m. OK PHP TESTS 22 46 614400 1100
161216698 1_2_3_4_5_9 B June 19, 2022, 11:23 a.m. OK PyPy 2 TESTS 21 576 7372800 1100
161211654 sohilkhanduja B June 19, 2022, 10:53 a.m. OK PyPy 3 TESTS 21 545 7680000 1100
161248281 WalrusRamen21 B June 19, 2022, 5:52 p.m. OK PyPy 3 TESTS 23 545 7782400 1100
161230889 Martin53 B June 19, 2022, 1:44 p.m. OK PyPy 3 TESTS 23 545 7782400 1100
161227037 daniyarello B June 19, 2022, 12:58 p.m. OK PyPy 3 TESTS 22 545 7782400 1100
161221813 _armin B June 19, 2022, 12:01 p.m. OK PyPy 3 TESTS 22 545 7884800 1100
161223237 adiboy7 B June 19, 2022, 12:16 p.m. OK PyPy 3 TESTS 22 561 7884800 1100
161216911 abhijeet.panihar.cse20 B June 19, 2022, 11:24 a.m. OK PyPy 3 TESTS 21 670 12902400 1100
161261171 LLVM B June 19, 2022, 11:18 p.m. OK PyPy 3 TESTS 23 717 7884800 1100
161239319 Perl32 B June 19, 2022, 3:46 p.m. OK PyPy 3 TESTS 23 732 7987200 1100
161212478 imdj01 B June 19, 2022, 10:55 a.m. OK PyPy 3 TESTS 21 732 7987200 1100
161261701 hkwu6013 B June 19, 2022, 11:48 p.m. OK PyPy 3-64 TESTS 23 78 8806400 1100
161230271 Aksnov B June 19, 2022, 1:36 p.m. OK PyPy 3-64 TESTS 23 78 9011200 1100
161273529 rakshith21mohan B June 20, 2022, 5:38 a.m. OK PyPy 3-64 TESTS 23 109 12800000 1100
161238055 deepansh09 B June 19, 2022, 3:27 p.m. OK PyPy 3-64 TESTS 23 140 15155200 1100
161227149 Mechem-SEAW B June 19, 2022, 1 p.m. OK PyPy 3-64 TESTS 22 155 11468800 1100
161209962 kryptosx B June 19, 2022, 10:47 a.m. OK PyPy 3-64 TESTS 21 187 14643200 1100
161249049 code_brains B June 19, 2022, 6:03 p.m. OK PyPy 3-64 TESTS 23 202 9011200 1100
161235642 Sahitya02 B June 19, 2022, 2:47 p.m. OK PyPy 3-64 TESTS 23 202 9728000 1100
161267344 HinanawiTenshi B June 20, 2022, 3:08 a.m. OK PyPy 3-64 TESTS 23 202 11059200 1100
161216725 SophieHatter B June 19, 2022, 11:23 a.m. OK PyPy 3-64 TESTS 21 202 16896000 1100
161218099 0mk B June 19, 2022, 11:31 a.m. OK Python 2 TESTS 21 1887 409600 1100
161212018 divyamkakkar24 B June 19, 2022, 10:54 a.m. OK Python 3 TESTS 21 124 3993600 1100
161218253 HarshT503 B June 19, 2022, 11:32 a.m. OK Python 3 TESTS 21 140 819200 1100
161224287 Minindu2006 B June 19, 2022, 12:27 p.m. OK Python 3 TESTS 22 186 1228800 1100
161216582 vrajpatel001 B June 19, 2022, 11:23 a.m. OK Python 3 TESTS 21 420 1126400 1100
161218682 cleth B June 19, 2022, 11:35 a.m. OK Python 3 TESTS 21 780 3993600 1100
161227908 nilay.lilawala B June 19, 2022, 1:08 p.m. OK Python 3 TESTS 23 873 102400 1100
161216778 OnePunchMan1 B June 19, 2022, 11:23 a.m. OK Python 3 TESTS 21 873 204800 1100
161227169 Rahulsust B June 19, 2022, 1 p.m. OK Python 3 TESTS 22 888 409600 1100
161233185 zalak_b B June 19, 2022, 2:14 p.m. OK Python 3 TESTS 23 889 102400 1100
161226312 IanISam B June 19, 2022, 12:50 p.m. OK Python 3 TESTS 22 889 204800 1100
161219143 jakobrs B June 19, 2022, 11:38 a.m. OK Rust 2021 TESTS 21 15 307200 1100
161218313 jakobrs B June 19, 2022, 11:32 a.m. OK Rust 2021 TESTS 21 15 307200 1100
161265912 Spheniscine B June 20, 2022, 2:35 a.m. OK Rust 2021 TESTS 23 15 409600 1100
161269517 mflimf B June 20, 2022, 4:05 a.m. OK Rust 2021 TESTS 23 15 716800 1100
161235692 Hyrulia B June 19, 2022, 2:47 p.m. OK Rust 2021 TESTS 23 15 1228800 1100
161222141 0npata B June 19, 2022, 12:04 p.m. OK Rust 2021 TESTS 22 30 614400 1100

remove filters

Back to search problems