Educational Codeforces Round 119 (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
1620 Educational Codeforces Round 119 (Rated for Div. 2) FINISHED False 7200 91981499 Dec. 18, 2021, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21547 ) B Triangles on a Rectangle PROGRAMMING geometry greedy math

B"A rectangle with its opposite corners in (0, 0) and (w, h) and sides parallel to the axes is drawn on a plane. You are given a list of lattice points such that each point lies on a side of a rectangle but not in its corner. Also, there are at least two points on every side of a rectangle. Your task is to choose three points in such a way that: Print the doubled area of this triangle. It can be shown that the doubled area of any triangle formed by lattice points is always an integer. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains two integers w and h ( 3 <= w, h <= 10^6 ) -- the coordinates of the corner of a rectangle. The next two lines contain the description of the points on two horizontal sides. First, an integer k ( 2 <= k <= 2 cdot 10^5 ) -- the number of points. Then, k integers x_1 < x_2 < ... < x_k ( 0 < x_i < w ) -- the x coordinates of the points in the ascending order. The y coordinate for the first line is 0 and for the second line is h . The next two lines contain the description of the points on two vertical sides. First, an integer k ( 2 <= k <= 2 cdot 10^5 ) -- the number of points. Then, k integers y_1 < y_2 < ... < y_k ( 0 < y_i < h ) -- the y coordinates of the points in the ascending order. The x coordinate for the first line is 0 and for the second line is w . The total number of points on all sides in all testcases doesn't exceed 2 cdot 10^5 . For each testcase print a single integer -- the doubled maximum area of a triangle formed by such three points that exactly two of them belong to the same side. The points in the first testcase of the example: The largest triangle is formed by points (0, 1) , (0, 6) and (5, 4) -- its area is frac{25}{2} . Thus, the dou"...

Tutorials

98061

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
139937344 nfcl B Dec. 20, 2021, 2:20 a.m. OK Clang++17 Diagnostics TESTS 5 109 0
139881238 AllenJYL B Dec. 19, 2021, 10:49 a.m. OK Clang++17 Diagnostics TESTS 5 1091 819200
139855733 sahilchaudhari2405 B Dec. 19, 2021, 5:08 a.m. OK Clang++17 Diagnostics TESTS 5 1200 8396800
139884247 kamil_123 B Dec. 19, 2021, 11:22 a.m. OK Clang++17 Diagnostics TESTS 5 1326 16793600
139842910 gxlois B Dec. 18, 2021, 10:15 p.m. OK D TESTS 5 31 4198400
139852360 ssvb B Dec. 19, 2021, 3:51 a.m. OK D TESTS 5 62 13516800
139930179 Maatt B Dec. 19, 2021, 9:22 p.m. OK GNU C11 TESTS 5 78 0
139904542 klimisnotmilk B Dec. 19, 2021, 2:43 p.m. OK GNU C11 TESTS 5 78 0
139860569 onnstion49 B Dec. 19, 2021, 6:24 a.m. OK GNU C11 TESTS 5 93 0
139851050 Horcrux_63 B Dec. 19, 2021, 3:15 a.m. OK GNU C++14 TESTS 5 46 0
139849140 shy_but_not_shy B Dec. 19, 2021, 2:13 a.m. OK GNU C++14 TESTS 5 46 0
139856880 badname.top B Dec. 19, 2021, 5:28 a.m. OK GNU C++14 TESTS 5 46 0
139891078 Likhith_86 B Dec. 19, 2021, 12:35 p.m. OK GNU C++14 TESTS 5 46 0
139876969 riya_369_py B Dec. 19, 2021, 9:55 a.m. OK GNU C++14 TESTS 5 46 102400
139950519 araragi_koyo B Dec. 20, 2021, 4:26 a.m. OK GNU C++14 TESTS 5 46 102400
139885009 kiriyama_rei B Dec. 19, 2021, 11:31 a.m. OK GNU C++14 TESTS 5 46 102400
139839691 rPankaj05 B Dec. 18, 2021, 8:58 p.m. OK GNU C++14 TESTS 5 46 819200
139900706 Lummy B Dec. 19, 2021, 2 p.m. OK GNU C++14 TESTS 5 46 819200
139849051 varun14gb B Dec. 19, 2021, 2:10 a.m. OK GNU C++14 TESTS 5 46 819200
139892053 fallleaves01 B Dec. 19, 2021, 12:46 p.m. OK GNU C++17 TESTS 5 15 1433600
139857429 lys1280023 B Dec. 19, 2021, 5:36 a.m. OK GNU C++17 TESTS 5 46 0
139852829 KunalSin9h B Dec. 19, 2021, 4:04 a.m. OK GNU C++17 TESTS 5 46 0
139851880 zhuaiballl B Dec. 19, 2021, 3:39 a.m. OK GNU C++17 TESTS 5 46 0
139847904 zdamm001 B Dec. 19, 2021, 1:32 a.m. OK GNU C++17 TESTS 5 46 0
139835989 mayurpokharkar6 B Dec. 18, 2021, 7:53 p.m. OK GNU C++17 TESTS 5 46 0
139965688 Siddharth189 B Dec. 20, 2021, 5:47 a.m. OK GNU C++17 TESTS 5 46 0
139891649 cerenn B Dec. 19, 2021, 12:41 p.m. OK GNU C++17 TESTS 5 46 0
139868142 stanptown B Dec. 19, 2021, 8:04 a.m. OK GNU C++17 TESTS 5 46 102400
139861356 cf_id_name B Dec. 19, 2021, 6:35 a.m. OK GNU C++17 TESTS 5 46 102400
139848852 Kevin_pbw B Dec. 19, 2021, 2:03 a.m. OK GNU C++17 (64) TESTS 5 31 0
139866875 RedStar_ B Dec. 19, 2021, 7:49 a.m. OK GNU C++17 (64) TESTS 5 31 0
139853677 narangkay B Dec. 19, 2021, 4:24 a.m. OK GNU C++17 (64) TESTS 5 31 409600
139856235 no_words_to_sky B Dec. 19, 2021, 5:17 a.m. OK GNU C++17 (64) TESTS 5 31 512000
139853628 Mayur152 B Dec. 19, 2021, 4:23 a.m. OK GNU C++17 (64) TESTS 5 31 614400
139837075 Ri_Ni B Dec. 18, 2021, 8:11 p.m. OK GNU C++17 (64) TESTS 5 31 819200
139856084 sm_shivam B Dec. 19, 2021, 5:14 a.m. OK GNU C++17 (64) TESTS 5 31 819200
139877038 ssAmanSoni1 B Dec. 19, 2021, 9:55 a.m. OK GNU C++17 (64) TESTS 5 31 1024000
139853361 aatrey B Dec. 19, 2021, 4:17 a.m. OK GNU C++17 (64) TESTS 5 31 1024000
139850246 TheNerd06 B Dec. 19, 2021, 2:50 a.m. OK GNU C++17 (64) TESTS 5 31 1024000
139861007 rushitote B Dec. 19, 2021, 6:30 a.m. OK GNU C++20 (64) TESTS 5 15 0
139948427 justfun B Dec. 20, 2021, 3:20 a.m. OK GNU C++20 (64) TESTS 5 15 8499200
139853281 Leelee B Dec. 19, 2021, 4:15 a.m. OK GNU C++20 (64) TESTS 5 15 48128000
139840140 amanloading B Dec. 18, 2021, 9:08 p.m. OK GNU C++20 (64) TESTS 5 30 204800
139934197 RandomKami B Dec. 19, 2021, 11:41 p.m. OK GNU C++20 (64) TESTS 5 31 0
139953612 nizamoff B Dec. 20, 2021, 5:21 a.m. OK GNU C++20 (64) TESTS 5 31 0
139952057 rum3r B Dec. 20, 2021, 5:02 a.m. OK GNU C++20 (64) TESTS 5 31 0
139916417 phanlong2811 B Dec. 19, 2021, 5:23 p.m. OK GNU C++20 (64) TESTS 5 31 0
139913989 7misha B Dec. 19, 2021, 4:50 p.m. OK GNU C++20 (64) TESTS 5 31 0
139909712 Shahed_955 B Dec. 19, 2021, 3:52 p.m. OK GNU C++20 (64) TESTS 5 31 0
139925578 LeGuitariste B Dec. 19, 2021, 7:40 p.m. OK Haskell TESTS 5 436 89292800
139925147 LeGuitariste B Dec. 19, 2021, 7:33 p.m. OK Haskell TESTS 5 639 96665600
139920381 LeGuitariste B Dec. 19, 2021, 6:16 p.m. OK Haskell TESTS 5 686 99840000
139863278 SavageClown007 B Dec. 19, 2021, 7:02 a.m. OK Java 11 TESTS 5 171 0
139845738 Sandy_coder2001 B Dec. 18, 2021, 11:58 p.m. OK Java 11 TESTS 5 171 0
139869201 ak_ankit B Dec. 19, 2021, 8:18 a.m. OK Java 11 TESTS 5 187 0
139889654 procrastinate7 B Dec. 19, 2021, 12:19 p.m. OK Java 11 TESTS 5 187 0
139851063 Yash9890 B Dec. 19, 2021, 3:16 a.m. OK Java 11 TESTS 5 202 0
139853494 17821147 B Dec. 19, 2021, 4:20 a.m. OK Java 11 TESTS 5 202 0
139860017 kartheek542 B Dec. 19, 2021, 6:17 a.m. OK Java 11 TESTS 5 217 1638400
139859507 kartheek542 B Dec. 19, 2021, 6:10 a.m. OK Java 11 TESTS 5 218 0
139829320 nirmal_8 B Dec. 18, 2021, 6:33 p.m. OK Java 11 TESTS 5 218 0
139908737 Smorgon B Dec. 19, 2021, 3:38 p.m. OK Java 11 TESTS 5 233 0
139882344 ruchir28 B Dec. 19, 2021, 11 a.m. OK Java 8 TESTS 5 124 0
139912706 solo07 B Dec. 19, 2021, 4:32 p.m. OK Java 8 TESTS 5 124 0
139879556 aryaman_571 B Dec. 19, 2021, 10:29 a.m. OK Java 8 TESTS 5 124 2662400
139837296 smahajan54842 B Dec. 18, 2021, 8:15 p.m. OK Java 8 TESTS 5 140 0
139841988 Yehia8 B Dec. 18, 2021, 9:51 p.m. OK Java 8 TESTS 5 155 0
139848193 Yuxiang B Dec. 19, 2021, 1:42 a.m. OK Java 8 TESTS 5 155 0
139956475 haridevelops B Dec. 20, 2021, 5:24 a.m. OK Java 8 TESTS 5 171 0
139868546 gssakash B Dec. 19, 2021, 8:09 a.m. OK Java 8 TESTS 5 202 0
139883256 sherlock_2001 B Dec. 19, 2021, 11:10 a.m. OK Java 8 TESTS 5 202 0
139852557 SecondThread B Dec. 19, 2021, 3:57 a.m. OK Java 8 TESTS 5 202 0
139884404 kamil_123 B Dec. 19, 2021, 11:24 a.m. OK MS C++ 2017 TESTS 5 202 3174400
139883076 grey B Dec. 19, 2021, 11:08 a.m. OK MS C++ 2017 TESTS 5 218 0
139948914 _Rimjhim_36 B Dec. 20, 2021, 3:38 a.m. OK MS C++ 2017 TESTS 5 233 0
139917257 JohnCode B Dec. 19, 2021, 5:33 p.m. OK MS C++ 2017 TESTS 5 233 0
139845532 gggggg50010 B Dec. 18, 2021, 11:46 p.m. OK MS C++ 2017 TESTS 5 233 819200
139839072 Saif_Dawood B Dec. 18, 2021, 8:45 p.m. OK MS C++ 2017 TESTS 5 248 0
139901046 misaka12435 B Dec. 19, 2021, 2:03 p.m. OK MS C++ 2017 TESTS 5 249 0
139907435 MiserableWisdom B Dec. 19, 2021, 3:21 p.m. OK MS C++ 2017 TESTS 5 249 0
139829452 EgorSav B Dec. 18, 2021, 6:35 p.m. OK MS C++ 2017 TESTS 5 249 3174400
139918428 ravinem1 B Dec. 19, 2021, 5:49 p.m. OK .NET Core C# TESTS 5 156 17817600
139844592 rsFalse B Dec. 18, 2021, 11:09 p.m. OK Perl TESTS 5 62 2150400
139846576 hxu10 B Dec. 19, 2021, 12:38 a.m. OK PyPy 3 TESTS 5 264 11980800
139893649 shining_ B Dec. 19, 2021, 1:05 p.m. OK PyPy 3 TESTS 5 280 18636800
139861486 puffc0rn B Dec. 19, 2021, 6:37 a.m. OK PyPy 3 TESTS 5 280 79155200
139869417 gennadylaptev B Dec. 19, 2021, 8:21 a.m. OK PyPy 3 TESTS 5 358 11468800
139898856 Bambam_Shivam B Dec. 19, 2021, 1:40 p.m. OK PyPy 3 TESTS 5 358 12390400
139913549 ishaand2 B Dec. 19, 2021, 4:43 p.m. OK PyPy 3 TESTS 5 405 15667200
139868628 Iltasks B Dec. 19, 2021, 8:10 a.m. OK PyPy 3 TESTS 5 702 11878400
139952866 francotirador B Dec. 20, 2021, 5:18 a.m. OK PyPy 3 TESTS 5 732 11878400
139860581 varsha765.vc B Dec. 19, 2021, 6:24 a.m. OK PyPy 3 TESTS 5 732 12492800
139916372 bestwillcui B Dec. 19, 2021, 5:22 p.m. OK PyPy 3 TESTS 5 748 12595200
139857311 mnkp B Dec. 19, 2021, 5:34 a.m. OK PyPy 3-64 TESTS 5 187 12390400
139922133 plevande B Dec. 19, 2021, 6:41 p.m. OK PyPy 3-64 TESTS 5 249 15974400
139886713 Keep_Coding B Dec. 19, 2021, 11:48 a.m. OK PyPy 3-64 TESTS 5 264 17100800
139913885 mrobiul B Dec. 19, 2021, 4:48 p.m. OK PyPy 3-64 TESTS 5 311 23244800
139886037 Malek_souissi B Dec. 19, 2021, 11:41 a.m. OK PyPy 3-64 TESTS 5 358 9420800
139920079 OofPokemon B Dec. 19, 2021, 6:12 p.m. OK PyPy 3-64 TESTS 5 592 15360000
139936144 lustre B Dec. 20, 2021, 1:21 a.m. OK PyPy 3-64 TESTS 5 592 15564800
139860822 akshaykalucha B Dec. 19, 2021, 6:28 a.m. OK PyPy 3-64 TESTS 5 623 7065600
139867113 worldedi B Dec. 19, 2021, 7:52 a.m. OK PyPy 3-64 TESTS 5 623 9728000
139874589 shingoo_kang B Dec. 19, 2021, 9:27 a.m. OK PyPy 3-64 TESTS 5 623 17100800
139936694 OLOGY B Dec. 20, 2021, 1:50 a.m. OK Python 2 TESTS 5 217 7680000
139855509 danhnganc3 B Dec. 19, 2021, 5:04 a.m. OK Python 3 TESTS 5 139 8396800
139874172 anonymouslydemo B Dec. 19, 2021, 9:21 a.m. OK Python 3 TESTS 5 186 8089600
139911694 rostoki B Dec. 19, 2021, 4:18 p.m. OK Python 3 TESTS 5 187 8089600
139879022 Ratree B Dec. 19, 2021, 10:23 a.m. OK Python 3 TESTS 5 202 8396800
139849175 ritesh_43 B Dec. 19, 2021, 2:14 a.m. OK Python 3 TESTS 5 233 6656000
139952943 jayindia024 B Dec. 20, 2021, 5:19 a.m. OK Python 3 TESTS 5 233 8192000
139907442 ankit7665572344 B Dec. 19, 2021, 3:21 p.m. OK Python 3 TESTS 5 234 8192000
139957739 jagadish_007 B Dec. 20, 2021, 5:28 a.m. OK Python 3 TESTS 5 249 8192000
139950419 sawvik.dipto10 B Dec. 20, 2021, 4:23 a.m. OK Python 3 TESTS 5 249 8192000
139948549 Sai_Shubham_3 B Dec. 20, 2021, 3:25 a.m. OK Python 3 TESTS 5 249 8192000
139906649 lxk B Dec. 19, 2021, 3:10 p.m. OK Rust 2021 TESTS 5 46 8192000
139894430 iliekcomputers B Dec. 19, 2021, 1:14 p.m. OK Rust 2021 TESTS 5 124 3379200
139868620 clause B Dec. 19, 2021, 8:10 a.m. OK Rust 2021 TESTS 5 139 2150400

remove filters

Back to search problems