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
( 22947 ) A Optimal Path PROGRAMMING dp greedy math 800

B"You are given a table a of size n x m . We will consider the table rows numbered from top to bottom from 1 to n , and the columns numbered from left to right from 1 to m . We will denote a cell that is in the i -th row and in the j -th column as (i, j) . In the cell (i, j) there is written a number (i - 1) cdot m + j , that is a_{ij} = (i - 1) cdot m + j . A turtle initially stands in the cell (1, 1) and it wants to come to the cell (n, m) . From the cell (i, j) it can in one step go to one of the cells (i + 1, j) or (i, j + 1) , if it exists. A path is a sequence of cells in which for every two adjacent in the sequence cells the following satisfies: the turtle can reach from the first cell to the second cell in one step. A cost of a path is the sum of numbers that are written in the cells of the path. For example, with n = 2 and m = 3 the table will look as shown above. The turtle can take the following path: (1, 1) rightarrow (1, 2) rightarrow (1, 3) rightarrow (2, 3) . The cost of such way is equal to a_{11} + a_{12} + a_{13} + a_{23} = 12 . On the other hand, the paths (1, 1) rightarrow (1, 2) rightarrow (2, 2) rightarrow (2, 1) and (1, 1) rightarrow (1, 3) are incorrect, because in the first path the turtle can't make a step (2, 2) rightarrow (2, 1) , and in the second path it can't make a step (1, 1) rightarrow (1, 3) . You are asked to tell the turtle a minimal possible cost of a path from the cell (1, 1) to the cell (n, m) . Please note that the cells (1, 1) and (n, m) are a part of the way. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The description of test cases follows. A single line of each test case contains two integers n and m ( 1 <= q n, m <= q 10^4 ) -- the number of rows and columns of the"...

Tutorials

103978

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
161273611 bluemegane A June 20, 2022, 5:39 a.m. OK C# 8 TESTS 5 77 204800 800
161219850 Andrei_Kuz A June 19, 2022, 11:43 a.m. OK Clang++17 Diagnostics TESTS 5 31 0 800
161236604 hieuhfgr A June 19, 2022, 2:59 p.m. OK FPC TESTS 5 31 0 800
161267746 md_robai A June 20, 2022, 3:20 a.m. OK GNU C11 TESTS 5 15 0 800
161251416 TOUHID03 A June 19, 2022, 6:39 p.m. OK GNU C11 TESTS 5 15 0 800
161216856 SP2003 A June 19, 2022, 11:23 a.m. OK GNU C11 TESTS 5 15 0 800
161221727 granthjain59 A June 19, 2022, noon OK GNU C11 TESTS 5 15 0 800
161225212 Andrei_Kuz A June 19, 2022, 12:38 p.m. OK GNU C11 TESTS 5 15 0 800
161221662 SkyWolfy A June 19, 2022, 11:59 a.m. OK GNU C11 TESTS 5 30 0 800
161255872 ashu2002anand A June 19, 2022, 8:11 p.m. OK GNU C11 TESTS 5 31 0 800
161218802 shootoon A June 19, 2022, 11:36 a.m. OK GNU C11 TESTS 5 31 0 800
161247848 Rayhanul_Amin_Tanvir A June 19, 2022, 5:47 p.m. OK GNU C11 TESTS 5 31 0 800
161216907 SkyWolfy A June 19, 2022, 11:24 a.m. OK GNU C11 TESTS 5 31 0 800
161263912 MidnightKinG A June 20, 2022, 1:31 a.m. OK GNU C++14 TESTS 5 0 0 800
161258422 imObscure A June 19, 2022, 9:18 p.m. OK GNU C++14 TESTS 5 0 0 800
161258393 dededitdahditdah A June 19, 2022, 9:17 p.m. OK GNU C++14 TESTS 5 0 0 800
161257943 arbuzick A June 19, 2022, 9:04 p.m. OK GNU C++14 TESTS 5 0 0 800
161273974 Shubh_30 A June 20, 2022, 5:47 a.m. OK GNU C++14 TESTS 5 0 0 800
161273756 lkjhgfertyul A June 20, 2022, 5:42 a.m. OK GNU C++14 TESTS 5 0 0 800
161273148 Heisenburg-120 A June 20, 2022, 5:31 a.m. OK GNU C++14 TESTS 5 0 0 800
161272969 20JE0975 A June 20, 2022, 5:27 a.m. OK GNU C++14 TESTS 5 0 0 800
161269586 Pradipta_cf A June 20, 2022, 4:07 a.m. OK GNU C++14 TESTS 5 0 0 800
161265135 hefengchen A June 20, 2022, 2:09 a.m. OK GNU C++14 TESTS 5 0 0 800
161273239 Phoenix112 A June 20, 2022, 5:33 a.m. OK GNU C++17 TESTS 5 0 0 800
161273694 mannemr20 A June 20, 2022, 5:41 a.m. OK GNU C++17 TESTS 5 0 0 800
161273834 maxifier A June 20, 2022, 5:44 a.m. OK GNU C++17 TESTS 5 0 0 800
161273895 2019B3PS0478G A June 20, 2022, 5:45 a.m. OK GNU C++17 TESTS 5 0 0 800
161269534 lucifer567 A June 20, 2022, 4:06 a.m. OK GNU C++17 TESTS 5 0 0 800
161269039 Zenzenzense A June 20, 2022, 3:53 a.m. OK GNU C++17 TESTS 5 0 0 800
161268125 canhnam357 A June 20, 2022, 3:29 a.m. OK GNU C++17 TESTS 5 0 0 800
161267966 shreyas_1201 A June 20, 2022, 3:25 a.m. OK GNU C++17 TESTS 5 0 0 800
161267725 lovyamyppm A June 20, 2022, 3:19 a.m. OK GNU C++17 TESTS 5 0 0 800
161267598 moikfer A June 20, 2022, 3:15 a.m. OK GNU C++17 TESTS 5 0 0 800
161272538 keziaaurelia A June 20, 2022, 5:19 a.m. OK GNU C++17 (64) TESTS 5 0 0 800
161271374 ebi_fly A June 20, 2022, 4:53 a.m. OK GNU C++17 (64) TESTS 5 0 0 800
161264738 Steins__Gate A June 20, 2022, 1:57 a.m. OK GNU C++17 (64) TESTS 5 0 0 800
161261586 mbdbr A June 19, 2022, 11:42 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161261326 dean.menezes A June 19, 2022, 11:27 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161260591 RetsaZC19 A June 19, 2022, 10:45 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161256803 walid90 A June 19, 2022, 8:34 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161252689 worng_time_Accepted A June 19, 2022, 7:03 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161245704 MateoCV A June 19, 2022, 5:15 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161241157 introvert_hu_bhai A June 19, 2022, 4:11 p.m. OK GNU C++17 (64) TESTS 5 0 0 800
161264078 FumbleHead A June 20, 2022, 1:37 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161264774 Rayuga_shohail A June 20, 2022, 1:58 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161264947 battleboi A June 20, 2022, 2:04 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161264982 wtn135687 A June 20, 2022, 2:05 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161266951 Baoley-Prime A June 20, 2022, 2:57 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161267100 _V3V_ A June 20, 2022, 3:01 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161268406 vermagautam1805 A June 20, 2022, 3:36 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161271932 rakshith21mohan A June 20, 2022, 5:06 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161272790 dipankar_2110 A June 20, 2022, 5:24 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161273798 M_Fenais A June 20, 2022, 5:43 a.m. OK GNU C++20 (64) TESTS 5 0 0 800
161226657 koqo A June 19, 2022, 12:54 p.m. OK Go TESTS 5 15 0 800
161265892 naman5811 A June 20, 2022, 2:34 a.m. OK Java 11 TESTS 5 155 0 800
161235241 esaric A June 19, 2022, 2:42 p.m. OK Java 11 TESTS 5 170 0 800
161271872 vijender_8601 A June 20, 2022, 5:04 a.m. OK Java 11 TESTS 5 171 0 800
161268383 crazycoder143 A June 20, 2022, 3:36 a.m. OK Java 11 TESTS 5 171 0 800
161262116 TimmyThinMints A June 20, 2022, 12:13 a.m. OK Java 11 TESTS 5 171 0 800
161248143 MunirKP A June 19, 2022, 5:51 p.m. OK Java 11 TESTS 5 171 0 800
161229801 GotuZeno A June 19, 2022, 1:30 p.m. OK Java 11 TESTS 5 171 0 800
161258068 AmrAhmed110 A June 19, 2022, 9:07 p.m. OK Java 11 TESTS 5 186 0 800
161217686 g_square A June 19, 2022, 11:28 a.m. OK Java 11 TESTS 5 186 0 800
161271016 _milon_3.4 A June 20, 2022, 4:46 a.m. OK Java 11 TESTS 5 187 0 800
161233360 lcheeme1 A June 19, 2022, 2:17 p.m. OK Java 8 TESTS 5 78 0 800
161261549 DylanSmith A June 19, 2022, 11:40 p.m. OK Java 8 TESTS 5 93 0 800
161250319 danbanica A June 19, 2022, 6:22 p.m. OK Java 8 TESTS 5 108 0 800
161225602 ahmedtawfik A June 19, 2022, 12:42 p.m. OK Java 8 TESTS 5 108 0 800
161262462 dkj A June 20, 2022, 12:31 a.m. OK Java 8 TESTS 5 109 0 800
161239967 vaibhav_1710 A June 19, 2022, 3:55 p.m. OK Java 8 TESTS 5 109 0 800
161238267 FirePegasus A June 19, 2022, 3:31 p.m. OK Java 8 TESTS 5 109 0 800
161225235 faild-in-2021 A June 19, 2022, 12:39 p.m. OK Java 8 TESTS 5 109 0 800
161220403 deepoX A June 19, 2022, 11:48 a.m. OK Java 8 TESTS 5 109 0 800
161218111 ikillmyself A June 19, 2022, 11:31 a.m. OK Java 8 TESTS 5 109 0 800
161219085 qihnus A June 19, 2022, 11:38 a.m. OK Kotlin 1.6 TESTS 5 218 0 800
161209105 sun_shine11 A June 19, 2022, 10:44 a.m. OK MS C++ 2017 TESTS 5 0 0 800
161266586 gglb A June 20, 2022, 2:47 a.m. OK MS C++ 2017 TESTS 5 15 0 800
161266187 JustOnlyOne A June 20, 2022, 2:42 a.m. OK MS C++ 2017 TESTS 5 15 0 800
161265417 MoonWithoutTheStars A June 20, 2022, 2:18 a.m. OK MS C++ 2017 TESTS 5 15 0 800
161259602 Mihai_Ariton A June 19, 2022, 9:58 p.m. OK MS C++ 2017 TESTS 5 15 0 800
161246581 1_shivam A June 19, 2022, 5:28 p.m. OK MS C++ 2017 TESTS 5 15 0 800
161237384 Tor_250 A June 19, 2022, 3:13 p.m. OK MS C++ 2017 TESTS 5 15 0 800
161234267 sohail_377 A June 19, 2022, 2:28 p.m. OK MS C++ 2017 TESTS 5 15 0 800
161224629 fares.h.moneim A June 19, 2022, 12:31 p.m. OK MS C++ 2017 TESTS 5 15 0 800
161259199 Mihai_Ariton A June 19, 2022, 9:43 p.m. OK MS C++ 2017 TESTS 5 31 0 800
161210193 ramanujanvs A June 19, 2022, 10:48 a.m. OK Node.js TESTS 5 139 2048000 800
161230360 coder101p A June 19, 2022, 1:37 p.m. OK Node.js TESTS 5 139 2150400 800
161262521 yjgwak.cs A June 20, 2022, 12:34 a.m. OK PyPy 3 TESTS 5 92 0 800
161229366 pranay_28 A June 19, 2022, 1:25 p.m. OK PyPy 3 TESTS 5 92 1945600 800
161254570 voicon A June 19, 2022, 7:42 p.m. OK PyPy 3 TESTS 5 93 2048000 800
161238728 MegaCharizrdZ A June 19, 2022, 3:39 p.m. OK PyPy 3 TESTS 5 124 2969600 800
161230561 Martin53 A June 19, 2022, 1:39 p.m. OK PyPy 3 TESTS 5 124 3072000 800
161252553 lu3k A June 19, 2022, 6:59 p.m. OK PyPy 3 TESTS 5 155 2867200 800
161222873 ShrijitShaswat A June 19, 2022, 12:12 p.m. OK PyPy 3 TESTS 5 186 3174400 800
161269463 Ayushman_123 A June 20, 2022, 4:04 a.m. OK PyPy 3 TESTS 5 202 5120000 800
161216878 abhijeet.panihar.cse20 A June 19, 2022, 11:24 a.m. OK PyPy 3 TESTS 5 296 11161600 800
161221383 iss2009 A June 19, 2022, 11:56 a.m. OK PyPy 3 TESTS 5 358 2969600 800
161240019 Sagittarius_Serpentarius A June 19, 2022, 3:56 p.m. OK PyPy 3-64 TESTS 5 62 2355200 800
161270909 lucifer1004 A June 20, 2022, 4:43 a.m. OK PyPy 3-64 TESTS 5 62 2457600 800
161224842 sumit_athani A June 19, 2022, 12:34 p.m. OK PyPy 3-64 TESTS 5 62 3379200 800
161224253 Anti-Neutrino A June 19, 2022, 12:27 p.m. OK PyPy 3-64 TESTS 5 77 2355200 800
161261461 hkwu6013 A June 19, 2022, 11:35 p.m. OK PyPy 3-64 TESTS 5 77 2457600 800
161209907 poornaTheja A June 19, 2022, 10:46 a.m. OK PyPy 3-64 TESTS 5 77 2662400 800
161263625 AngelAS A June 20, 2022, 1:21 a.m. OK PyPy 3-64 TESTS 5 77 2867200 800
161233213 deepansh09 A June 19, 2022, 2:15 p.m. OK PyPy 3-64 TESTS 5 77 3072000 800
161222236 sjNxksbzj A June 19, 2022, 12:05 p.m. OK PyPy 3-64 TESTS 5 93 3072000 800
161234526 pirate0 A June 19, 2022, 2:32 p.m. OK PyPy 3-64 TESTS 5 93 3481600 800
161247778 rus_ff A June 19, 2022, 5:46 p.m. OK Python 3 TESTS 5 30 0 800
161238200 alexsanduk A June 19, 2022, 3:29 p.m. OK Python 3 TESTS 5 31 0 800
161234570 anshchaudhary A June 19, 2022, 2:33 p.m. OK Python 3 TESTS 5 31 0 800
161224745 Jaideep19 A June 19, 2022, 12:33 p.m. OK Python 3 TESTS 5 31 0 800
161223224 Visrut A June 19, 2022, 12:16 p.m. OK Python 3 TESTS 5 31 0 800
161218355 wicked_knight A June 19, 2022, 11:33 a.m. OK Python 3 TESTS 5 31 0 800
161272064 Abdullah_Qayyum A June 20, 2022, 5:09 a.m. OK Python 3 TESTS 5 46 0 800
161271591 Khwaja_Assam_Arif A June 20, 2022, 4:58 a.m. OK Python 3 TESTS 5 46 0 800
161266447 narasimha_1406 A June 20, 2022, 2:44 a.m. OK Python 3 TESTS 5 46 0 800
161265584 chemistry_guy A June 20, 2022, 2:24 a.m. OK Python 3 TESTS 5 46 0 800
161224133 Shahzod1207 A June 19, 2022, 12:26 p.m. OK Ruby 3 TESTS 5 233 102400 800
161223712 Shahzod1207 A June 19, 2022, 12:21 p.m. OK Ruby 3 TESTS 5 280 0 800
161217358 0npata A June 19, 2022, 11:26 a.m. OK Rust 2021 TESTS 5 0 0 800
161265501 Spheniscine A June 20, 2022, 2:21 a.m. OK Rust 2021 TESTS 5 0 102400 800
161264919 mflimf A June 20, 2022, 2:03 a.m. OK Rust 2021 TESTS 5 31 0 800

remove filters

Back to search problems