Codeforces Round 530 (Div. 1)

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
1098 Codeforces Round 530 (Div. 1) FINISHED False 9000 190819523 Jan. 5, 2019, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 800 ) D Eels PROGRAMMING data structures 2700

B'Vasya is a big fish lover, and his parents gave him an aquarium for the New Year. Vasya does not have a degree in ichthyology, so he thinks that filling a new aquarium with eels is a good idea. Unfortunately, eels are predators, so Vasya decided to find out how dangerous this idea was. Getting into one aquarium, eels fight each other until exactly one fish remains. When two eels fight, the big one eats the smaller one (if their weights are equal, then one of them will still eat the other). Namely, let n eels be initially in an aquarium, and the i -th of them have a weight of x_i . Then n-1 battles will occur between them, as a result of which, only one eel will survive. In a battle of two eels with weights a and b , where a <= b , eel of weight a will be eaten and disappear from the aquarium, and eel of weight b will increase its weight to a+b . A battle between two eels with weights a and b , where a <= b , is considered dangerous if b <= 2 a . For a given set of eels, danger is defined as the maximum number of dangerous battles that can occur among these eels if they are placed in one aquarium. Now Vasya is planning, which eels he wants to put into an aquarium. He has some set of eels (initially empty). He makes a series of operations with this set. With each operation, he either adds one eel in the set, or removes one eel from the set. Vasya asks you to calculate the danger of the current set of eels after each operation. The first line of input contains a single integer q ( 1 <= q <= 500 ,000 ), the number of operations that Vasya makes. The next q lines describe operations. Each operation has one of two types : For each operation, output single integer, the danger of the set of eels after this operation. In the third example, after performing all the operations, the set of eels looks like {1, 1, 4 } . For this set of eels, there are several possible '...

Tutorials

64331

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50663012 rainboy D March 2, 2019, 1:30 a.m. OK GNU C11 TESTS 71 2339 22835200 2700
48318220 Hazyknight D Jan. 13, 2019, 7:48 a.m. OK GNU C++11 TESTS 71 202 25190400 2700
48654348 ReaLNero1 D Jan. 21, 2019, 1:29 a.m. OK GNU C++11 TESTS 71 249 3993600 2700
48106618 Enderwitherzjdl D Jan. 9, 2019, 5:52 a.m. OK GNU C++11 TESTS 71 249 3993600 2700
48298180 _twilight D Jan. 12, 2019, 3:33 p.m. OK GNU C++11 TESTS 71 296 4096000 2700
52882453 Ogiso D April 17, 2019, 1:51 a.m. OK GNU C++11 TESTS 71 343 4710400 2700
49517636 idxcalccalc D Feb. 6, 2019, 5:01 a.m. OK GNU C++11 TESTS 71 390 4096000 2700
48520616 QAQAutoMaton D Jan. 18, 2019, 6:30 a.m. OK GNU C++11 TESTS 71 405 20275200 2700
48197963 luogu_bot4 D Jan. 11, 2019, 1:40 a.m. OK GNU C++11 TESTS 71 436 16076800 2700
48211577 samjia2000 D Jan. 11, 2019, 12:20 p.m. OK GNU C++11 TESTS 71 451 16179200 2700
60511433 pbihao D Sept. 14, 2019, 3:17 a.m. OK GNU C++11 TESTS 71 483 20172800 2700
48026374 tmwilliamlin168 D Jan. 6, 2019, 9:22 a.m. OK GNU C++14 TESTS 71 311 4096000 2700
50597614 jerome_wei D Feb. 28, 2019, 11:13 a.m. OK GNU C++14 TESTS 71 389 4300800 2700
48448633 cz_xuyixuan D Jan. 16, 2019, 8:54 a.m. OK GNU C++14 TESTS 71 421 3993600 2700
48012955 snuke D Jan. 5, 2019, 8:28 p.m. OK GNU C++14 TESTS 71 482 14745600 2700
48013652 snuke D Jan. 5, 2019, 8:47 p.m. OK GNU C++14 TESTS 71 483 10547200 2700
48364439 RobeZH D Jan. 13, 2019, 8:30 p.m. OK GNU C++14 TESTS 71 483 16281600 2700
48007481 snuke D Jan. 5, 2019, 6:42 p.m. OK GNU C++14 TESTS 71 498 14745600 2700
51615140 mobu233 D March 21, 2019, 12:09 p.m. OK GNU C++14 TESTS 71 499 4300800 2700
49821676 cloudsky01 D Feb. 12, 2019, 9:14 a.m. OK GNU C++14 TESTS 71 530 16281600 2700
51116579 alechuang98 D March 10, 2019, 7:15 a.m. OK GNU C++14 TESTS 71 530 16281600 2700
48387519 redocyz D Jan. 14, 2019, 1:47 p.m. OK GNU C++17 TESTS 71 311 4198400 2700
48388673 redocyz D Jan. 14, 2019, 2:15 p.m. OK GNU C++17 TESTS 71 311 4505600 2700
48118164 forget D Jan. 9, 2019, 2:06 p.m. OK GNU C++17 TESTS 71 311 4505600 2700
48389054 redocyz D Jan. 14, 2019, 2:26 p.m. OK GNU C++17 TESTS 71 311 4505600 2700
48386539 redocyz D Jan. 14, 2019, 1:21 p.m. OK GNU C++17 TESTS 71 312 4505600 2700
48388560 redocyz D Jan. 14, 2019, 2:12 p.m. OK GNU C++17 TESTS 71 327 4198400 2700
48118039 forget D Jan. 9, 2019, 2:02 p.m. OK GNU C++17 TESTS 71 327 4198400 2700
48049398 adedalic D Jan. 7, 2019, 7:38 a.m. OK GNU C++17 TESTS 71 499 16281600 2700
48304361 bmerry D Jan. 12, 2019, 6:46 p.m. OK GNU C++17 TESTS 71 514 16588800 2700
67260940 Thuleanx D Dec. 20, 2019, 3:24 a.m. OK GNU C++17 TESTS 71 514 23859200 2700
47996961 Petr D Jan. 5, 2019, 5:45 p.m. OK Java 8 TESTS 71 826 15872000 2700
66685845 dalt D Dec. 12, 2019, 1:47 p.m. OK Java 8 TESTS 71 904 53555200 2700
48006663 uwi D Jan. 5, 2019, 6:37 p.m. OK Java 8 TESTS 71 997 33177600 2700
50663013 Dukkha D March 2, 2019, 1:30 a.m. OK Java 8 TESTS 71 1419 36454400 2700
48029419 qwerty787788 D Jan. 6, 2019, 11:26 a.m. OK Java 8 TESTS 71 2261 49152000 2700
48010964 ilyakor D Jan. 5, 2019, 7:03 p.m. OK Java 8 TESTS 71 2901 178688000 2700
52072397 hld67890 D March 31, 2019, 8:25 a.m. OK MS C++ 2017 TESTS 71 763 16076800 2700

remove filters

Back to search problems