Educational Codeforces Round 83 (Rated for 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
1312 Educational Codeforces Round 83 (Rated for Div. 2) FINISHED False 7200 153588311 March 9, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 926 ) F Attack on Red Kingdom PROGRAMMING games two pointers

B'The Red Kingdom is attacked by the White King and the Black King! The Kingdom is guarded by n castles, the i -th castle is defended by a_i soldiers. To conquer the Red Kingdom, the Kings have to eliminate all the defenders. Each day the White King launches an attack on one of the castles. Then, at night, the forces of the Black King attack a castle (possibly the same one). Then the White King attacks a castle, then the Black King, and so on. The first attack is performed by the White King. Each attack must target a castle with at least one alive defender in it. There are three types of attacks: The mixed attack can be launched at any valid target (at any castle with at least one soldier). However, the infantry attack cannot be launched if the previous attack on the targeted castle had the same type, no matter when and by whom it was launched. The same applies to the cavalry attack. A castle that was not attacked at all can be targeted by any type of attack. The King who launches the last attack will be glorified as the conqueror of the Red Kingdom, so both Kings want to launch the last attack (and they are wise enough to find a strategy that allows them to do it no matter what are the actions of their opponent, if such strategy exists). The White King is leading his first attack, and you are responsible for planning it. Can you calculate the number of possible options for the first attack that allow the White King to launch the last attack? Each option for the first attack is represented by the targeted castle and the type of attack, and two options are different if the targeted castles or the types of attack are different. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then, the test cases follow. Each test case is represented by two lines. The first line contains four integers n , x , y and z ( 1 <= n <= 3 cdot 10^5 , 1 <= x, y, z <= 5 ). The secon'...

Tutorials

74640

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
72835455 rainboy F March 9, 2020, 4:22 p.m. OK GNU C11 TESTS 21 109 7577600
72862696 GCCCCCCC F March 10, 2020, 1:45 a.m. OK GNU C++11 TESTS 21 61 6041600
72895165 Frame233 F March 10, 2020, 1:20 p.m. OK GNU C++11 TESTS 21 62 1433600
72997483 hdu_daicon F March 12, 2020, 5:37 a.m. OK GNU C++11 TESTS 21 62 2355200
72842925 JoneySun F March 9, 2020, 5:21 p.m. OK GNU C++11 TESTS 21 62 2457600
72934662 UniverseofHK F March 11, 2020, 6:21 a.m. OK GNU C++11 TESTS 21 62 2457600
72861963 deafff F March 10, 2020, 1:12 a.m. OK GNU C++11 TESTS 21 62 4198400
72935671 BBumblebee F March 11, 2020, 6:42 a.m. OK GNU C++11 TESTS 21 62 7270400
72879906 Backseat-Stargazer F March 10, 2020, 8:50 a.m. OK GNU C++11 TESTS 21 62 8294400
73385249 luotc_why F March 16, 2020, 6:36 a.m. OK GNU C++11 TESTS 21 62 11980800
72861975 Sooke F March 10, 2020, 1:13 a.m. OK GNU C++11 TESTS 21 62 25190400
72873421 rfpermen F March 10, 2020, 6:48 a.m. OK GNU C++14 TESTS 21 140 2662400
73109719 MarcosK F March 12, 2020, 11:44 p.m. OK GNU C++14 TESTS 21 140 5120000
73094444 amokrousov F March 12, 2020, 5:48 p.m. OK GNU C++14 TESTS 21 140 6144000
72854811 MatheusLealV F March 9, 2020, 8:34 p.m. OK GNU C++14 TESTS 21 140 15769600
72841760 yan-zp F March 9, 2020, 5:06 p.m. OK GNU C++14 TESTS 21 155 2457600
72830851 upobir F March 9, 2020, 4:01 p.m. OK GNU C++14 TESTS 21 155 2457600
72937178 jairadheyshyam F March 11, 2020, 7:15 a.m. OK GNU C++14 TESTS 21 155 2457600
73337288 mth1908 F March 15, 2020, 1:16 p.m. OK GNU C++14 TESTS 21 155 2560000
72859433 madhav_1999 F March 9, 2020, 11:02 p.m. OK GNU C++14 TESTS 21 155 2560000
73485078 master4589 F March 17, 2020, 12:40 p.m. OK GNU C++14 TESTS 21 155 2560000
72843298 limbo.null F March 9, 2020, 5:26 p.m. OK GNU C++17 TESTS 21 62 2662400
72836440 neal F March 9, 2020, 4:26 p.m. OK GNU C++17 TESTS 21 77 2560000
72821962 LayCurse F March 9, 2020, 3:27 p.m. OK GNU C++17 TESTS 21 93 4505600
72861971 Marckess F March 10, 2020, 1:13 a.m. OK GNU C++17 TESTS 21 124 2969600
72982366 sudoBug F March 11, 2020, 7:58 p.m. OK GNU C++17 TESTS 21 140 2560000
72862299 Marckess F March 10, 2020, 1:28 a.m. OK GNU C++17 TESTS 21 140 2969600
73589247 forgiveself F March 18, 2020, 4:26 p.m. OK GNU C++17 TESTS 21 155 2560000
73588992 forgiveself F March 18, 2020, 4:24 p.m. OK GNU C++17 TESTS 21 155 2560000
73444355 peterr F March 16, 2020, 10:56 p.m. OK GNU C++17 TESTS 21 155 2560000
73601191 emma F March 18, 2020, 6:52 p.m. OK GNU C++17 TESTS 21 155 2560000
72822653 uwi F March 9, 2020, 3:29 p.m. OK Java 11 TESTS 21 608 0
72836395 Musin F March 9, 2020, 4:26 p.m. OK Java 11 TESTS 21 1872 0
72883375 polyakoff F March 10, 2020, 9:56 a.m. OK Java 8 TESTS 21 358 36044800
72883425 polyakoff F March 10, 2020, 9:57 a.m. OK Java 8 TESTS 21 389 35942400
72828835 Harpae F March 9, 2020, 3:53 p.m. OK Java 8 TESTS 21 530 35328000
73537985 Spheniscine F March 18, 2020, 4:34 a.m. OK Kotlin TESTS 21 311 38707200
73538813 Spheniscine F March 18, 2020, 4:56 a.m. OK Kotlin TESTS 21 327 38707200
72834289 elizarov F March 9, 2020, 4:16 p.m. OK Kotlin TESTS 21 716 41881600
73006974 SlavaG F March 12, 2020, 8:49 a.m. OK Kotlin TESTS 21 794 37171200
72834872 pichulia F March 9, 2020, 4:19 p.m. OK MS C++ 2017 TESTS 21 171 2969600
72837753 alexwice F March 9, 2020, 4:32 p.m. OK PyPy 2 TESTS 21 670 41164800
72835676 pajenegod F March 9, 2020, 4:23 p.m. OK PyPy 2 TESTS 21 1513 49356800
72837872 pineriver F March 9, 2020, 4:32 p.m. OK PyPy 3 TESTS 21 592 49561600
72869922 sansen F March 10, 2020, 5:43 a.m. OK Rust TESTS 21 77 12595200
72862308 sansen F March 10, 2020, 1:28 a.m. OK Rust TESTS 21 780 12595200

remove filters

Back to search problems