Educational Codeforces Round 112 (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
1555 Educational Codeforces Round 112 (Rated for Div. 2) FINISHED False 7200 109524263 July 30, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16274 ) B Two Tables PROGRAMMING brute force 1300

B"You have an axis-aligned rectangle room with width W and height H , so the lower left corner is in point (0, 0) and the upper right corner is in (W, H) . There is a rectangular table standing in this room. The sides of the table are parallel to the walls, the lower left corner is in (x_1, y_1) , and the upper right corner in (x_2, y_2) . You want to place another rectangular table in this room with width w and height h with the width of the table parallel to the width of the room. The problem is that sometimes there is not enough space to place the second table without intersecting with the first one (there are no problems with tables touching, though). You can't rotate any of the tables, but you can move the first table inside the room. What is the minimum distance you should move the first table to free enough space for the second one? The first line contains the single integer t ( 1 <= t <= 5000 ) -- the number of the test cases. The first line of each test case contains two integers W and H ( 1 <= W, H <= 10^8 ) -- the width and the height of the room. The second line contains four integers x_1 , y_1 , x_2 and y_2 ( 0 <= x_1 < x_2 <= W ; 0 <= y_1 < y_2 <= H ) -- the coordinates of the corners of the first table. The third line contains two integers w and h ( 1 <= w <= W ; 1 <= h <= H ) -- the width and the height of the second table. For each test case, print the minimum distance you should move the first table, or -1 if there is no way to free enough space for the second table. Your answer will be considered correct if its absolute or relative error doesn't exceed 10^{-6} . The configuration of the first test case is shown in the picture. But the movement of the first table is not optimal. One of the optimal movement, for example, is to move the table by (0, -1) , so the lower left corner will m"...

Tutorials

93389

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
124360152 gxlois B July 30, 2021, 7:21 p.m. OK D TESTS 3 15 3686400 1300
124342111 duongan B July 30, 2021, 4:34 p.m. OK FPC TESTS 3 31 3379200 1300
124339371 Anhng.194 B July 30, 2021, 4:28 p.m. OK FPC TESTS 3 31 3379200 1300
124383644 Kingjoke B July 31, 2021, 4:08 a.m. OK GNU C11 TESTS 3 31 3686400 1300
124339977 yycyyc B July 30, 2021, 4:29 p.m. OK GNU C11 TESTS 3 31 3686400 1300
124390034 milan_s1 B July 31, 2021, 5:45 a.m. OK GNU C11 TESTS 3 31 3686400 1300
124375199 BUM-YJL B July 31, 2021, 1:17 a.m. OK GNU C++11 TESTS 3 0 3686400 1300
124378022 TomiokapEace B July 31, 2021, 2:22 a.m. OK GNU C++11 TESTS 3 0 3891200 1300
124378803 Jerrylee B July 31, 2021, 2:38 a.m. OK GNU C++11 TESTS 3 15 3686400 1300
124391281 cyrxdzj B July 31, 2021, 6:02 a.m. OK GNU C++11 TESTS 3 15 3686400 1300
124386162 carrotqq B July 31, 2021, 4:50 a.m. OK GNU C++11 TESTS 3 15 3686400 1300
124385908 mao_zx B July 31, 2021, 4:46 a.m. OK GNU C++11 TESTS 3 15 3891200 1300
124385278 hxz12345 B July 31, 2021, 4:36 a.m. OK GNU C++11 TESTS 3 15 3891200 1300
124385045 long_2021 B July 31, 2021, 4:32 a.m. OK GNU C++11 TESTS 3 15 3891200 1300
124389279 luogu_bot1 B July 31, 2021, 5:35 a.m. OK GNU C++11 TESTS 3 15 3891200 1300
124390425 Nelson_Wang B July 31, 2021, 5:50 a.m. OK GNU C++11 TESTS 3 15 3891200 1300
124388967 hardy_9795 B July 31, 2021, 5:31 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124386054 mercuryVapor B July 31, 2021, 4:48 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124385605 Reddy_3.14 B July 31, 2021, 4:41 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124379820 Aman_Goyal29 B July 31, 2021, 2:57 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124379064 akhandagrwl_19 B July 31, 2021, 2:43 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124378501 Sawan_pateo B July 31, 2021, 2:33 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124376691 BIT.Cyman B July 31, 2021, 1:53 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124375617 daydreamer233 B July 31, 2021, 1:27 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124390319 p.ferrari B July 31, 2021, 5:49 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124390237 force1234 B July 31, 2021, 5:48 a.m. OK GNU C++14 TESTS 3 15 3686400 1300
124361797 Burazam B July 30, 2021, 7:41 p.m. OK GNU C++17 TESTS 3 0 3686400 1300
124361748 Kara_Shaman_Togai B July 30, 2021, 7:41 p.m. OK GNU C++17 TESTS 3 0 3686400 1300
124344263 FairoozR B July 30, 2021, 4:41 p.m. OK GNU C++17 TESTS 3 0 3686400 1300
124390146 _Sabib_ B July 31, 2021, 5:47 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124389738 varanshu B July 31, 2021, 5:41 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124389423 tonmoyk988 B July 31, 2021, 5:37 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124390547 ritvika30 B July 31, 2021, 5:52 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124390587 het_patel110 B July 31, 2021, 5:52 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124390447 amurto B July 31, 2021, 5:51 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124389822 keval604 B July 31, 2021, 5:42 a.m. OK GNU C++17 TESTS 3 15 3686400 1300
124354492 umitsaha B July 30, 2021, 6:10 p.m. OK GNU C++17 (64) TESTS 3 0 4300800 1300
124345094 my_life B July 30, 2021, 4:46 p.m. OK GNU C++17 (64) TESTS 3 0 4300800 1300
124343687 Cccc23333 B July 30, 2021, 4:38 p.m. OK GNU C++17 (64) TESTS 3 0 5120000 1300
124387264 jansenkenpegrasio B July 31, 2021, 5:07 a.m. OK GNU C++17 (64) TESTS 3 15 4198400 1300
124391161 Farhan20 B July 31, 2021, 6 a.m. OK GNU C++17 (64) TESTS 3 15 4300800 1300
124389631 alphacoder49 B July 31, 2021, 5:40 a.m. OK GNU C++17 (64) TESTS 3 15 4300800 1300
124389338 akdon1198 B July 31, 2021, 5:36 a.m. OK GNU C++17 (64) TESTS 3 15 4300800 1300
124389269 jamil314 B July 31, 2021, 5:35 a.m. OK GNU C++17 (64) TESTS 3 15 4300800 1300
124389134 jamil314 B July 31, 2021, 5:33 a.m. OK GNU C++17 (64) TESTS 3 15 4300800 1300
124388405 mysteri0us7 B July 31, 2021, 5:23 a.m. OK GNU C++17 (64) TESTS 3 15 4300800 1300
124360544 _Body B July 30, 2021, 7:26 p.m. OK Java 11 TESTS 3 155 23961600 1300
124354822 mohdasim2808 B July 30, 2021, 6:14 p.m. OK Java 11 TESTS 3 156 23859200 1300
124374208 mphillotry B July 31, 2021, 12:41 a.m. OK Java 11 TESTS 3 171 23859200 1300
124361200 mrRobot B July 30, 2021, 7:34 p.m. OK Java 11 TESTS 3 171 23961600 1300
124350998 future_me B July 30, 2021, 5:32 p.m. OK Java 11 TESTS 3 187 23756800 1300
124349750 Swapniltri B July 30, 2021, 5:20 p.m. OK Java 11 TESTS 3 187 23756800 1300
124350303 FLORINNN B July 30, 2021, 5:25 p.m. OK Java 11 TESTS 3 187 24576000 1300
124341984 pratham_b B July 30, 2021, 4:33 p.m. OK Java 11 TESTS 3 202 23859200 1300
124377493 Vikas_Ahlawat B July 31, 2021, 2:11 a.m. OK Java 11 TESTS 3 202 23859200 1300
124356451 dhmaniar01 B July 30, 2021, 6:32 p.m. OK Java 11 TESTS 3 202 23859200 1300
124390116 Pranay_ B July 31, 2021, 5:46 a.m. OK Java 8 TESTS 3 77 20377600 1300
124349527 harsh_03_m B July 30, 2021, 5:18 p.m. OK Java 8 TESTS 3 93 20480000 1300
124338799 TheKingInTheNorth B July 30, 2021, 4:27 p.m. OK Java 8 TESTS 3 109 20480000 1300
124367818 dom0619 B July 30, 2021, 9:13 p.m. OK Java 8 TESTS 3 109 20480000 1300
124338987 TheKingInTheNorth B July 30, 2021, 4:27 p.m. OK Java 8 TESTS 3 109 20480000 1300
124348094 Whiplash99 B July 30, 2021, 5:06 p.m. OK Java 8 TESTS 3 124 20582400 1300
124377532 amit_roy B July 31, 2021, 2:12 a.m. OK Java 8 TESTS 3 124 20992000 1300
124340495 dogranmol B July 30, 2021, 4:31 p.m. OK Java 8 TESTS 3 124 20992000 1300
124349579 Vaibhav_patel19 B July 30, 2021, 5:18 p.m. OK Java 8 TESTS 3 124 21299200 1300
124362587 pdk.abhishek B July 30, 2021, 7:52 p.m. OK Java 8 TESTS 3 139 20889600 1300
124352829 aRaha_0_0 B July 30, 2021, 5:52 p.m. OK Mono C# TESTS 3 46 11673600 1300
124377821 sgly33 B July 31, 2021, 2:18 a.m. OK MS C++ 2017 TESTS 3 15 3788800 1300
124342542 202003021019 B July 30, 2021, 4:34 p.m. OK MS C++ 2017 TESTS 3 31 3686400 1300
124347363 xiaocang B July 30, 2021, 5 p.m. OK MS C++ 2017 TESTS 3 46 3686400 1300
124344533 cr7ro B July 30, 2021, 4:42 p.m. OK MS C++ 2017 TESTS 3 46 3686400 1300
124340920 vandartem B July 30, 2021, 4:31 p.m. OK MS C++ 2017 TESTS 3 46 3686400 1300
124376985 swz B July 31, 2021, 2 a.m. OK MS C++ 2017 TESTS 3 46 3788800 1300
124354861 Amosh_ B July 30, 2021, 6:14 p.m. OK MS C++ 2017 TESTS 3 46 3788800 1300
124339799 Agumon B July 30, 2021, 4:29 p.m. OK MS C++ 2017 TESTS 3 46 4505600 1300
124344481 grey B July 30, 2021, 4:42 p.m. OK MS C++ 2017 TESTS 3 61 3686400 1300
124389529 xiaonan_0421 B July 31, 2021, 5:38 a.m. OK MS C++ 2017 TESTS 3 61 3788800 1300
124344251 apostol.vlz B July 30, 2021, 4:41 p.m. OK .NET Core C# TESTS 3 124 14438400 1300
124342057 Janer B July 30, 2021, 4:33 p.m. OK PascalABC.NET TESTS 3 264 76185600 1300
124371855 yash490 B July 30, 2021, 11:10 p.m. OK PyPy 3 TESTS 3 171 25804800 1300
124349748 kirito18086 B July 30, 2021, 5:20 p.m. OK PyPy 3 TESTS 3 186 28467200 1300
124391223 jitendra_joshi3112000 B July 31, 2021, 6:01 a.m. OK PyPy 3 TESTS 3 202 27750400 1300
124372645 Het_Fadia B July 30, 2021, 11:45 p.m. OK PyPy 3 TESTS 3 202 28262400 1300
124372762 Het_Fadia B July 30, 2021, 11:50 p.m. OK PyPy 3 TESTS 3 202 28467200 1300
124372668 Het_Fadia B July 30, 2021, 11:46 p.m. OK PyPy 3 TESTS 3 202 28672000 1300
124349088 Munchy_1 B July 30, 2021, 5:14 p.m. OK PyPy 3 TESTS 3 202 28774400 1300
124358515 FrozenKandy B July 30, 2021, 7 p.m. OK PyPy 3 TESTS 3 202 29593600 1300
124345305 Half_coder B July 30, 2021, 4:47 p.m. OK PyPy 3 TESTS 3 202 29696000 1300
124372778 Het_Fadia B July 30, 2021, 11:51 p.m. OK PyPy 3 TESTS 3 218 28467200 1300
124344208 souvik03 B July 30, 2021, 4:41 p.m. OK Python 3 TESTS 3 77 6963200 1300
124344075 subhajitdas B July 30, 2021, 4:40 p.m. OK Python 3 TESTS 3 78 7475200 1300
124382613 MuvvaSrija B July 31, 2021, 3:48 a.m. OK Python 3 TESTS 3 108 6963200 1300
124378275 _unstable_atom B July 31, 2021, 2:28 a.m. OK Python 3 TESTS 3 108 6963200 1300
124360156 vadimfastos B July 30, 2021, 7:21 p.m. OK Python 3 TESTS 3 108 6963200 1300
124354606 abhi_dhanraj B July 30, 2021, 6:12 p.m. OK Python 3 TESTS 3 108 6963200 1300
124354455 abhi_dhanraj B July 30, 2021, 6:10 p.m. OK Python 3 TESTS 3 108 6963200 1300
124350317 RANK1ZEN B July 30, 2021, 5:25 p.m. OK Python 3 TESTS 3 108 6963200 1300
124359348 abhishek4981 B July 30, 2021, 7:11 p.m. OK Python 3 TESTS 3 108 7168000 1300
124358133 shubh67678 B July 30, 2021, 6:54 p.m. OK Python 3 TESTS 3 108 8192000 1300

remove filters

Back to search problems