Educational Codeforces Round 49 (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
1027 Educational Codeforces Round 49 (Rated for Div. 2) FINISHED False 7200 202922723 Aug. 18, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6932 ) C Minimum Value Rectangle PROGRAMMING greedy 1600

B"You have n sticks of the given lengths. Your task is to choose exactly four of them in such a way that they can form a rectangle. No sticks can be cut to pieces, each side of the rectangle must be formed by a single stick. No stick can be chosen multiple times. It is guaranteed that it is always possible to choose such sticks. Let S be the area of the rectangle and P be the perimeter of the rectangle. The chosen rectangle should have the value frac{P^2}{S} minimal possible. The value is taken without any rounding. If there are multiple answers, print any of them. Each testcase contains several lists of sticks, for each of them you are required to solve the problem separately. The first line contains a single integer T ( T ge 1 ) -- the number of lists of sticks in the testcase. Then 2T lines follow -- lines (2i - 1) and 2i of them describe the i -th list. The first line of the pair contains a single integer n ( 4 <= n <= 10^6 ) -- the number of sticks in the i -th list. The second line of the pair contains n integers a_1, a_2, ... , a_n ( 1 <= a_j <= 10^4 ) -- lengths of the sticks in the i -th list. It is guaranteed that for each list there exists a way to choose four sticks so that they form a rectangle. The total number of sticks in all T lists doesn't exceed 10^6 in each testcase. Print T lines. The i -th line should contain the answer to the i -th list of the input. That is the lengths of the four sticks you choose from the i -th list, so that they form a rectangle and the value frac{P^2}{S} of this rectangle is minimal possible. You can print these four lengths in arbitrary order. If there are multiple answers, print any of them. There is only one way to choose four sticks in the first list, they form a rectangle with sides 2 and 7 , its area is 2 cdot 7 = 14 , perimeter is 2(2 + 7) = 18$"...

Tutorials

Educational Codeforces Round 49 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41878750 rr_ C Aug. 19, 2018, 11:33 p.m. OK D TESTS 46 811 30515200 1600
41878684 rr_ C Aug. 19, 2018, 11:28 p.m. OK D TESTS 46 889 38809600 1600
42010323 snehith_007 C Aug. 23, 2018, 11:23 p.m. OK GNU C TESTS 46 390 3993600 1600
41942154 Denis10 C Aug. 21, 2018, 4:09 p.m. OK GNU C TESTS 46 420 13004800 1600
41866548 NoSoul C Aug. 19, 2018, 5:17 p.m. OK GNU C TESTS 46 639 4096000 1600
41978423 SciVec C Aug. 22, 2018, 9:23 p.m. OK GNU C TESTS 46 1185 4096000 1600
41978409 SciVec C Aug. 22, 2018, 9:23 p.m. OK GNU C TESTS 46 1200 2048000 1600
41978149 SciVec C Aug. 22, 2018, 9:01 p.m. OK GNU C TESTS 46 1201 2048000 1600
41978398 SciVec C Aug. 22, 2018, 9:22 p.m. OK GNU C TESTS 46 1201 6041600 1600
41988740 high-cold C Aug. 23, 2018, 7:34 a.m. OK GNU C++ TESTS 46 187 8089600 1600
41954555 luogu_bot5 C Aug. 22, 2018, 5:29 a.m. OK GNU C++ TESTS 46 202 3993600 1600
41796844 Anderson_GR C Aug. 18, 2018, 5:04 p.m. OK GNU C++ TESTS 46 202 3993600 1600
42232745 Schiwon C Aug. 29, 2018, 7:41 a.m. OK GNU C++ TESTS 46 202 4096000 1600
42197245 vjudge4 C Aug. 28, 2018, 7:01 a.m. OK GNU C++ TESTS 46 202 4096000 1600
41990821 hangyesheng C Aug. 23, 2018, 8:44 a.m. OK GNU C++ TESTS 46 202 4300800 1600
41958297 wh_ZH C Aug. 22, 2018, 7:59 a.m. OK GNU C++ TESTS 46 202 12083200 1600
41933732 DimensionTripper C Aug. 21, 2018, 11:47 a.m. OK GNU C++ TESTS 46 202 120217600 1600
41933670 DimensionTripper C Aug. 21, 2018, 11:45 a.m. OK GNU C++ TESTS 46 202 120217600 1600
41811843 HatsuneMikuo C Aug. 19, 2018, 3:37 a.m. OK GNU C++ TESTS 46 217 4300800 1600
46348540 sansen C Nov. 28, 2018, 7:40 p.m. OK GNU C11 TESTS 46 1263 4198400 1600
46348096 sansen C Nov. 28, 2018, 7:23 p.m. OK GNU C11 TESTS 46 1279 7987200 1600
50291084 rainboy C Feb. 21, 2019, 5:29 p.m. OK GNU C11 TESTS 46 1668 102400 1600
42696060 ReaLNero1 C Sept. 9, 2018, 7:13 a.m. OK GNU C++11 TESTS 46 93 8192000 1600
46756409 mtmohim C Dec. 8, 2018, 11:58 a.m. OK GNU C++11 TESTS 46 93 8294400 1600
65612476 vjudge4 C Nov. 24, 2019, 12:34 a.m. OK GNU C++11 TESTS 46 93 13209600 1600
43114523 zhaotiensn C Sept. 20, 2018, 1:08 p.m. OK GNU C++11 TESTS 46 109 12288000 1600
65612463 wanghongyi C Nov. 24, 2019, 12:32 a.m. OK GNU C++11 TESTS 46 124 13209600 1600
42016927 vjudge3 C Aug. 24, 2018, 6:51 a.m. OK GNU C++11 TESTS 46 140 7987200 1600
42017025 Ithea_Myse_Valgulious C Aug. 24, 2018, 6:55 a.m. OK GNU C++11 TESTS 46 140 8089600 1600
43053530 Umi C Sept. 19, 2018, 1:01 a.m. OK GNU C++11 TESTS 46 155 307200 1600
57627828 luogu_bot1 C July 24, 2019, 7:41 a.m. OK GNU C++11 TESTS 46 171 8192000 1600
66484109 llllxxx666888 C Dec. 8, 2019, 5:16 a.m. OK GNU C++11 TESTS 46 171 9011200 1600
41812463 ceerRep C Aug. 19, 2018, 4:09 a.m. OK GNU C++14 TESTS 46 93 16486400 1600
48441487 DeletedAccount90083864 C Jan. 16, 2019, 4 a.m. OK GNU C++14 TESTS 46 171 4198400 1600
41803323 wleung_bvg C Aug. 18, 2018, 7:58 p.m. OK GNU C++14 TESTS 46 187 7270400 1600
41991933 Cipri321 C Aug. 23, 2018, 9:23 a.m. OK GNU C++14 TESTS 46 265 7987200 1600
41825301 454933608 C Aug. 19, 2018, 11:45 a.m. OK GNU C++14 TESTS 46 280 4710400 1600
48440521 vjudge1 C Jan. 16, 2019, 2:46 a.m. OK GNU C++14 TESTS 46 342 7987200 1600
46512464 dtc03012 C Dec. 2, 2018, 2:02 p.m. OK GNU C++14 TESTS 46 358 307200 1600
43601109 catch_up C Sept. 30, 2018, 10:10 a.m. OK GNU C++14 TESTS 46 358 6041600 1600
41906839 1998_x C Aug. 20, 2018, 3:05 p.m. OK GNU C++14 TESTS 46 374 7987200 1600
52455253 rich_and_yuong C April 7, 2019, 11:28 a.m. OK GNU C++14 TESTS 46 389 3993600 1600
41976235 BagishovMikail C Aug. 22, 2018, 7:05 p.m. OK GNU C++17 TESTS 46 140 168140800 1600
41798328 akgthegreat C Aug. 18, 2018, 5:31 p.m. OK GNU C++17 TESTS 46 187 4198400 1600
51899769 VictorDW C March 27, 2019, 1:03 p.m. OK GNU C++17 TESTS 46 265 4608000 1600
57313128 N-Zoth 1910903 C July 19, 2019, 7:14 a.m. OK GNU C++17 TESTS 46 280 4608000 1600
41963184 stepvah C Aug. 22, 2018, 10:45 a.m. OK GNU C++17 TESTS 46 280 60108800 1600
48440520 Kissheart C Jan. 16, 2019, 2:46 a.m. OK GNU C++17 TESTS 46 343 8294400 1600
52381015 Silent_hr C April 6, 2019, 10:05 a.m. OK GNU C++17 TESTS 46 358 7987200 1600
42012967 zumikua C Aug. 24, 2018, 3:18 a.m. OK GNU C++17 TESTS 46 373 7987200 1600
42694062 yifa C Sept. 9, 2018, 5:23 a.m. OK GNU C++17 TESTS 46 373 8294400 1600
41820862 Wake C Aug. 19, 2018, 9:31 a.m. OK GNU C++17 TESTS 46 373 40038400 1600
42147080 treasuryonly C Aug. 27, 2018, 9:30 a.m. OK Go TESTS 46 998 5529600 1600
41821448 tusupov C Aug. 19, 2018, 9:47 a.m. OK Go TESTS 46 1044 12902400 1600
43799292 achm C Oct. 4, 2018, 4:46 p.m. OK Go TESTS 46 1294 5324800 1600
43799954 achm C Oct. 4, 2018, 5 p.m. OK Go TESTS 46 1404 5529600 1600
43799236 achm C Oct. 4, 2018, 4:44 p.m. OK Go TESTS 46 1435 5324800 1600
45276827 vatsalsonigara C Nov. 4, 2018, 11:33 a.m. OK Java 8 TESTS 46 218 37990400 1600
47446698 vatsal.malaviya C Dec. 24, 2018, 6:47 a.m. OK Java 8 TESTS 46 265 2252800 1600
42105999 m1_k3 C Aug. 26, 2018, 12:39 a.m. OK Java 8 TESTS 46 280 6451200 1600
64542444 wabadabakalakaboo C Nov. 8, 2019, 7:11 p.m. OK Java 8 TESTS 46 312 13516800 1600
68585679 saurabhs1206 C Jan. 11, 2020, 11:11 a.m. OK Java 8 TESTS 46 327 38195200 1600
45382207 RasMalai C Nov. 6, 2018, 3:28 p.m. OK Java 8 TESTS 46 358 0 1600
41798926 tanmay28 C Aug. 18, 2018, 5:46 p.m. OK Java 8 TESTS 46 389 0 1600
41828819 Pratik_Rajani C Aug. 19, 2018, 1:32 p.m. OK Java 8 TESTS 46 390 6144000 1600
41969240 spar5h C Aug. 22, 2018, 2:05 p.m. OK Java 8 TESTS 46 420 0 1600
41820857 Tarun C Aug. 19, 2018, 9:30 a.m. OK Java 8 TESTS 46 421 6246400 1600
55991099 og.kostya C June 24, 2019, 7:42 a.m. OK Mono C# TESTS 46 264 8192000 1600
42158791 keep.deep C Aug. 27, 2018, 4:36 p.m. OK Mono C# TESTS 46 702 67891200 1600
42002151 n.a.borisov C Aug. 23, 2018, 3:54 p.m. OK Mono C# TESTS 46 1263 67891200 1600
50655155 toysheeyeyraku C March 1, 2019, 7:14 p.m. OK Mono C# TESTS 46 1419 82534400 1600
51876379 nemars C March 26, 2019, 7:43 p.m. OK Mono C# TESTS 46 1606 86323200 1600
41939121 Mickey-snow C Aug. 21, 2018, 2:22 p.m. OK Mono C# TESTS 46 1840 66764800 1600
54153087 vjudge5 C May 15, 2019, 2:15 a.m. OK MS C++ TESTS 46 296 7987200 1600
44537655 vjudge1 C Oct. 19, 2018, 9:46 a.m. OK MS C++ TESTS 46 311 7987200 1600
52740443 vjudge1 C April 14, 2019, 8:43 a.m. OK MS C++ TESTS 46 311 7987200 1600
52381446 vjudge4 C April 6, 2019, 10:17 a.m. OK MS C++ TESTS 46 311 12083200 1600
54152051 vjudge1 C May 15, 2019, 1:16 a.m. OK MS C++ TESTS 46 312 7987200 1600
59893764 vjudge1 C Sept. 2, 2019, 11:23 a.m. OK MS C++ TESTS 46 343 409600 1600
65614118 vjudge2 C Nov. 24, 2019, 2:08 a.m. OK MS C++ TESTS 46 358 4403200 1600
43394630 vjudge1 C Sept. 25, 2018, 4:20 a.m. OK MS C++ TESTS 46 358 7987200 1600
44183875 vjudge1 C Oct. 12, 2018, 12:26 p.m. OK MS C++ TESTS 46 358 7987200 1600
42246746 scorpiowf C Aug. 29, 2018, 3:45 p.m. OK MS C++ TESTS 46 374 307200 1600
54397196 Boryan07 C May 19, 2019, 9:20 p.m. OK MS C++ 2017 TESTS 46 498 307200 1600
54397155 Boryan07 C May 19, 2019, 9:17 p.m. OK MS C++ 2017 TESTS 46 499 307200 1600
61830723 vjudge3 C Oct. 4, 2019, 6:28 a.m. OK MS C++ 2017 TESTS 46 530 11161600 1600
50764247 Partizan C March 3, 2019, 10:05 p.m. OK MS C++ 2017 TESTS 46 624 716800 1600
61823457 vjudge4 C Oct. 4, 2019, 3:31 a.m. OK MS C++ 2017 TESTS 46 794 204800 1600
54397145 Boryan07 C May 19, 2019, 9:17 p.m. OK MS C++ 2017 TESTS 46 935 307200 1600
54397297 armoking C May 19, 2019, 9:27 p.m. OK MS C++ 2017 TESTS 46 1372 307200 1600
52535437 Still_Theory C April 9, 2019, 3:22 p.m. OK MS C++ 2017 TESTS 46 1403 7987200 1600
55410648 shafwanur010 C June 10, 2019, 7:32 p.m. OK PyPy 2 TESTS 46 639 41472000 1600
46246426 c1729 C Nov. 26, 2018, 11:39 a.m. OK PyPy 2 TESTS 46 702 41881600 1600
41919666 _kawaii_neko_ C Aug. 21, 2018, 2:45 a.m. OK PyPy 2 TESTS 46 841 56524800 1600
41941990 supachai_pay C Aug. 21, 2018, 4:04 p.m. OK PyPy 2 TESTS 46 842 66969600 1600
41806097 Hi.Bitch C Aug. 18, 2018, 9:52 p.m. OK PyPy 2 TESTS 46 888 67072000 1600
41815907 ankit_06 C Aug. 19, 2018, 6:33 a.m. OK PyPy 2 TESTS 46 966 52224000 1600
42003212 Pratik_2106 C Aug. 23, 2018, 4:37 p.m. OK PyPy 2 TESTS 46 982 50483200 1600
41813962 SerChirag C Aug. 19, 2018, 5:28 a.m. OK PyPy 2 TESTS 46 1122 49664000 1600
45118893 wangkan2001 C Oct. 31, 2018, 1:34 a.m. OK PyPy 2 TESTS 46 1138 66969600 1600
41816167 akshay125 C Aug. 19, 2018, 6:42 a.m. OK PyPy 2 TESTS 46 1200 49356800 1600
41946630 vchilikov C Aug. 21, 2018, 7:13 p.m. OK PyPy 3 TESTS 46 1325 70553600 1600
46660544 omarnvidia C Dec. 5, 2018, 6:59 p.m. OK PyPy 3 TESTS 46 1325 78950400 1600
47887828 saku7 C Jan. 4, 2019, 2:29 a.m. OK PyPy 3 TESTS 46 1341 70451200 1600
42007055 emma C Aug. 23, 2018, 7:19 p.m. OK PyPy 3 TESTS 46 1403 74137600 1600
41946490 vchilikov C Aug. 21, 2018, 7:05 p.m. OK PyPy 3 TESTS 46 1528 59904000 1600
42003446 Pratik_2106 C Aug. 23, 2018, 4:46 p.m. OK PyPy 3 TESTS 46 1544 73932800 1600
61978853 pineriver C Oct. 6, 2019, 11:21 a.m. OK PyPy 3 TESTS 46 1559 66457600 1600
41800160 tanmay28 C Aug. 18, 2018, 6:18 p.m. OK PyPy 3 TESTS 46 1559 70553600 1600
41822412 LordVader C Aug. 19, 2018, 10:17 a.m. OK PyPy 3 TESTS 46 1574 73932800 1600
66415923 N3RDSLQYER84 C Dec. 6, 2019, 5:05 p.m. OK PyPy 3 TESTS 46 1621 67993600 1600
42146134 orailly C Aug. 27, 2018, 8:55 a.m. OK Python 3 TESTS 46 1653 64000000 1600
42147586 Mk_Python_v1 C Aug. 27, 2018, 9:53 a.m. OK Python 3 TESTS 46 1684 64000000 1600
42245273 wangzpeng C Aug. 29, 2018, 2:54 p.m. OK Python 3 TESTS 46 1809 64000000 1600
42135308 EaglemanGo C Aug. 26, 2018, 11 p.m. OK Python 3 TESTS 46 1871 60108800 1600
42135486 EaglemanGo C Aug. 26, 2018, 11:15 p.m. OK Python 3 TESTS 46 1933 60108800 1600
42145494 orailly C Aug. 27, 2018, 8:35 a.m. OK Python 3 TESTS 46 1964 64000000 1600
42150213 exp101t C Aug. 27, 2018, 11:44 a.m. OK Python 3 TESTS 46 1965 60108800 1600
42356371 fascineted C Sept. 2, 2018, 8:58 a.m. OK Python 3 TESTS 46 1981 60108800 1600
41826190 leoniduvk C Aug. 19, 2018, 12:11 p.m. OK Rust TESTS 46 389 16281600 1600
41826163 leoniduvk C Aug. 19, 2018, 12:10 p.m. OK Rust TESTS 46 483 16281600 1600
61369194 sash0 C Sept. 27, 2019, 2:27 p.m. OK Rust TESTS 46 608 57548800 1600
42210504 vain0 C Aug. 28, 2018, 2 p.m. OK Rust TESTS 46 1809 15257600 1600
41795144 johannesk C Aug. 18, 2018, 4:43 p.m. OK Rust TESTS 46 1934 21504000 1600
42209996 vain0 C Aug. 28, 2018, 1:43 p.m. OK Rust TESTS 46 1980 29184000 1600
41807296 pinguinson C Aug. 18, 2018, 11:08 p.m. OK Scala TESTS 46 1122 45260800 1600

remove filters

Back to search problems