Codeforces Round 703 (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
1486 Codeforces Round 703 (Div. 2) FINISHED False 8100 118164299 Feb. 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25467 ) A Shifting Stacks PROGRAMMING greedy implementation

B"You have n stacks of blocks. The i -th stack contains h_i blocks and it's height is the number of blocks in it. In one move you can take a block from the i -th stack (if there is at least one block) and put it to the i + 1 -th stack. Can you make the sequence of heights strictly increasing? Note that the number of stacks always remains n : stacks don't disappear when they have 0 blocks. First line contains a single integer t (1 <= q t <= q 10^4) -- the number of test cases. The first line of each test case contains a single integer n (1 <= q n <= q 100) . The second line of each test case contains n integers h_i (0 <= q h_i <= q 10^9) -- starting heights of the stacks. It's guaranteed that the sum of all n does not exceed 10^4 . For each test case output YES if you can make the sequence of heights strictly increasing and NO otherwise. You may print each letter in any case (for example, YES, Yes, yes, yEs will all be recognized as positive answer). In the first test case there is no need to make any moves, the sequence of heights is already increasing. In the second test case we need to move one block from the first stack to the second. Then the heights become 0 1 . In the third test case we could move one block from the first stack to the second and then from the second to the third, which would make the heights 3 4 5 . In the fourth test case we can't make a move, but the sequence is not increasing, so the answer is NO. In the fifth test case we can only make one move (from the second to the third stack), which would make the heights 0 0 1 . Both 0 1 0 and 0 0 1 are not increasing sequences, so the answer is NO. "...

Tutorials

Codeforces Round #703 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
107884033 TobiasJacob A Feb. 18, 2021, 8:13 p.m. OK Clang++17 Diagnostics TESTS 28 140 0
107904895 Shakir1ahmed3 A Feb. 19, 2021, 4:58 a.m. OK GNU C11 TESTS 28 15 0
107903843 yubingzhe A Feb. 19, 2021, 4:44 a.m. OK GNU C11 TESTS 28 31 0
107898407 hnust_lineng A Feb. 19, 2021, 3:17 a.m. OK GNU C11 TESTS 28 46 0
107899481 KING-STAR A Feb. 19, 2021, 3:36 a.m. OK GNU C11 TESTS 28 46 0
107902094 sadia__168 A Feb. 19, 2021, 4:20 a.m. OK GNU C11 TESTS 28 46 0
107905844 Sevendeis A Feb. 19, 2021, 5:10 a.m. OK GNU C11 TESTS 28 46 0
107871183 Montferrat A Feb. 18, 2021, 5:49 p.m. OK GNU C11 TESTS 28 46 0
107878363 Asuramaru A Feb. 18, 2021, 6:52 p.m. OK GNU C11 TESTS 28 46 0
107885497 gxlois A Feb. 18, 2021, 8:42 p.m. OK GNU C11 TESTS 28 46 0
107897550 Raj_kumar_ray A Feb. 19, 2021, 3:01 a.m. OK GNU C11 TESTS 28 46 0
107891692 luyiming123 A Feb. 19, 2021, 12:08 a.m. OK GNU C++11 TESTS 28 15 0
107874449 aureg109 A Feb. 18, 2021, 6:12 p.m. OK GNU C++11 TESTS 28 15 0
107907224 2019gzez04 A Feb. 19, 2021, 5:28 a.m. OK GNU C++11 TESTS 28 15 0
107904709 YeeBy A Feb. 19, 2021, 4:56 a.m. OK GNU C++11 TESTS 28 15 0
107900128 sleep__ A Feb. 19, 2021, 3:47 a.m. OK GNU C++11 TESTS 28 15 0
107896855 zech A Feb. 19, 2021, 2:47 a.m. OK GNU C++11 TESTS 28 15 0
107896492 4790iop A Feb. 19, 2021, 2:38 a.m. OK GNU C++11 TESTS 28 15 0
107895366 NamelessOIer A Feb. 19, 2021, 2:11 a.m. OK GNU C++11 TESTS 28 15 0
107892149 wuyanyidui A Feb. 19, 2021, 12:28 a.m. OK GNU C++11 TESTS 28 15 0
107894888 vjudge1 A Feb. 19, 2021, 1:59 a.m. OK GNU C++11 TESTS 28 15 102400
107872602 rohittomar A Feb. 18, 2021, 5:58 p.m. OK GNU C++14 TESTS 28 15 0
107870061 all0fme A Feb. 18, 2021, 5:44 p.m. OK GNU C++14 TESTS 28 15 0
107870379 Bhj2001 A Feb. 18, 2021, 5:45 p.m. OK GNU C++14 TESTS 28 30 0
107873076 Mr.Doap A Feb. 18, 2021, 6:02 p.m. OK GNU C++14 TESTS 28 30 0
107890928 ritesh1340 A Feb. 18, 2021, 11:31 p.m. OK GNU C++14 TESTS 28 30 0
107876126 fancktol A Feb. 18, 2021, 6:28 p.m. OK GNU C++14 TESTS 28 30 0
107875034 palindroam A Feb. 18, 2021, 6:17 p.m. OK GNU C++14 TESTS 28 30 102400
107891233 ShubhamAvasthi A Feb. 18, 2021, 11:44 p.m. OK GNU C++14 TESTS 28 30 102400
107903674 bansaltanish149 A Feb. 19, 2021, 4:42 a.m. OK GNU C++14 TESTS 28 30 1228800
107909807 hn_16 A Feb. 19, 2021, 5:58 a.m. OK GNU C++14 TESTS 28 31 0
107899439 JFKL A Feb. 19, 2021, 3:35 a.m. OK GNU C++17 TESTS 28 30 0
107902375 karimconan A Feb. 19, 2021, 4:24 a.m. OK GNU C++17 TESTS 28 30 0
107902167 Queens1de A Feb. 19, 2021, 4:21 a.m. OK GNU C++17 TESTS 28 30 0
107902029 Queens1de A Feb. 19, 2021, 4:19 a.m. OK GNU C++17 TESTS 28 30 0
107900328 pegasus25 A Feb. 19, 2021, 3:50 a.m. OK GNU C++17 TESTS 28 30 0
107894297 Jywsuperman A Feb. 19, 2021, 1:43 a.m. OK GNU C++17 TESTS 28 30 0
107893281 rmn_5124 A Feb. 19, 2021, 1:12 a.m. OK GNU C++17 TESTS 28 30 0
107887041 younick A Feb. 18, 2021, 9:19 p.m. OK GNU C++17 TESTS 28 30 0
107885372 Abdallah0011 A Feb. 18, 2021, 8:40 p.m. OK GNU C++17 TESTS 28 30 0
107884926 sasha4 A Feb. 18, 2021, 8:30 p.m. OK GNU C++17 TESTS 28 30 0
107871372 prasanna2425 A Feb. 18, 2021, 5:50 p.m. OK GNU C++17 (64) TESTS 28 15 0
107872825 Felerius A Feb. 18, 2021, 6 p.m. OK GNU C++17 (64) TESTS 28 15 0
107875029 alif_cse_ju A Feb. 18, 2021, 6:17 p.m. OK GNU C++17 (64) TESTS 28 15 0
107883597 msee A Feb. 18, 2021, 8:06 p.m. OK GNU C++17 (64) TESTS 28 15 0
107885373 msee A Feb. 18, 2021, 8:40 p.m. OK GNU C++17 (64) TESTS 28 15 0
107895868 HER0_ZER0 A Feb. 19, 2021, 2:23 a.m. OK GNU C++17 (64) TESTS 28 15 0
107900529 Smit3949 A Feb. 19, 2021, 3:53 a.m. OK GNU C++17 (64) TESTS 28 15 0
107904900 shiraha A Feb. 19, 2021, 4:58 a.m. OK GNU C++17 (64) TESTS 28 15 0
107905888 Hidden_Tesla A Feb. 19, 2021, 5:11 a.m. OK GNU C++17 (64) TESTS 28 15 0
107910111 ten A Feb. 19, 2021, 6:01 a.m. OK GNU C++17 (64) TESTS 28 15 0
107903634 AiharaHonami A Feb. 19, 2021, 4:41 a.m. OK Go TESTS 28 296 0
107883462 jegfault A Feb. 18, 2021, 8:03 p.m. OK Haskell TESTS 28 46 102400
107905249 sf14t A Feb. 19, 2021, 5:03 a.m. OK Java 11 TESTS 28 171 0
107874762 CoronaTime A Feb. 18, 2021, 6:15 p.m. OK Java 11 TESTS 28 186 0
107900825 sumit_1002 A Feb. 19, 2021, 3:58 a.m. OK Java 11 TESTS 28 186 0
107875584 CoronaTime A Feb. 18, 2021, 6:23 p.m. OK Java 11 TESTS 28 186 0
107870893 manojthakur123450 A Feb. 18, 2021, 5:47 p.m. OK Java 11 TESTS 28 187 0
107900264 namitnayan A Feb. 19, 2021, 3:49 a.m. OK Java 11 TESTS 28 187 0
107872658 BlueBirdie A Feb. 18, 2021, 5:59 p.m. OK Java 11 TESTS 28 187 0
107870956 mr_white07 A Feb. 18, 2021, 5:48 p.m. OK Java 11 TESTS 28 187 0
107908177 jaysuryaray1998 A Feb. 19, 2021, 5:40 a.m. OK Java 11 TESTS 28 202 0
107902118 gAyan17 A Feb. 19, 2021, 4:20 a.m. OK Java 11 TESTS 28 202 0
107872127 O_E A Feb. 18, 2021, 5:55 p.m. OK Java 8 TESTS 28 124 0
107894451 luchy0120 A Feb. 19, 2021, 1:47 a.m. OK Java 8 TESTS 28 124 0
107885857 abdo123 A Feb. 18, 2021, 8:49 p.m. OK Java 8 TESTS 28 124 0
107885415 Adi_7861 A Feb. 18, 2021, 8:40 p.m. OK Java 8 TESTS 28 124 0
107877248 singhdhanwant A Feb. 18, 2021, 6:40 p.m. OK Java 8 TESTS 28 124 0
107871759 DemonSlayer18 A Feb. 18, 2021, 5:52 p.m. OK Java 8 TESTS 28 124 0
107870728 arpit_c10992 A Feb. 18, 2021, 5:46 p.m. OK Java 8 TESTS 28 139 0
107898311 Tawar1999 A Feb. 19, 2021, 3:15 a.m. OK Java 8 TESTS 28 139 0
107873566 darshan287 A Feb. 18, 2021, 6:05 p.m. OK Java 8 TESTS 28 139 0
107874535 simpissa A Feb. 18, 2021, 6:13 p.m. OK Java 8 TESTS 28 155 0
107874897 gaserashraf A Feb. 18, 2021, 6:16 p.m. OK MS C++ 2017 TESTS 28 31 0
107905972 jackcaptain A Feb. 19, 2021, 5:12 a.m. OK MS C++ 2017 TESTS 28 31 0
107901526 DongGu A Feb. 19, 2021, 4:11 a.m. OK MS C++ 2017 TESTS 28 31 0
107890823 wjli A Feb. 18, 2021, 11:26 p.m. OK MS C++ 2017 TESTS 28 31 0
107884490 BalaluevEgor A Feb. 18, 2021, 8:21 p.m. OK MS C++ 2017 TESTS 28 31 0
107878284 mnrmustafa A Feb. 18, 2021, 6:51 p.m. OK MS C++ 2017 TESTS 28 31 614400
107901350 kimxx A Feb. 19, 2021, 4:08 a.m. OK MS C++ 2017 TESTS 28 46 0
107901420 DongGu A Feb. 19, 2021, 4:09 a.m. OK MS C++ 2017 TESTS 28 46 0
107896900 jigsawzyx A Feb. 19, 2021, 2:48 a.m. OK MS C++ 2017 TESTS 28 46 0
107895254 Harshita_0304 A Feb. 19, 2021, 2:08 a.m. OK MS C++ 2017 TESTS 28 46 0
107871345 lukasrad02 A Feb. 18, 2021, 5:50 p.m. OK .NET Core C# TESTS 28 93 1843200
107876588 lukas_rimkus A Feb. 18, 2021, 6:32 p.m. OK Node.js TESTS 28 155 5529600
107876804 manasrajowar66 A Feb. 18, 2021, 6:35 p.m. OK Node.js TESTS 28 171 5324800
107896624 areniis A Feb. 19, 2021, 2:42 a.m. OK Node.js TESTS 28 171 6144000
107907974 MadinaN A Feb. 19, 2021, 5:37 a.m. OK PHP TESTS 28 46 409600
107885195 _aadiupadhyay_ A Feb. 18, 2021, 8:36 p.m. OK PyPy 3 TESTS 28 124 3481600
107884252 TheMisfits A Feb. 18, 2021, 8:17 p.m. OK PyPy 3 TESTS 28 124 3891200
107899381 contrastnull A Feb. 19, 2021, 3:34 a.m. OK PyPy 3 TESTS 28 139 3891200
107893907 Ilsa A Feb. 19, 2021, 1:32 a.m. OK PyPy 3 TESTS 28 140 3379200
107880192 evoxtorm A Feb. 18, 2021, 7:15 p.m. OK PyPy 3 TESTS 28 140 3788800
107874783 rajanabhishek12340 A Feb. 18, 2021, 6:15 p.m. OK PyPy 3 TESTS 28 155 3788800
107870335 khanter_ A Feb. 18, 2021, 5:45 p.m. OK PyPy 3 TESTS 28 155 3993600
107898357 Sahitya02 A Feb. 19, 2021, 3:16 a.m. OK PyPy 3 TESTS 28 155 4096000
107872548 MasterKali A Feb. 18, 2021, 5:58 p.m. OK PyPy 3 TESTS 28 155 4300800
107891431 happyn6s1 A Feb. 18, 2021, 11:55 p.m. OK PyPy 3 TESTS 28 155 4710400
107890521 sukriti A Feb. 18, 2021, 11:14 p.m. OK Python 2 TESTS 28 124 409600
107887470 rpfl A Feb. 18, 2021, 9:31 p.m. OK Python 3 TESTS 28 77 307200
107877042 eugalt A Feb. 18, 2021, 6:38 p.m. OK Python 3 TESTS 28 77 921600
107876925 eugalt A Feb. 18, 2021, 6:36 p.m. OK Python 3 TESTS 28 77 921600
107870242 sedenion A Feb. 18, 2021, 5:44 p.m. OK Python 3 TESTS 28 77 921600
107885162 Minim A Feb. 18, 2021, 8:35 p.m. OK Python 3 TESTS 28 93 307200
107877813 KrishNath A Feb. 18, 2021, 6:46 p.m. OK Python 3 TESTS 28 93 307200
107892135 aditya-singh A Feb. 19, 2021, 12:28 a.m. OK Python 3 TESTS 28 108 2764800
107870459 hogrider A Feb. 18, 2021, 5:45 p.m. OK Python 3 TESTS 28 124 307200
107910032 Yashyk456 A Feb. 19, 2021, 6:01 a.m. OK Python 3 TESTS 28 139 0
107903114 AufDeutschgibts A Feb. 19, 2021, 4:34 a.m. OK Python 3 TESTS 28 139 0

remove filters

Back to search problems