Codeforces Round 741 (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
1562 Codeforces Round 741 (Div. 2) FINISHED False 8100 101834699 Aug. 26, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6366 ) D1 Two Hundred Twenty One (easy version) PROGRAMMING constructive algorithms dp math

B"This is the easy version of the problem. The difference between the versions is that the easy version does not require you to output the numbers of the rods to be removed. You can make hacks only if all versions of the problem are solved. Stitch likes experimenting with different machines with his friend Sparky. Today they built another machine. The main element of this machine are n rods arranged along one straight line and numbered from 1 to n inclusive. Each of these rods must carry an electric charge quantitatively equal to either 1 or -1 (otherwise the machine will not work). Another condition for this machine to work is that the sign-variable sum of the charge on all rods must be zero. More formally, the rods can be represented as an array of n numbers characterizing the charge: either 1 or -1 . Then the condition must hold: a_1 - a_2 + a_3 - a_4 + ldots = 0 , or sum limits_{i=1}^n (-1)^{i-1} cdot a_i = 0 . Sparky charged all n rods with an electric current, but unfortunately it happened that the rods were not charged correctly (the sign-variable sum of the charge is not zero). The friends decided to leave only some of the rods in the machine. Sparky has q questions. In the i th question Sparky asks: if the machine consisted only of rods with numbers l_i to r_i inclusive, what minimal number of rods could be removed from the machine so that the sign-variable sum of charges on the remaining ones would be zero? Perhaps the friends got something wrong, and the sign-variable sum is already zero. In that case, you don't have to remove the rods at all. If the number of rods is zero, we will assume that the sign-variable sum of charges is zero, that is, we can always remove all rods. Help your friends and answer all of Sparky's questions! Each test contains multiple test cases. The first line contains one positive integer t ( 1 <= t <= 10^3 ), denoting the n"...

Tutorials

Editorial of Codeforces Round 741 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
127152244 Anhng.194 D1 Aug. 27, 2021, 2:49 a.m. OK FPC TESTS 48 982 4608000
127128122 36champ D1 Aug. 26, 2021, 5:41 p.m. OK GNU C11 TESTS 48 1169 8806400
127128911 kkkingking D1 Aug. 26, 2021, 5:45 p.m. OK GNU C++14 TESTS 48 155 5222400
127144583 sosolikem D1 Aug. 26, 2021, 11 p.m. OK GNU C++14 TESTS 48 155 7680000
127151351 yiwu D1 Aug. 27, 2021, 2:31 a.m. OK GNU C++14 TESTS 48 156 5222400
127153978 rain__forest D1 Aug. 27, 2021, 3:20 a.m. OK GNU C++14 TESTS 48 171 5222400
127151696 luogu_bot1 D1 Aug. 27, 2021, 2:39 a.m. OK GNU C++14 TESTS 48 171 5222400
127151071 invaded D1 Aug. 27, 2021, 2:25 a.m. OK GNU C++14 TESTS 48 171 5222400
127148536 pufanyi D1 Aug. 27, 2021, 1:31 a.m. OK GNU C++14 TESTS 48 171 5222400
127147920 1443356159 D1 Aug. 27, 2021, 1:17 a.m. OK GNU C++14 TESTS 48 171 5222400
127154743 dongruixuan D1 Aug. 27, 2021, 3:32 a.m. OK GNU C++14 TESTS 48 171 5222400
127146882 dottle D1 Aug. 27, 2021, 12:47 a.m. OK GNU C++14 TESTS 48 171 6246400
127146274 Vilespine_Slayer D1 Aug. 27, 2021, 12:24 a.m. OK GNU C++17 TESTS 48 156 5222400
127154024 jiang_jiang D1 Aug. 27, 2021, 3:21 a.m. OK GNU C++17 TESTS 48 171 5222400
127153541 Mxrush D1 Aug. 27, 2021, 3:13 a.m. OK GNU C++17 TESTS 48 171 5222400
127152861 lipeiyuan D1 Aug. 27, 2021, 3:01 a.m. OK GNU C++17 TESTS 48 171 5222400
127150695 Superme.. D1 Aug. 27, 2021, 2:17 a.m. OK GNU C++17 TESTS 48 171 5222400
127147048 jiuzhe123456789 D1 Aug. 27, 2021, 12:52 a.m. OK GNU C++17 TESTS 48 171 5222400
127124890 2020hduyz D1 Aug. 26, 2021, 4:48 p.m. OK GNU C++17 TESTS 48 171 5222400
127154221 Dreamfarer D1 Aug. 27, 2021, 3:24 a.m. OK GNU C++17 TESTS 48 171 5222400
127146321 mc._cari D1 Aug. 27, 2021, 12:26 a.m. OK GNU C++17 TESTS 48 171 7372800
127150683 debajyoti123 D1 Aug. 27, 2021, 2:17 a.m. OK GNU C++17 TESTS 48 186 5222400
127149168 uuku D1 Aug. 27, 2021, 1:44 a.m. OK GNU C++17 (64) TESTS 48 62 11264000
127148497 linxd D1 Aug. 27, 2021, 1:30 a.m. OK GNU C++17 (64) TESTS 48 124 5836800
127160543 dakansa D1 Aug. 27, 2021, 5:09 a.m. OK GNU C++17 (64) TESTS 48 139 6553600
127158697 Senoia17 D1 Aug. 27, 2021, 4:41 a.m. OK GNU C++17 (64) TESTS 48 140 5734400
127147290 BoringHacker D1 Aug. 27, 2021, 1 a.m. OK GNU C++17 (64) TESTS 48 140 5836800
127135536 pluto_ish D1 Aug. 26, 2021, 6:51 p.m. OK GNU C++17 (64) TESTS 48 140 5836800
127152161 Nicolas125841 D1 Aug. 27, 2021, 2:48 a.m. OK GNU C++17 (64) TESTS 48 140 6553600
127159801 Aman_j1 D1 Aug. 27, 2021, 4:57 a.m. OK GNU C++17 (64) TESTS 48 140 6553600
127152360 AutumnKite D1 Aug. 27, 2021, 2:51 a.m. OK GNU C++17 (64) TESTS 48 140 6553600
127151847 icey_z D1 Aug. 27, 2021, 2:41 a.m. OK GNU C++17 (64) TESTS 48 140 6553600
127122221 akash132 D1 Aug. 26, 2021, 4:41 p.m. OK Java 11 TESTS 48 249 24371200
127123881 SavageClown007 D1 Aug. 26, 2021, 4:46 p.m. OK Java 11 TESTS 48 264 24371200
127143614 _Body D1 Aug. 26, 2021, 10:14 p.m. OK Java 11 TESTS 48 265 24371200
127142245 pili D1 Aug. 26, 2021, 9:20 p.m. OK Java 11 TESTS 48 265 24371200
127123548 Apocellipse D1 Aug. 26, 2021, 4:45 p.m. OK Java 11 TESTS 48 342 24371200
127128706 LiandrysAnguish D1 Aug. 26, 2021, 5:44 p.m. OK Java 11 TESTS 48 343 30924800
127139320 Ste D1 Aug. 26, 2021, 7:58 p.m. OK Java 11 TESTS 48 358 24371200
127141548 tushar19280 D1 Aug. 26, 2021, 8:57 p.m. OK Java 11 TESTS 48 358 24371200
127124750 nicoladeveloper D1 Aug. 26, 2021, 4:47 p.m. OK Java 11 TESTS 48 420 27750400
127128728 ayush__1411 D1 Aug. 26, 2021, 5:44 p.m. OK Java 11 TESTS 48 421 24371200
127123648 fan_balae D1 Aug. 26, 2021, 4:45 p.m. OK Java 8 TESTS 48 233 20992000
127141226 invincible777 D1 Aug. 26, 2021, 8:47 p.m. OK Java 8 TESTS 48 249 21094400
127141033 2020akadaver D1 Aug. 26, 2021, 8:41 p.m. OK Java 8 TESTS 48 265 21094400
127122807 edenSpace D1 Aug. 26, 2021, 4:43 p.m. OK Java 8 TESTS 48 280 21094400
127127641 RonWonWon D1 Aug. 26, 2021, 5:40 p.m. OK Java 8 TESTS 48 311 21094400
127128971 aryan_rn D1 Aug. 26, 2021, 5:45 p.m. OK Java 8 TESTS 48 327 21094400
127155911 smahajan54842 D1 Aug. 27, 2021, 3:52 a.m. OK Java 8 TESTS 48 327 21196800
127122569 SlowLegendaryNoobMaster D1 Aug. 26, 2021, 4:42 p.m. OK Java 8 TESTS 48 327 23244800
127122293 ostroumov D1 Aug. 26, 2021, 4:42 p.m. OK Kotlin TESTS 48 233 21094400
127124674 pallav12 D1 Aug. 26, 2021, 4:47 p.m. OK Kotlin TESTS 48 483 31539200
127123842 laboba D1 Aug. 26, 2021, 4:45 p.m. OK MS C++ 2017 TESTS 48 249 6144000
127124817 porridge_tl D1 Aug. 26, 2021, 4:48 p.m. OK MS C++ 2017 TESTS 48 249 8806400
127160728 whatcan1say D1 Aug. 27, 2021, 5:11 a.m. OK MS C++ 2017 TESTS 48 685 12697600
127130559 utsavm D1 Aug. 26, 2021, 5:56 p.m. OK MS C++ 2017 TESTS 48 1840 5734400
127128721 Tangerine D1 Aug. 26, 2021, 5:44 p.m. OK MS C++ 2017 TESTS 48 1965 6963200
127144364 guanghechen D1 Aug. 26, 2021, 10:50 p.m. OK Node.js TESTS 48 389 63897600
127145013 guanghechen D1 Aug. 26, 2021, 11:23 p.m. OK Node.js TESTS 48 389 81305600
127145060 guanghechen D1 Aug. 26, 2021, 11:26 p.m. OK Node.js TESTS 48 467 72396800
127146361 guanghechen D1 Aug. 27, 2021, 12:27 a.m. OK Node.js TESTS 48 483 56934400
127146345 guanghechen D1 Aug. 27, 2021, 12:27 a.m. OK Node.js TESTS 48 499 117452800
127155168 jerinjoseantony D1 Aug. 27, 2021, 3:40 a.m. OK PyPy 3 TESTS 48 312 40448000
127154728 nicku123 D1 Aug. 27, 2021, 3:32 a.m. OK PyPy 3 TESTS 48 312 40448000
127143757 beethoven97 D1 Aug. 26, 2021, 10:20 p.m. OK PyPy 3 TESTS 48 436 45260800
127134661 innocent_SINNER D1 Aug. 26, 2021, 6:40 p.m. OK PyPy 3 TESTS 48 592 54886400
127137902 Inferno2332 D1 Aug. 26, 2021, 7:29 p.m. OK PyPy 3 TESTS 48 779 31129600
127133327 Granebo D1 Aug. 26, 2021, 6:23 p.m. OK PyPy 3 TESTS 48 780 30924800
127123476 aberent D1 Aug. 26, 2021, 4:45 p.m. OK PyPy 3 TESTS 48 826 30412800
127151709 Virender D1 Aug. 27, 2021, 2:39 a.m. OK PyPy 3 TESTS 48 826 30924800
127135260 sushmanth.dampur8780 D1 Aug. 26, 2021, 6:47 p.m. OK PyPy 3 TESTS 48 842 31436800
127123552 RANK1ZEN D1 Aug. 26, 2021, 4:45 p.m. OK PyPy 3 TESTS 48 857 30822400
127125340 acorn11 D1 Aug. 26, 2021, 4:48 p.m. OK Python 2 TESTS 48 967 13004800
127160859 ankit_64 D1 Aug. 27, 2021, 5:13 a.m. OK Python 3 TESTS 48 1029 15872000
127138280 sendnodes1 D1 Aug. 26, 2021, 7:36 p.m. OK Python 3 TESTS 48 1231 18022400
127149099 nsharc4 D1 Aug. 27, 2021, 1:43 a.m. OK Python 3 TESTS 48 1403 41984000
127123445 orazbek D1 Aug. 26, 2021, 4:44 p.m. OK Python 3 TESTS 48 1622 20889600
127154369 shiviDON D1 Aug. 27, 2021, 3:27 a.m. OK Python 3 TESTS 48 1778 31641600
127154063 randomln D1 Aug. 27, 2021, 3:22 a.m. OK Python 3 TESTS 48 1996 31232000

remove filters

Back to search problems