Codeforces Round 797 (Div. 3)

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
1690 Codeforces Round 797 (Div. 3) FINISHED False 8100 82567463 June 7, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26475 ) C Restoring the Duration of Tasks PROGRAMMING data structures greedy implementation 800

B"Recently, Polycarp completed n successive tasks. For each completed task, the time s_i is known when it was given, no two tasks were given at the same time. Also given is the time f_i when the task was completed. For each task, there is an unknown value d_i ( d_i>0 ) -- duration of task execution. It is known that the tasks were completed in the order in which they came. Polycarp performed the tasks as follows: Find d_i (duration) of each task. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The descriptions of the input data sets follow. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ). The second line of each test case contains exactly n integers s_1 < s_2 < ... < s_n ( 0 <= s_i <= 10^9 ). The third line of each test case contains exactly n integers f_1 < f_2 < ... < f_n ( s_i < f_i <= 10^9 ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each of t test cases print n positive integers d_1, d_2, ... , d_n -- the duration of each task. First test case: The queue is empty at the beginning: [ ] . And that's where the first task comes in. At time 2 , Polycarp finishes doing the first task, so the duration of the first task is 2 . The queue is empty so Polycarp is just waiting. At time 3 , the second task arrives. And at time 7 , the third task arrives, and now the queue looks like this: [7] . At the time 10 , Polycarp finishes doing the second task, as a result, the duration of the second task is 7 . And at time 10 , Polycarp immediately starts doing the third task and finishes at time 11 . As a result, the duration of the third task is 1 . "...

Tutorials

Codeforces Round #797 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
159937214 razzor.20 C June 8, 2022, 12:37 p.m. OK C# 10 TESTS 9 140 45056000 800
159937111 razzor.20 C June 8, 2022, 12:35 p.m. OK C# 10 TESTS 9 140 45772800 800
159936952 razzor.20 C June 8, 2022, 12:33 p.m. OK C# 10 TESTS 9 670 41779200 800
159928865 jamal_uddin C June 8, 2022, 11:04 a.m. OK Clang++17 Diagnostics TESTS 9 919 17100800 800
159944572 nnr20 C June 8, 2022, 1:59 p.m. OK GNU C11 TESTS 9 811 2355200 800
159982387 BADHON30 C June 9, 2022, 3:13 a.m. OK GNU C11 TESTS 9 826 1638400 800
159906367 rakib151p C June 8, 2022, 6:35 a.m. OK GNU C11 TESTS 9 841 2355200 800
159987002 F._Rabbi_Rithik C June 9, 2022, 5:07 a.m. OK GNU C11 TESTS 9 842 2355200 800
159938419 yasinbashar C June 8, 2022, 12:50 p.m. OK GNU C11 TESTS 9 842 2355200 800
159954985 JV-Devi C June 8, 2022, 4:13 p.m. OK GNU C11 TESTS 9 842 2355200 800
159989567 Ayush_123_4 C June 9, 2022, 5:54 a.m. OK GNU C11 TESTS 9 857 2355200 800
159979408 XiaoDou C June 9, 2022, 1:34 a.m. OK GNU C11 TESTS 9 858 1638400 800
159943805 JayedHaider C June 8, 2022, 1:51 p.m. OK GNU C11 TESTS 9 858 1638400 800
159905172 justj_rg C June 8, 2022, 6:21 a.m. OK GNU C11 TESTS 9 858 1638400 800
159979510 WeiHaoTian C June 9, 2022, 1:38 a.m. OK GNU C++14 TESTS 9 93 1536000 800
159976307 MohamedAliKohla C June 8, 2022, 11:14 p.m. OK GNU C++14 TESTS 9 93 10035200 800
159909674 momomodalao C June 8, 2022, 7:11 a.m. OK GNU C++14 TESTS 9 109 2457600 800
159918553 qzz C June 8, 2022, 9:06 a.m. OK GNU C++14 TESTS 9 124 1638400 800
159978671 xueyan C June 9, 2022, 1:08 a.m. OK GNU C++14 TESTS 9 124 2457600 800
159980357 shirotan C June 9, 2022, 2:09 a.m. OK GNU C++14 TESTS 9 124 2662400 800
159946172 Dabhi_Dipak C June 8, 2022, 2:17 p.m. OK GNU C++14 TESTS 9 124 3174400 800
159920422 AnupamRoy C June 8, 2022, 9:26 a.m. OK GNU C++14 TESTS 9 124 3174400 800
159980902 alkido C June 9, 2022, 2:28 a.m. OK GNU C++14 TESTS 9 139 819200 800
159985922 adhm157 C June 9, 2022, 4:44 a.m. OK GNU C++14 TESTS 9 139 1638400 800
159929270 yuyansheng C June 8, 2022, 11:09 a.m. OK GNU C++17 TESTS 9 108 1638400 800
159910513 Antar_12_35 C June 8, 2022, 7:21 a.m. OK GNU C++17 TESTS 9 109 2355200 800
159952906 tobiichi3227 C June 8, 2022, 3:47 p.m. OK GNU C++17 TESTS 9 109 2764800 800
159944200 kobeforces C June 8, 2022, 1:55 p.m. OK GNU C++17 TESTS 9 124 819200 800
159938381 vito_t C June 8, 2022, 12:50 p.m. OK GNU C++17 TESTS 9 124 1638400 800
159984461 diegoximenes C June 9, 2022, 4:08 a.m. OK GNU C++17 TESTS 9 124 1638400 800
159962892 sersawy C June 8, 2022, 5:56 p.m. OK GNU C++17 TESTS 9 124 1638400 800
159932310 jiangzimi2008 C June 8, 2022, 11:42 a.m. OK GNU C++17 TESTS 9 124 1638400 800
159949167 yrand C June 8, 2022, 2:57 p.m. OK GNU C++17 TESTS 9 124 2355200 800
159990068 lqmm C June 9, 2022, 6:03 a.m. OK GNU C++17 TESTS 9 124 2457600 800
159948461 e3c8f1a924 C June 8, 2022, 2:47 p.m. OK GNU C++17 (64) TESTS 9 15 7680000 800
159970169 ebarbs C June 8, 2022, 7:55 p.m. OK GNU C++17 (64) TESTS 9 30 5120000 800
159907262 Sakib62 C June 8, 2022, 6:44 a.m. OK GNU C++17 (64) TESTS 9 77 1638400 800
159924436 Kenshin2438 C June 8, 2022, 10:11 a.m. OK GNU C++17 (64) TESTS 9 77 2457600 800
159958837 lovezah C June 8, 2022, 5:05 p.m. OK GNU C++17 (64) TESTS 9 77 2457600 800
159948611 NgJaBach C June 8, 2022, 2:49 p.m. OK GNU C++17 (64) TESTS 9 77 3174400 800
159922894 jesse_pinkman_619 C June 8, 2022, 9:53 a.m. OK GNU C++17 (64) TESTS 9 77 4812800 800
159967948 tonmoy00saha C June 8, 2022, 7:11 p.m. OK GNU C++17 (64) TESTS 9 78 1536000 800
159962893 keeping_running C June 8, 2022, 5:56 p.m. OK GNU C++17 (64) TESTS 9 78 1638400 800
159972198 Punisher_at_work C June 8, 2022, 8:44 p.m. OK GNU C++17 (64) TESTS 9 78 1638400 800
159923024 not_Rangan C June 8, 2022, 9:54 a.m. OK GNU C++20 (64) TESTS 9 61 1638400 800
159920910 Nafis_Ahmed_174 C June 8, 2022, 9:31 a.m. OK GNU C++20 (64) TESTS 9 61 1638400 800
159927958 seadawy C June 8, 2022, 10:53 a.m. OK GNU C++20 (64) TESTS 9 61 1638400 800
159973977 Hussein_AbdElrazek C June 8, 2022, 9:36 p.m. OK GNU C++20 (64) TESTS 9 61 1843200 800
159933494 kk_singh C June 8, 2022, 11:54 a.m. OK GNU C++20 (64) TESTS 9 61 2457600 800
159908359 aufannn C June 8, 2022, 6:56 a.m. OK GNU C++20 (64) TESTS 9 61 3379200 800
159951087 achvanov C June 8, 2022, 3:23 p.m. OK GNU C++20 (64) TESTS 9 62 819200 800
159978040 BurningFalls C June 9, 2022, 12:41 a.m. OK GNU C++20 (64) TESTS 9 62 1638400 800
159980311 jasonray0328 C June 9, 2022, 2:07 a.m. OK GNU C++20 (64) TESTS 9 62 1638400 800
159986772 silxi C June 9, 2022, 5:03 a.m. OK GNU C++20 (64) TESTS 9 62 1638400 800
159911742 _alpaca C June 8, 2022, 7:36 a.m. OK Java 11 TESTS 9 312 5427200 800
159904066 Darcy__ C June 8, 2022, 6:06 a.m. OK Java 11 TESTS 9 312 7884800 800
159926489 aadarsh_singh C June 8, 2022, 10:36 a.m. OK Java 11 TESTS 9 327 7270400 800
159985978 eshan18.09 C June 9, 2022, 4:46 a.m. OK Java 11 TESTS 9 343 11468800 800
159955325 vamshisamineni3 C June 8, 2022, 4:18 p.m. OK Java 11 TESTS 9 451 35020800 800
159955258 Kdheeraj2002 C June 8, 2022, 4:17 p.m. OK Java 11 TESTS 9 717 512000 800
159956418 adnan84 C June 8, 2022, 4:33 p.m. OK Java 11 TESTS 9 748 0 800
159949788 vikash1982 C June 8, 2022, 3:05 p.m. OK Java 11 TESTS 9 889 0 800
159938816 shahvraj1500 C June 8, 2022, 12:54 p.m. OK Java 11 TESTS 9 919 7372800 800
159926298 aadarsh_singh C June 8, 2022, 10:34 a.m. OK Java 11 TESTS 9 920 6860800 800
159943444 shivam01_0 C June 8, 2022, 1:47 p.m. OK Java 8 TESTS 9 202 15360000 800
159972909 snowyrsb C June 8, 2022, 9:04 p.m. OK Java 8 TESTS 9 233 16998400 800
159941429 abhinavTalesra C June 8, 2022, 1:24 p.m. OK Java 8 TESTS 9 248 20172800 800
159976644 This_is_Rish C June 8, 2022, 11:31 p.m. OK Java 8 TESTS 9 296 20070400 800
159929273 moyan_01 C June 8, 2022, 11:09 a.m. OK Java 8 TESTS 9 343 35430400 800
159920270 gurruu C June 8, 2022, 9:24 a.m. OK Java 8 TESTS 9 701 409600 800
159946528 nithin_bharathi C June 8, 2022, 2:21 p.m. OK Java 8 TESTS 9 904 37478400 800
159978529 josephSAMO C June 9, 2022, 1:03 a.m. OK Java 8 TESTS 9 1232 0 800
159961082 codehunter_ C June 8, 2022, 5:32 p.m. OK Java 8 TESTS 9 1278 0 800
159989809 amankum C June 9, 2022, 5:58 a.m. OK Java 8 TESTS 9 1279 0 800
159954415 nitish420 C June 8, 2022, 4:05 p.m. OK Kotlin 1.6 TESTS 9 1404 5632000 800
159939196 Pigeon. C June 8, 2022, 12:59 p.m. OK MS C++ 2017 TESTS 9 405 1638400 800
159935977 M.N.W C June 8, 2022, 12:23 p.m. OK MS C++ 2017 TESTS 9 452 2457600 800
159921009 Apoorv_Rathore C June 8, 2022, 9:32 a.m. OK PyPy 3 TESTS 9 295 28774400 800
159910672 xuhao95 C June 8, 2022, 7:23 a.m. OK PyPy 3 TESTS 9 389 38502400 800
159968433 dev8ag C June 8, 2022, 7:20 p.m. OK PyPy 3 TESTS 9 592 23859200 800
159947362 tcltk C June 8, 2022, 2:32 p.m. OK PyPy 3 TESTS 9 592 26931200 800
159962855 ShrijitShaswat C June 8, 2022, 5:55 p.m. OK PyPy 3 TESTS 9 857 23961600 800
159909700 Tanish08 C June 8, 2022, 7:12 a.m. OK PyPy 3 TESTS 9 904 22425600 800
159961654 Moin C June 8, 2022, 5:39 p.m. OK PyPy 3 TESTS 9 919 22323200 800
159909752 mayank35 C June 8, 2022, 7:12 a.m. OK PyPy 3-64 TESTS 9 248 40448000 800
159947769 shock_wav3 C June 8, 2022, 2:38 p.m. OK PyPy 3-64 TESTS 9 264 39936000 800
159922988 abhijeet.panihar.cse20 C June 8, 2022, 9:54 a.m. OK PyPy 3-64 TESTS 9 264 49868800 800
159906909 kaustavshouvik C June 8, 2022, 6:40 a.m. OK PyPy 3-64 TESTS 9 482 33996800 800
159963640 samchen123 C June 8, 2022, 6:06 p.m. OK PyPy 3-64 TESTS 9 514 33689600 800
159981462 MistaAsh C June 9, 2022, 2:46 a.m. OK PyPy 3-64 TESTS 9 530 38604800 800
159937283 crapcode C June 8, 2022, 12:37 p.m. OK PyPy 3-64 TESTS 9 530 39116800 800
159975097 pirate0 C June 8, 2022, 10:18 p.m. OK PyPy 3-64 TESTS 9 545 29696000 800
159949826 Juanm1 C June 8, 2022, 3:06 p.m. OK PyPy 3-64 TESTS 9 561 38502400 800
159929490 piSquared C June 8, 2022, 11:11 a.m. OK PyPy 3-64 TESTS 9 561 40448000 800
159954117 ARobakidze C June 8, 2022, 4:01 p.m. OK Python 3 TESTS 9 389 20172800 800
159985257 rostoki C June 9, 2022, 4:29 a.m. OK Python 3 TESTS 9 389 22937600 800
159926126 sixthcore C June 8, 2022, 10:31 a.m. OK Python 3 TESTS 9 389 23040000 800
159964474 Raghav_drago C June 8, 2022, 6:17 p.m. OK Python 3 TESTS 9 404 19968000 800
159919753 chaotic28 C June 8, 2022, 9:18 a.m. OK Python 3 TESTS 9 404 22630400 800
159959228 Mariee7 C June 8, 2022, 5:10 p.m. OK Python 3 TESTS 9 467 20377600 800
159917564 Ilya_Is2022 C June 8, 2022, 8:55 a.m. OK Python 3 TESTS 9 545 20377600 800
159935715 HelloWorld2002 C June 8, 2022, 12:20 p.m. OK Python 3 TESTS 9 546 20480000 800
159958807 abhipraay C June 8, 2022, 5:05 p.m. OK Python 3 TESTS 9 560 24064000 800
159952074 looser_1234 C June 8, 2022, 3:36 p.m. OK Python 3 TESTS 9 561 20377600 800

remove filters

Back to search problems