Codeforces Global Round 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
1119 Codeforces Global Round 2 FINISHED False 7200 182975123 April 6, 2019, 11:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5123 ) E Pavel and Triangles PROGRAMMING brute force dp fft greedy ternary search 1900

B'Pavel has several sticks with lengths equal to powers of two. He has a_0 sticks of length 2^0 = 1 , a_1 sticks of length 2^1 = 2 , ..., a_{n-1} sticks of length 2^{n-1} . Pavel wants to make the maximum possible number of triangles using these sticks. The triangles should have strictly positive area, each stick can be used in at most one triangle. It is forbidden to break sticks, and each triangle should consist of exactly three sticks. Find the maximum possible number of triangles. The first line contains a single integer n ( 1 <= q n <= q 300 ,000 ) -- the number of different lengths of sticks. The second line contains n integers a_0 , a_1 , ..., a_{n-1} ( 1 <= q a_i <= q 10^9 ), where a_i is the number of sticks with the length equal to 2^i . Print a single integer -- the maximum possible number of non-degenerate triangles that Pavel can make. In the first example, Pavel can, for example, make this set of triangles (the lengths of the sides of the triangles are listed): (2^0, 2^4, 2^4) , (2^1, 2^3, 2^3) , (2^1, 2^2, 2^2) . In the second example, Pavel cannot make a single triangle. In the third example, Pavel can, for example, create this set of triangles (the lengths of the sides of the triangles are listed): (2^0, 2^0, 2^0) , (2^1, 2^1, 2^1) , (2^2, 2^2, 2^2) . '...

Tutorials

Codeforces Global Round 2 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52393932 hos.lyric E April 6, 2019, 12:02 p.m. OK D TESTS 41 93 22118400 1900
52401112 Gassa E April 6, 2019, 12:33 p.m. OK D TESTS 41 93 27545600 1900
62888753 rr_ E Oct. 18, 2019, 7:28 p.m. OK D TESTS 41 108 11571200 1900
52513981 d4rkn19ht E April 9, 2019, 3:15 a.m. OK FPC TESTS 41 77 1638400 1900
52415110 ruban E April 6, 2019, 2:59 p.m. OK FPC TESTS 41 93 13926400 1900
52407305 PAG E April 6, 2019, 1:07 p.m. OK FPC TESTS 41 124 2457600 1900
52410165 sansen E April 6, 2019, 1:25 p.m. OK GNU C11 TESTS 41 31 1228800 1900
60388227 Adata1000 E Sept. 11, 2019, 12:20 p.m. OK GNU C11 TESTS 41 62 0 1900
52486744 zysbzddsj E April 8, 2019, 9:26 a.m. OK GNU C11 TESTS 41 62 1228800 1900
60433692 dixitgarg E Sept. 12, 2019, 10:09 a.m. OK GNU C11 TESTS 41 77 2457600 1900
65677340 RajMaheshwari E Nov. 24, 2019, 6:10 p.m. OK GNU C11 TESTS 41 78 0 1900
65678186 Sahib.gsc E Nov. 24, 2019, 6:34 p.m. OK GNU C11 TESTS 41 78 0 1900
60347007 naman04 E Sept. 10, 2019, 12:57 p.m. OK GNU C11 TESTS 41 78 2457600 1900
60401946 Ar_9020_th E Sept. 11, 2019, 5:01 p.m. OK GNU C11 TESTS 41 93 0 1900
60390801 meghnamishra E Sept. 11, 2019, 1:14 p.m. OK GNU C11 TESTS 41 93 0 1900
60375297 Vkashera14 E Sept. 11, 2019, 6:10 a.m. OK GNU C11 TESTS 41 109 2355200 1900
52584060 undesirable_number1 E April 10, 2019, 9:37 p.m. OK GNU C++11 TESTS 41 31 0 1900
52535007 luogu_bot3 E April 9, 2019, 3:10 p.m. OK GNU C++11 TESTS 41 31 0 1900
52434151 Leafy_ E April 7, 2019, 2:03 a.m. OK GNU C++11 TESTS 41 31 0 1900
52431786 shuashuawan E April 6, 2019, 11:36 p.m. OK GNU C++11 TESTS 41 31 0 1900
52410959 Richard_love_OI E April 6, 2019, 1:28 p.m. OK GNU C++11 TESTS 41 31 0 1900
52410854 cwxabc E April 6, 2019, 1:28 p.m. OK GNU C++11 TESTS 41 31 0 1900
52606420 luogu_bot1 E April 11, 2019, 2:04 p.m. OK GNU C++11 TESTS 41 31 0 1900
52751503 htcheck E April 14, 2019, 2:17 p.m. OK GNU C++11 TESTS 41 31 0 1900
55556093 vjudge5 E June 14, 2019, 9:58 a.m. OK GNU C++11 TESTS 41 31 0 1900
52551811 disangan233 E April 10, 2019, 5:10 a.m. OK GNU C++11 TESTS 41 31 409600 1900
52402097 Linkus E April 6, 2019, 12:38 p.m. OK GNU C++14 TESTS 41 31 1228800 1900
52403100 wleung_bvg E April 6, 2019, 12:43 p.m. OK GNU C++14 TESTS 41 31 1331200 1900
52501439 Eassion_C E April 8, 2019, 4:18 p.m. OK GNU C++14 TESTS 41 31 4710400 1900
52451536 tokitsukaze E April 7, 2019, 9:58 a.m. OK GNU C++14 TESTS 41 46 102400 1900
52411910 naoya_t E April 6, 2019, 1:33 p.m. OK GNU C++14 TESTS 41 46 13209600 1900
65677281 RajMaheshwari E Nov. 24, 2019, 6:09 p.m. OK GNU C++14 TESTS 41 62 0 1900
52411753 not_antony E April 6, 2019, 1:33 p.m. OK GNU C++14 TESTS 41 62 1228800 1900
52405331 Hasan0540 E April 6, 2019, 12:56 p.m. OK GNU C++14 TESTS 41 62 1228800 1900
63741134 kannav.1 E Oct. 29, 2019, 4:58 p.m. OK GNU C++14 TESTS 41 77 0 1900
52414916 C1ariS E April 6, 2019, 2:57 p.m. OK GNU C++14 TESTS 41 77 0 1900
52400768 Trisolaris E April 6, 2019, 12:31 p.m. OK GNU C++17 TESTS 41 31 102400 1900
52409957 IgorSmirnov E April 6, 2019, 1:23 p.m. OK GNU C++17 TESTS 41 31 1228800 1900
52395169 whzzt E April 6, 2019, 12:06 p.m. OK GNU C++17 TESTS 41 31 5427200 1900
52461348 nickluo E April 7, 2019, 1:35 p.m. OK GNU C++17 TESTS 41 46 512000 1900
52431410 aysyxx53 E April 6, 2019, 11:16 p.m. OK GNU C++17 TESTS 41 46 2355200 1900
52744506 .tx E April 14, 2019, 10:55 a.m. OK GNU C++17 TESTS 41 46 2457600 1900
54268507 LiChenKoh E May 17, 2019, 7:28 a.m. OK GNU C++17 TESTS 41 46 2457600 1900
52401328 interestingLSY E April 6, 2019, 12:34 p.m. OK GNU C++17 TESTS 41 46 5222400 1900
60339294 nikhil_c E Sept. 10, 2019, 10:02 a.m. OK GNU C++17 TESTS 41 62 0 1900
53688767 RCG E May 3, 2019, 3:08 a.m. OK GNU C++17 TESTS 41 62 1126400 1900
52476114 Dekedro E April 7, 2019, 11:17 p.m. OK Go TESTS 41 249 5324800 1900
52476718 bluesky111 E April 8, 2019, 12:17 a.m. OK Java 8 TESTS 41 124 0 1900
52533824 KharYusuf E April 9, 2019, 2:39 p.m. OK Java 8 TESTS 41 124 0 1900
52530888 amolpratap007 E April 9, 2019, 1:26 p.m. OK Java 8 TESTS 41 124 0 1900
52474792 beroul E April 7, 2019, 9:25 p.m. OK Java 8 TESTS 41 124 0 1900
52464329 MaxHeap E April 7, 2019, 2:49 p.m. OK Java 8 TESTS 41 124 0 1900
52422450 StayAwayFromBitches E April 6, 2019, 5:43 p.m. OK Java 8 TESTS 41 124 0 1900
52415326 aman28rwt E April 6, 2019, 3:02 p.m. OK Java 8 TESTS 41 124 0 1900
52411257 yuya178 E April 6, 2019, 1:30 p.m. OK Java 8 TESTS 41 124 0 1900
52398957 uwi E April 6, 2019, 12:22 p.m. OK Java 8 TESTS 41 124 0 1900
52398021 ilyakor E April 6, 2019, 12:17 p.m. OK Java 8 TESTS 41 124 0 1900
52447446 alexey.enkov E April 7, 2019, 8:29 a.m. OK Kotlin TESTS 41 452 34508800 1900
52418841 selpo E April 6, 2019, 4:15 p.m. OK Mono C# TESTS 41 155 40857600 1900
52547835 dinarisio E April 9, 2019, 11:55 p.m. OK Mono C# TESTS 41 155 46284800 1900
52407943 claw88 E April 6, 2019, 1:12 p.m. OK Mono C# TESTS 41 156 34201600 1900
52595217 eki E April 11, 2019, 8:34 a.m. OK Mono C# TESTS 41 170 34201600 1900
52417180 TrabajoNocturno E April 6, 2019, 3:33 p.m. OK Mono C# TESTS 41 171 113664000 1900
52553067 vjudge5 E April 10, 2019, 6:04 a.m. OK MS C++ TESTS 41 62 0 1900
53292732 vjudge5 E April 25, 2019, 4:16 p.m. OK MS C++ TESTS 41 62 0 1900
52559132 vjudge4 E April 10, 2019, 9:22 a.m. OK MS C++ TESTS 41 62 0 1900
52516662 wjfwjfwjf E April 9, 2019, 5:59 a.m. OK MS C++ TESTS 41 62 0 1900
52553046 vjudge2 E April 10, 2019, 6:03 a.m. OK MS C++ TESTS 41 62 1228800 1900
52641424 vjudge5 E April 12, 2019, 12:38 p.m. OK MS C++ TESTS 41 62 2355200 1900
52556147 vjudge3 E April 10, 2019, 7:52 a.m. OK MS C++ TESTS 41 62 2457600 1900
66721449 vjudge1 E Dec. 12, 2019, 3:31 p.m. OK MS C++ TESTS 41 62 2457600 1900
54805229 S.K E May 29, 2019, 1:45 p.m. OK MS C++ TESTS 41 62 2457600 1900
52611959 vjudge2 E April 11, 2019, 4:29 p.m. OK MS C++ TESTS 41 77 0 1900
52522073 work_hard. E April 9, 2019, 9:20 a.m. OK MS C++ 2017 TESTS 41 93 2457600 1900
52408433 youx E April 6, 2019, 1:15 p.m. OK MS C++ 2017 TESTS 41 108 0 1900
52809006 DWAE86 E April 16, 2019, 7:16 a.m. OK MS C++ 2017 TESTS 41 108 1228800 1900
52588325 loading.. E April 11, 2019, 3:07 a.m. OK MS C++ 2017 TESTS 41 108 2457600 1900
52766779 easyeasyeasy E April 15, 2019, 4:42 a.m. OK MS C++ 2017 TESTS 41 109 0 1900
52653571 CtrlAlt E April 12, 2019, 5:44 p.m. OK MS C++ 2017 TESTS 41 109 0 1900
66734744 Soinux E Dec. 12, 2019, 6:21 p.m. OK MS C++ 2017 TESTS 41 109 307200 1900
66734768 vjudge1 E Dec. 12, 2019, 6:21 p.m. OK MS C++ 2017 TESTS 41 109 307200 1900
52461339 R99 E April 7, 2019, 1:35 p.m. OK MS C++ 2017 TESTS 41 109 1228800 1900
55997163 petko_mitkov E June 24, 2019, 11:07 a.m. OK MS C++ 2017 TESTS 41 109 1228800 1900
54892619 CyberGoose E May 31, 2019, 9:56 p.m. OK Ocaml TESTS 41 140 6246400 1900
54892521 CyberGoose E May 31, 2019, 9:49 p.m. OK Ocaml TESTS 41 140 6246400 1900
52405749 frederika E April 6, 2019, 12:58 p.m. OK PyPy 2 TESTS 41 186 18841600 1900
59883590 MVP E Sept. 2, 2019, 6:38 a.m. OK PyPy 2 TESTS 41 187 16384000 1900
52425066 sy_chen E April 6, 2019, 6:57 p.m. OK PyPy 2 TESTS 41 187 18944000 1900
52478449 allonsy_kim E April 8, 2019, 2:35 a.m. OK PyPy 2 TESTS 41 202 18944000 1900
52425877 wangkan2001 E April 6, 2019, 7:19 p.m. OK PyPy 2 TESTS 41 202 18944000 1900
52398678 c1729 E April 6, 2019, 12:20 p.m. OK PyPy 2 TESTS 41 202 21196800 1900
52408501 pajenegod E April 6, 2019, 1:15 p.m. OK PyPy 2 TESTS 41 202 22425600 1900
52450086 shehebe E April 7, 2019, 9:22 a.m. OK PyPy 2 TESTS 41 218 18944000 1900
64787896 satyamcse E Nov. 13, 2019, 9:54 a.m. OK PyPy 3 TESTS 41 233 24166400 1900
52410837 sonya123 E April 6, 2019, 1:28 p.m. OK PyPy 3 TESTS 41 373 33075200 1900
52572368 hrustim25 E April 10, 2019, 2:43 p.m. OK PyPy 3 TESTS 41 374 33075200 1900
52418128 shiv1470 E April 6, 2019, 3:55 p.m. OK PyPy 3 TESTS 41 374 33075200 1900
52404202 Kiri8128 E April 6, 2019, 12:49 p.m. OK PyPy 3 TESTS 41 374 33075200 1900
52612933 rookzeno E April 11, 2019, 4:54 p.m. OK PyPy 3 TESTS 41 389 32972800 1900
52488435 chengzi E April 8, 2019, 10:29 a.m. OK PyPy 3 TESTS 41 389 33177600 1900
53434780 sdhd E April 27, 2019, 6:28 p.m. OK PyPy 3 TESTS 41 390 33075200 1900
52529113 185217 E April 9, 2019, 12:47 p.m. OK PyPy 3 TESTS 41 404 32358400 1900
64165290 Mai-sanBestWaifu E Nov. 3, 2019, 4:03 p.m. OK PyPy 3 TESTS 41 405 24576000 1900
52414974 nwi E April 6, 2019, 2:58 p.m. OK Python 2 TESTS 41 373 16486400 1900
52417040 Helli.code E April 6, 2019, 3:29 p.m. OK Python 2 TESTS 41 530 16384000 1900
52988741 OpalDshawn E April 18, 2019, 8:19 p.m. OK Python 2 TESTS 41 592 18022400 1900
52412176 ashashwat E April 6, 2019, 1:34 p.m. OK Python 2 TESTS 41 623 19865600 1900
52654294 gatsko E April 12, 2019, 6:03 p.m. OK Python 2 TESTS 41 780 22732800 1900
52456618 Uranux E April 7, 2019, 11:59 a.m. OK Python 2 TESTS 41 1419 58675200 1900
52404842 sparkyyyy E April 6, 2019, 12:53 p.m. OK Python 3 TESTS 41 343 24576000 1900
52428305 LordVoldebug E April 6, 2019, 8:30 p.m. OK Python 3 TESTS 41 358 23961600 1900
52422149 ParsaBahrami E April 6, 2019, 5:36 p.m. OK Python 3 TESTS 41 358 24268800 1900
65492264 vjudge4 E Nov. 21, 2019, 3:09 p.m. OK Python 3 TESTS 41 358 24678400 1900
53023222 codershuvo E April 19, 2019, 5:33 p.m. OK Python 3 TESTS 41 373 24780800 1900
52428705 LordVoldebug E April 6, 2019, 8:45 p.m. OK Python 3 TESTS 41 389 24576000 1900
55846437 Yatheesha E June 20, 2019, 9:53 p.m. OK Python 3 TESTS 41 389 24678400 1900
52428679 LordVoldebug E April 6, 2019, 8:44 p.m. OK Python 3 TESTS 41 405 24268800 1900
52402423 shade34 E April 6, 2019, 12:39 p.m. OK Python 3 TESTS 41 421 23961600 1900
52408984 asvasil E April 6, 2019, 1:18 p.m. OK Python 3 TESTS 41 483 19046400 1900
52398375 kobae964 E April 6, 2019, 12:19 p.m. OK Rust TESTS 41 218 2662400 1900
52674058 Cactus_Irl E April 13, 2019, 8:46 a.m. OK Scala TESTS 41 670 36556800 1900

remove filters

Back to search problems