Codeforces Raif Round 1 (Div. 1 + 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
1428 Codeforces Raif Round 1 (Div. 1 + Div. 2) FINISHED False 9000 128883299 Oct. 17, 2020, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4514 ) D Bouncing Boomerangs PROGRAMMING constructive algorithms greedy

B"To improve the boomerang throwing skills of the animals, Zookeeper has set up an n x n grid with some targets, where each row and each column has at most 2 targets each. The rows are numbered from 1 to n from top to bottom, and the columns are numbered from 1 to n from left to right. For each column, Zookeeper will throw a boomerang from the bottom of the column (below the grid) upwards. When the boomerang hits any target, it will bounce off, make a 90 degree turn to the right and fly off in a straight line in its new direction. The boomerang can hit multiple targets and does not stop until it leaves the grid. In the above example, n=6 and the black crosses are the targets. The boomerang in column 1 (blue arrows) bounces 2 times while the boomerang in column 3 (red arrows) bounces 3 times. The boomerang in column i hits exactly a_i targets before flying out of the grid. It is known that a_i <= q 3 . However, Zookeeper has lost the original positions of the targets. Thus, he asks you to construct a valid configuration of targets that matches the number of hits for each column, or tell him that no such configuration exists. If multiple valid configurations exist, you may print any of them. The first line contains a single integer n (1 <= q n <= q 10^5) . The next line contains n integers a_1,a_2, ldots,a_n (0 <= q a_i <= q 3) . If no configuration of targets exist, print -1 . Otherwise, on the first line print a single integer t (0 <= q t <= q 2n) : the number of targets in your configuration. Then print t lines with two spaced integers each per line. Each line should contain two integers r and c (1 <= q r,c <= q n) , where r is the target's row and c is the target's column. All targets should be different. Every row and every column in your configuration should have at most tw"...

Tutorials

Codeforces Raif Round 1 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
95818218 fishcathu. D Oct. 17, 2020, 6 p.m. OK GNU C++11 TESTS 127 46 2457600
95807430 QwQcOrZ D Oct. 17, 2020, 3:34 p.m. OK GNU C++11 TESTS 127 46 3379200
95836517 TLE_Automat D Oct. 18, 2020, 3:09 a.m. OK GNU C++11 TESTS 127 46 3584000
95838285 S-X-Y D Oct. 18, 2020, 3:59 a.m. OK GNU C++11 TESTS 127 62 3276800
95802458 qianj D Oct. 17, 2020, 3:21 p.m. OK GNU C++11 TESTS 127 62 4608000
95831180 Daniel_Jiang D Oct. 17, 2020, 11:17 p.m. OK GNU C++11 TESTS 127 77 4198400
95831807 Breeze_Ender D Oct. 17, 2020, 11:52 p.m. OK GNU C++11 TESTS 127 77 4198400
95811647 jzp D Oct. 17, 2020, 4:34 p.m. OK GNU C++11 TESTS 127 78 1638400
95841331 Tommy0103 D Oct. 18, 2020, 5:16 a.m. OK GNU C++11 TESTS 127 78 2252800
95835954 Kotoriqaq D Oct. 18, 2020, 2:51 a.m. OK GNU C++11 TESTS 127 78 2457600
95837355 arex0 D Oct. 18, 2020, 3:32 a.m. OK GNU C++14 TESTS 127 77 2355200
95843331 _Backl1ght D Oct. 18, 2020, 5:55 a.m. OK GNU C++14 TESTS 127 77 5836800
95817222 pikmike D Oct. 17, 2020, 5:44 p.m. OK GNU C++14 TESTS 127 78 4198400
95834647 4790iop D Oct. 18, 2020, 2:07 a.m. OK GNU C++14 TESTS 127 78 4710400
95833707 MackereI_Pike D Oct. 18, 2020, 1:30 a.m. OK GNU C++14 TESTS 127 78 6451200
95838586 charcoalAbbys D Oct. 18, 2020, 4:07 a.m. OK GNU C++14 TESTS 127 93 409600
95803037 byjiang98 D Oct. 17, 2020, 3:22 p.m. OK GNU C++14 TESTS 127 93 2969600
95833482 StevenZhu D Oct. 18, 2020, 1:21 a.m. OK GNU C++14 TESTS 127 93 3788800
95837786 scy_666 D Oct. 18, 2020, 3:45 a.m. OK GNU C++14 TESTS 127 93 3993600
95813287 OfTheSharingan D Oct. 17, 2020, 4:51 p.m. OK GNU C++14 TESTS 127 93 3993600
95834468 PointBlank D Oct. 18, 2020, 2 a.m. OK GNU C++17 TESTS 127 92 4608000
95812695 hefan D Oct. 17, 2020, 4:43 p.m. OK GNU C++17 TESTS 127 93 1638400
95800603 Nekan D Oct. 17, 2020, 3:15 p.m. OK GNU C++17 TESTS 127 93 2150400
95804205 sakib_muhit D Oct. 17, 2020, 3:26 p.m. OK GNU C++17 TESTS 127 93 2355200
95823850 gustavo_m32 D Oct. 17, 2020, 7:36 p.m. OK GNU C++17 TESTS 127 93 3276800
95812090 aneee D Oct. 17, 2020, 4:37 p.m. OK GNU C++17 TESTS 127 93 3584000
95802349 Mtdrewski D Oct. 17, 2020, 3:20 p.m. OK GNU C++17 TESTS 127 93 3788800
95821553 feast D Oct. 17, 2020, 6:53 p.m. OK GNU C++17 TESTS 127 93 3891200
95802259 yzxx D Oct. 17, 2020, 3:20 p.m. OK GNU C++17 TESTS 127 93 3993600
95828143 peti1234 D Oct. 17, 2020, 9:17 p.m. OK GNU C++17 TESTS 127 93 3993600
95818234 raynor30 D Oct. 17, 2020, 6:01 p.m. OK GNU C++17 (64) TESTS 127 46 8294400
95812586 dannyboy20031204 D Oct. 17, 2020, 4:42 p.m. OK GNU C++17 (64) TESTS 127 77 4608000
95821481 risujiroh D Oct. 17, 2020, 6:52 p.m. OK GNU C++17 (64) TESTS 127 77 4710400
95801795 Rahul D Oct. 17, 2020, 3:19 p.m. OK GNU C++17 (64) TESTS 127 77 4710400
95820946 universe- D Oct. 17, 2020, 6:43 p.m. OK GNU C++17 (64) TESTS 127 77 4812800
95815904 arwaeystoamneg D Oct. 17, 2020, 5:25 p.m. OK GNU C++17 (64) TESTS 127 77 5017600
95819603 chemthan D Oct. 17, 2020, 6:21 p.m. OK GNU C++17 (64) TESTS 127 77 5017600
95819419 alimq D Oct. 17, 2020, 6:19 p.m. OK GNU C++17 (64) TESTS 127 77 5017600
95833459 Anachor D Oct. 18, 2020, 1:20 a.m. OK GNU C++17 (64) TESTS 127 77 5120000
95834582 yuruhiya D Oct. 18, 2020, 2:04 a.m. OK GNU C++17 (64) TESTS 127 77 5120000
95802321 maguroguma D Oct. 17, 2020, 3:20 p.m. OK Go TESTS 127 108 9728000
95832572 ccppjsrb D Oct. 18, 2020, 12:35 a.m. OK Go TESTS 127 124 9113600
95842097 vipin__sharma D Oct. 18, 2020, 5:32 a.m. OK Java 11 TESTS 127 280 0
95814933 Yuki_B D Oct. 17, 2020, 5:12 p.m. OK Java 11 TESTS 127 295 4403200
95838130 Agnimandur D Oct. 18, 2020, 3:55 a.m. OK Java 11 TESTS 127 296 4096000
95827209 b0bl0blaw D Oct. 17, 2020, 8:51 p.m. OK Java 11 TESTS 127 311 3072000
95798543 blackBird D Oct. 17, 2020, 3:09 p.m. OK Java 11 TESTS 127 311 7475200
95799263 atishay127 D Oct. 17, 2020, 3:11 p.m. OK Java 11 TESTS 127 311 9728000
95804693 hakr_2104 D Oct. 17, 2020, 3:27 p.m. OK Java 11 TESTS 127 343 4505600
95811960 Ste D Oct. 17, 2020, 4:36 p.m. OK Java 11 TESTS 127 343 5120000
95798978 chris_11 D Oct. 17, 2020, 3:10 p.m. OK Java 11 TESTS 127 389 5120000
95803795 tusharjape007 D Oct. 17, 2020, 3:25 p.m. OK Java 11 TESTS 127 420 11161600
95826744 HarnoorSta7 D Oct. 17, 2020, 8:39 p.m. OK Java 8 TESTS 127 171 7680000
95800692 a.wang D Oct. 17, 2020, 3:15 p.m. OK Java 8 TESTS 127 187 3174400
95826050 HarnoorSta7 D Oct. 17, 2020, 8:23 p.m. OK Java 8 TESTS 127 187 7680000
95824922 subhamdtu D Oct. 17, 2020, 7:58 p.m. OK Java 8 TESTS 127 202 0
95799105 derrick20 D Oct. 17, 2020, 3:11 p.m. OK Java 8 TESTS 127 217 9113600
95810022 ManchesterCityFC D Oct. 17, 2020, 4:22 p.m. OK Java 8 TESTS 127 218 0
95811059 MartyByrde D Oct. 17, 2020, 4:29 p.m. OK Java 8 TESTS 127 218 0
95798504 Xylenox D Oct. 17, 2020, 3:09 p.m. OK Java 8 TESTS 127 218 2252800
95803202 guoyihua D Oct. 17, 2020, 3:23 p.m. OK Java 8 TESTS 127 218 4198400
95841398 Taran_1407 D Oct. 18, 2020, 5:18 a.m. OK Java 8 TESTS 127 218 4812800
95812327 Tlatoani D Oct. 17, 2020, 4:40 p.m. OK Kotlin TESTS 127 327 23244800
95810618 Tampere D Oct. 17, 2020, 4:26 p.m. OK MS C++ TESTS 127 1684 10342400
95811106 baep_j D Oct. 17, 2020, 4:29 p.m. OK MS C++ 2017 TESTS 127 124 4915200
95810266 P___ D Oct. 17, 2020, 4:24 p.m. OK MS C++ 2017 TESTS 127 124 7782400
95813744 Numbervan D Oct. 17, 2020, 4:56 p.m. OK MS C++ 2017 TESTS 127 296 3993600
95808071 sdjenjer D Oct. 17, 2020, 3:34 p.m. OK MS C++ 2017 TESTS 127 311 4403200
95823570 zarkdavor D Oct. 17, 2020, 7:30 p.m. OK MS C++ 2017 TESTS 127 904 5529600
95800442 Dmitrenko D Oct. 17, 2020, 3:15 p.m. OK MS C++ 2017 TESTS 127 936 5529600
95825171 AnnSuperstar D Oct. 17, 2020, 8:03 p.m. OK MS C++ 2017 TESTS 127 951 8806400
95814787 Flighter D Oct. 17, 2020, 5:10 p.m. OK MS C++ 2017 TESTS 127 951 9216000
95825104 R1val D Oct. 17, 2020, 8:02 p.m. OK .NET Core C# TESTS 127 186 23040000
95809912 MyEighthName D Oct. 17, 2020, 4:22 p.m. OK .NET Core C# TESTS 127 748 17715200
95803110 weto D Oct. 17, 2020, 3:23 p.m. OK Node.js TESTS 127 1981 30924800
95811572 beethoven97 D Oct. 17, 2020, 4:33 p.m. OK PyPy 2 TESTS 127 202 22220800
95800223 bazzyadb D Oct. 17, 2020, 3:14 p.m. OK PyPy 2 TESTS 127 249 25395200
95818380 shehebe D Oct. 17, 2020, 6:03 p.m. OK PyPy 2 TESTS 127 311 20889600
95843705 Anuranjan_Pandey D Oct. 18, 2020, 6:01 a.m. OK PyPy 3 TESTS 127 249 15462400
95821989 manhar D Oct. 17, 2020, 7:01 p.m. OK PyPy 3 TESTS 127 265 15667200
95802348 deepanshu_pali D Oct. 17, 2020, 3:20 p.m. OK PyPy 3 TESTS 127 312 18636800
95819008 ulyabelyaeva D Oct. 17, 2020, 6:12 p.m. OK PyPy 3 TESTS 127 358 25702400
95811221 tiwari0000 D Oct. 17, 2020, 4:30 p.m. OK PyPy 3 TESTS 127 390 32358400
95822169 upadhyay.aaditya2001 D Oct. 17, 2020, 7:05 p.m. OK PyPy 3 TESTS 127 405 32563200
95816402 KnightKnight D Oct. 17, 2020, 5:32 p.m. OK PyPy 3 TESTS 127 421 33996800
95802704 pemukl D Oct. 17, 2020, 3:21 p.m. OK PyPy 3 TESTS 127 436 13721600
95807532 throwawayatcoder D Oct. 17, 2020, 3:34 p.m. OK PyPy 3 TESTS 127 451 36249600
95839591 YMSeah D Oct. 18, 2020, 4:37 a.m. OK PyPy 3 TESTS 127 451 37683200
95839533 nwi D Oct. 18, 2020, 4:35 a.m. OK Python 2 TESTS 127 467 25702400
95836383 AdarshSrivastav D Oct. 18, 2020, 3:05 a.m. OK Python 3 TESTS 127 826 15052800
95802929 sonya123 D Oct. 17, 2020, 3:22 p.m. OK Python 3 TESTS 127 842 13926400
95835343 Googler437 D Oct. 18, 2020, 2:30 a.m. OK Python 3 TESTS 127 857 14745600
95822953 sul3 D Oct. 17, 2020, 7:19 p.m. OK Python 3 TESTS 127 873 19456000
95810557 sh1194 D Oct. 17, 2020, 4:25 p.m. OK Python 3 TESTS 127 888 14745600
95842270 sansen D Oct. 18, 2020, 5:35 a.m. OK Rust TESTS 127 62 4915200
95843629 terraformer D Oct. 18, 2020, 6 a.m. OK Rust TESTS 127 1794 7270400
95830335 Kaa D Oct. 17, 2020, 10:39 p.m. OK Rust TESTS 127 1902 4915200

remove filters

Back to search problems