Educational Codeforces Round 97 (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
1437 Educational Codeforces Round 97 (Rated for Div. 2) FINISHED False 7200 133543511 Oct. 27, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18077 ) A Marketing Scheme PROGRAMMING brute force constructive algorithms greedy math

B"You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts. Suppose you decided to sell packs with a cans in a pack with a discount and some customer wants to buy x cans of cat food. Then he follows a greedy strategy: <= ft lfloor frac{x}{a} right rfloor is x divided by a rounded down, x bmod a is the remainer of x divided by a . But customers are greedy in general, so if the customer wants to buy (x bmod a) cans one by one and it happens that (x bmod a) ge frac{a}{2} he decides to buy the whole pack of a cans (instead of buying (x bmod a) cans). It makes you, as a marketer, happy since the customer bought more than he wanted initially. You know that each of the customers that come to your shop can buy any number of cans from l to r inclusive. Can you choose such size of pack a that each customer buys more cans than they wanted initially? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first and only line of each test case contains two integers l and r ( 1 <= l <= r <= 10^9 ) -- the range of the number of cans customers can buy. For each test case, print YES if you can choose such size of pack a that each customer buys more cans than they wanted initially. Otherwise, print NO. You can print each character in any case. In the first test case, you can take, for example, a = 5 as the size of the pack. Then if a customer wants to buy 3 cans, he'll buy 5 instead ( 3 bmod 5 = 3 , frac{5}{2} = 2.5 ). The one who wants 4 cans will also buy 5 cans. In the second test case, there is no way to choose a . In the third test case, you can take, for example, a = 80 . "...

Tutorials

84149

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
96951451 hygge_ A Oct. 28, 2020, 2:52 a.m. OK Clang++17 Diagnostics TESTS 16 46 0
96923305 wjhh A Oct. 27, 2020, 4:32 p.m. OK FPC TESTS 3 31 0
96925484 YaVi A Oct. 27, 2020, 4:38 p.m. OK GNU C11 TESTS 3 0 0
96928897 Zinnat_18 A Oct. 27, 2020, 5:04 p.m. OK GNU C11 TESTS 3 15 0
96916963 Tian.kk A Oct. 27, 2020, 4:15 p.m. OK GNU C11 TESTS 3 15 0
96917034 KechZh A Oct. 27, 2020, 4:15 p.m. OK GNU C11 TESTS 3 15 0
96928782 mayeed A Oct. 27, 2020, 5:03 p.m. OK GNU C11 TESTS 3 15 0
96919332 ke_123 A Oct. 27, 2020, 4:22 p.m. OK GNU C11 TESTS 3 30 0
96927497 DipayanDasgupta20 A Oct. 27, 2020, 4:51 p.m. OK GNU C11 TESTS 3 31 0
96928846 adityasaha39 A Oct. 27, 2020, 5:04 p.m. OK GNU C11 TESTS 3 31 0
96934610 supratim_warlord A Oct. 27, 2020, 6:16 p.m. OK GNU C11 TESTS 3 31 0
96957085 quanquan A Oct. 28, 2020, 4:57 a.m. OK GNU C++11 TESTS 16 15 0
96956715 Hamsterw A Oct. 28, 2020, 4:49 a.m. OK GNU C++11 TESTS 16 15 0
96953774 vjudge4 A Oct. 28, 2020, 3:45 a.m. OK GNU C++11 TESTS 16 15 0
96951720 ACananas A Oct. 28, 2020, 2:58 a.m. OK GNU C++11 TESTS 16 15 0
96950679 vinhntndu A Oct. 28, 2020, 2:35 a.m. OK GNU C++11 TESTS 16 15 0
96960366 jeevangkr37 A Oct. 28, 2020, 6 a.m. OK GNU C++11 TESTS 16 15 0
96958513 Desertico A Oct. 28, 2020, 5:26 a.m. OK GNU C++11 TESTS 16 15 0
96957950 mohitbhardwaj01717 A Oct. 28, 2020, 5:15 a.m. OK GNU C++11 TESTS 16 15 0
96957906 Saber8877 A Oct. 28, 2020, 5:13 a.m. OK GNU C++11 TESTS 16 15 0
96957683 9957 A Oct. 28, 2020, 5:09 a.m. OK GNU C++11 TESTS 16 15 0
96927074 Ace.ash A Oct. 27, 2020, 4:48 p.m. OK GNU C++14 TESTS 3 0 0
96935934 striver_123 A Oct. 27, 2020, 6:40 p.m. OK GNU C++14 TESTS 3 15 0
96942881 Ami_K A Oct. 27, 2020, 9:24 p.m. OK GNU C++14 TESTS 3 15 0
96942975 adhipkushwaha A Oct. 27, 2020, 9:28 p.m. OK GNU C++14 TESTS 3 15 0
96937583 ludoking A Oct. 27, 2020, 7:09 p.m. OK GNU C++14 TESTS 3 15 0
96937342 Zys_a A Oct. 27, 2020, 7:04 p.m. OK GNU C++14 TESTS 3 15 0
96941862 c_nirjhor A Oct. 27, 2020, 8:49 p.m. OK GNU C++14 TESTS 3 15 0
96940288 QAWIYY A Oct. 27, 2020, 8:07 p.m. OK GNU C++14 TESTS 3 15 0
96938945 slanuk A Oct. 27, 2020, 7:37 p.m. OK GNU C++14 TESTS 3 15 0
96938709 shubh75anshu A Oct. 27, 2020, 7:31 p.m. OK GNU C++14 TESTS 3 15 0
96928262 mayank2714 A Oct. 27, 2020, 4:58 p.m. OK GNU C++17 TESTS 3 0 0
96942891 brecurse A Oct. 27, 2020, 9:24 p.m. OK GNU C++17 TESTS 3 15 0
96947014 ccsu_xka A Oct. 28, 2020, 12:26 a.m. OK GNU C++17 TESTS 16 15 0
96946983 infixint943 A Oct. 28, 2020, 12:25 a.m. OK GNU C++17 TESTS 16 15 0
96942939 RakibulRanak A Oct. 27, 2020, 9:26 p.m. OK GNU C++17 TESTS 3 15 0
96942181 Kshitij_NSIT_45 A Oct. 27, 2020, 8:58 p.m. OK GNU C++17 TESTS 3 15 0
96941888 A_man909 A Oct. 27, 2020, 8:50 p.m. OK GNU C++17 TESTS 3 15 0
96941650 kush1412 A Oct. 27, 2020, 8:42 p.m. OK GNU C++17 TESTS 3 15 0
96941591 Rs_07 A Oct. 27, 2020, 8:40 p.m. OK GNU C++17 TESTS 3 15 0
96941012 710 A Oct. 27, 2020, 8:24 p.m. OK GNU C++17 TESTS 3 15 0
96938005 over_flow A Oct. 27, 2020, 7:17 p.m. OK GNU C++17 (64) TESTS 3 0 0
96937008 Alex_Lorintz A Oct. 27, 2020, 6:59 p.m. OK GNU C++17 (64) TESTS 3 15 0
96939279 kira201 A Oct. 27, 2020, 7:44 p.m. OK GNU C++17 (64) TESTS 3 15 0
96939604 _KMS_ A Oct. 27, 2020, 7:51 p.m. OK GNU C++17 (64) TESTS 3 15 0
96939905 SheikhSoheil A Oct. 27, 2020, 7:58 p.m. OK GNU C++17 (64) TESTS 3 15 0
96941345 johnathan79717 A Oct. 27, 2020, 8:33 p.m. OK GNU C++17 (64) TESTS 3 15 0
96944975 vjudge1 A Oct. 27, 2020, 10:53 p.m. OK GNU C++17 (64) TESTS 16 15 0
96948776 kyon2326 A Oct. 28, 2020, 1:36 a.m. OK GNU C++17 (64) TESTS 16 15 0
96957629 N1ukash A Oct. 28, 2020, 5:08 a.m. OK GNU C++17 (64) TESTS 16 15 0
96938616 rahulray1470 A Oct. 27, 2020, 7:30 p.m. OK GNU C++17 (64) TESTS 3 15 0
96938338 eR6 A Oct. 27, 2020, 7:24 p.m. OK Go TESTS 3 31 0
96941136 bigode A Oct. 27, 2020, 8:27 p.m. OK Go TESTS 3 77 0
96941157 bigode A Oct. 27, 2020, 8:28 p.m. OK Go TESTS 3 93 0
96923010 meimarcel A Oct. 27, 2020, 4:31 p.m. OK Java 11 TESTS 3 155 0
96938187 Oussama_1 A Oct. 27, 2020, 7:21 p.m. OK Java 11 TESTS 3 155 0
96929846 Codeispower A Oct. 27, 2020, 5:14 p.m. OK Java 11 TESTS 3 155 0
96934033 shubh_jha98 A Oct. 27, 2020, 6:06 p.m. OK Java 11 TESTS 3 170 0
96951438 abdelrahman-yousf A Oct. 28, 2020, 2:52 a.m. OK Java 11 TESTS 16 171 0
96937783 Monkey_de_Luffy A Oct. 27, 2020, 7:13 p.m. OK Java 11 TESTS 3 171 0
96943977 yesbutno1685 A Oct. 27, 2020, 10:05 p.m. OK Java 11 TESTS 16 171 0
96942300 yesbutno1685 A Oct. 27, 2020, 9:02 p.m. OK Java 11 TESTS 3 171 0
96939243 Shokersss A Oct. 27, 2020, 7:43 p.m. OK Java 11 TESTS 3 171 0
96947420 UTix A Oct. 28, 2020, 12:42 a.m. OK Java 11 TESTS 16 171 0
96933346 codebook_2000 A Oct. 27, 2020, 5:56 p.m. OK Java 8 TESTS 3 93 0
96940174 harshitContest A Oct. 27, 2020, 8:04 p.m. OK Java 8 TESTS 3 93 0
96916905 tushar24 A Oct. 27, 2020, 4:15 p.m. OK Java 8 TESTS 3 93 0
96925197 desp__beginner A Oct. 27, 2020, 4:37 p.m. OK Java 8 TESTS 3 108 0
96958027 eng_hardik A Oct. 28, 2020, 5:16 a.m. OK Java 8 TESTS 16 108 0
96947372 Foenic A Oct. 28, 2020, 12:40 a.m. OK Java 8 TESTS 16 108 0
96940324 Philoatef A Oct. 27, 2020, 8:08 p.m. OK Java 8 TESTS 3 108 0
96916702 zahlekhan A Oct. 27, 2020, 4:15 p.m. OK Java 8 TESTS 3 108 0
96956427 ManchesterCityFC A Oct. 28, 2020, 4:43 a.m. OK Java 8 TESTS 16 109 0
96959854 rv6023 A Oct. 28, 2020, 5:51 a.m. OK Java 8 TESTS 16 109 0
96933145 SimoF A Oct. 27, 2020, 5:53 p.m. OK JavaScript TESTS 3 30 0
96939230 nuralamcse024 A Oct. 27, 2020, 7:42 p.m. OK JavaScript TESTS 3 30 204800
96953442 kabden.a A Oct. 28, 2020, 3:38 a.m. OK JavaScript TESTS 16 46 102400
96918259 rupesh.thakur A Oct. 27, 2020, 4:19 p.m. OK Kotlin TESTS 3 124 0
96955674 Spheniscine A Oct. 28, 2020, 4:28 a.m. OK Kotlin TESTS 16 124 0
96939043 Gravekper A Oct. 27, 2020, 7:39 p.m. OK MS C++ 2017 TESTS 3 15 0
96920903 KseniaO A Oct. 27, 2020, 4:26 p.m. OK MS C++ 2017 TESTS 3 30 0
96933342 tawfekhesham A Oct. 27, 2020, 5:56 p.m. OK MS C++ 2017 TESTS 3 30 1024000
96956131 philo_math A Oct. 28, 2020, 4:38 a.m. OK MS C++ 2017 TESTS 16 31 0
96957266 cscnsl A Oct. 28, 2020, 5 a.m. OK MS C++ 2017 TESTS 16 31 0
96956282 philo_math A Oct. 28, 2020, 4:40 a.m. OK MS C++ 2017 TESTS 16 31 0
96956231 philo_math A Oct. 28, 2020, 4:39 a.m. OK MS C++ 2017 TESTS 16 31 0
96951148 vinhntndu A Oct. 28, 2020, 2:46 a.m. OK MS C++ 2017 TESTS 16 31 0
96947905 17658592801 A Oct. 28, 2020, 1:03 a.m. OK MS C++ 2017 TESTS 16 31 0
96939332 lastwock A Oct. 27, 2020, 7:45 p.m. OK MS C++ 2017 TESTS 3 31 0
96917452 mouz A Oct. 27, 2020, 4:17 p.m. OK .NET Core C# TESTS 3 78 102400
96926939 explorer_sifat A Oct. 27, 2020, 4:47 p.m. OK Node.js TESTS 3 61 1126400
96939744 henrychenOutlook A Oct. 27, 2020, 7:54 p.m. OK Node.js TESTS 3 77 1126400
96925632 lebron87 A Oct. 27, 2020, 4:39 p.m. OK PyPy 2 TESTS 3 124 102400
96956517 hxu10 A Oct. 28, 2020, 4:45 a.m. OK PyPy 2 TESTS 16 156 204800
96933170 AggarwalRaghav A Oct. 27, 2020, 5:53 p.m. OK PyPy 3 TESTS 3 124 1740800
96941790 prabakar.rangarajan A Oct. 27, 2020, 8:47 p.m. OK PyPy 3 TESTS 3 139 0
96934711 vvedant99 A Oct. 27, 2020, 6:18 p.m. OK PyPy 3 TESTS 3 140 1331200
96948352 gintoki_s A Oct. 28, 2020, 1:20 a.m. OK PyPy 3 TESTS 16 140 1433600
96951982 AggarwalRaghav A Oct. 28, 2020, 3:05 a.m. OK PyPy 3 TESTS 16 140 1740800
96927597 upadhyay.aaditya2001 A Oct. 27, 2020, 4:52 p.m. OK PyPy 3 TESTS 3 155 409600
96956025 Anuranjan_Pandey A Oct. 28, 2020, 4:35 a.m. OK PyPy 3 TESTS 16 155 1331200
96946797 sanjeevkumar113f A Oct. 28, 2020, 12:17 a.m. OK PyPy 3 TESTS 16 155 1331200
96932874 Bovniova A Oct. 27, 2020, 5:49 p.m. OK PyPy 3 TESTS 3 155 1740800
96931279 priyannk_k A Oct. 27, 2020, 5:28 p.m. OK PyPy 3 TESTS 3 155 2150400
96931687 ShadhinAshraf A Oct. 27, 2020, 5:33 p.m. OK Python 2 TESTS 3 171 0
96942705 safiullinzufar A Oct. 27, 2020, 9:17 p.m. OK Python 3 TESTS 3 92 0
96932401 iterna1 A Oct. 27, 2020, 5:43 p.m. OK Python 3 TESTS 3 93 0
96956803 games.princeraj A Oct. 28, 2020, 4:51 a.m. OK Python 3 TESTS 16 93 0
96948670 Mr.Krishna A Oct. 28, 2020, 1:33 a.m. OK Python 3 TESTS 16 93 0
96946877 BugLeave A Oct. 28, 2020, 12:20 a.m. OK Python 3 TESTS 16 93 0
96941817 Ravi_ISI A Oct. 27, 2020, 8:47 p.m. OK Python 3 TESTS 3 93 0
96938457 renatazip lippert A Oct. 27, 2020, 7:27 p.m. OK Python 3 TESTS 3 93 0
96935300 AkiVirus A Oct. 27, 2020, 6:28 p.m. OK Python 3 TESTS 3 93 0
96934384 raunaqsingh07 A Oct. 27, 2020, 6:12 p.m. OK Python 3 TESTS 3 93 0
96932316 pratish1 A Oct. 27, 2020, 5:41 p.m. OK Python 3 TESTS 3 93 0

remove filters

Back to search problems