Codeforces Round 700 (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
1480 Codeforces Round 700 (Div. 2) FINISHED False 8100 119114699 Feb. 7, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17260 ) B The Great Hero PROGRAMMING greedy implementation

B'The great hero guards the country where Homer lives. The hero has attack power A and initial health value B . There are n monsters in front of the hero. The i -th monster has attack power a_i and initial health value b_i . The hero or a monster is said to be living, if his or its health value is positive (greater than or equal to 1 ); and he or it is said to be dead, if his or its health value is non-positive (less than or equal to 0 ). In order to protect people in the country, the hero will fight with monsters until either the hero is dead or all the monsters are dead. Note that the hero can fight the same monster more than once. For the safety of the people in the country, please tell them whether the great hero can kill all the monsters (even if the great hero himself is dead after killing the last monster). Each test contains multiple test cases. The first line contains t ( 1 <= t <= 10^5 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains three integers A ( 1 <= q A <= q 10^6 ), B ( 1 <= q B <= q 10^6 ) and n ( 1 <= q n <= q 10^5 ) -- the attack power of the great hero, the initial health value of the great hero, and the number of monsters. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q 10^6 ), where a_i denotes the attack power of the i -th monster. The third line of each test case contains n integers b_1, b_2, ... , b_n ( 1 <= q b_i <= q 10^6 ), where b_i denotes the initial health value of the i -th monster. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case print the answer: "YES" (without quotes) if the great hero can kill all the monsters. Otherwise, print "NO" (without quotes). In the first example: There will be 6 fights between the he'...

Tutorials

Editorial of Codeforces Round #700

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
106863014 aldol_reaction B Feb. 8, 2021, 1:07 a.m. OK GNU C++11 TESTS 20 30 3174400
106864165 Aestas16 B Feb. 8, 2021, 1:46 a.m. OK GNU C++11 TESTS 21 31 1433600
106864999 fAKeZero B Feb. 8, 2021, 2:12 a.m. OK GNU C++11 TESTS 21 31 1638400
106862784 lanChe B Feb. 8, 2021, 12:58 a.m. OK GNU C++11 TESTS 20 31 123494400
106869130 goodyy B Feb. 8, 2021, 3:36 a.m. OK GNU C++11 TESTS 21 31 160358400
106866795 SOCAER B Feb. 8, 2021, 2:53 a.m. OK GNU C++11 TESTS 21 46 819200
106851949 fishcathu. B Feb. 7, 2021, 7:37 p.m. OK GNU C++11 TESTS 20 46 819200
106873197 Liuxizai B Feb. 8, 2021, 4:44 a.m. OK GNU C++11 TESTS 21 46 1638400
106868167 MQFLLY B Feb. 8, 2021, 3:20 a.m. OK GNU C++11 TESTS 21 46 1638400
106865382 qdnoip B Feb. 8, 2021, 2:21 a.m. OK GNU C++11 TESTS 21 46 1638400
106876937 rraj0511 B Feb. 8, 2021, 5:37 a.m. OK GNU C++14 TESTS 22 93 819200
106874332 Mr_Knowbody B Feb. 8, 2021, 5:01 a.m. OK GNU C++14 TESTS 22 93 819200
106866557 avinash_2208 B Feb. 8, 2021, 2:47 a.m. OK GNU C++14 TESTS 21 93 1536000
106862772 RedAnt B Feb. 8, 2021, 12:58 a.m. OK GNU C++14 TESTS 20 93 2048000
106874894 Mr_Knowbody B Feb. 8, 2021, 5:09 a.m. OK GNU C++14 TESTS 22 108 819200
106859956 ritesh1340 B Feb. 7, 2021, 10:53 p.m. OK GNU C++14 TESTS 20 108 819200
106876868 marcOS B Feb. 8, 2021, 5:36 a.m. OK GNU C++14 TESTS 22 108 1638400
106876426 protect_our_sansi B Feb. 8, 2021, 5:30 a.m. OK GNU C++14 TESTS 22 108 1638400
106867782 cboy B Feb. 8, 2021, 3:12 a.m. OK GNU C++14 TESTS 21 108 1638400
106857945 Reverent B Feb. 7, 2021, 9:42 p.m. OK GNU C++14 TESTS 20 108 1638400

remove filters

Back to search problems