Codeforces Round 637 (Div. 2) - Thanks, Ivan Belonogov!

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
1341 Codeforces Round 637 (Div. 2) - Thanks, Ivan Belonogov! FINISHED False 9000 144170099 April 23, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29119 ) A Nastya and Rice PROGRAMMING math

B'Nastya just made a huge mistake and dropped a whole package of rice on the floor. Mom will come soon. If she sees this, then Nastya will be punished. In total, Nastya dropped n grains. Nastya read that each grain weighs some integer number of grams from a - b to a + b , inclusive (numbers a and b are known), and the whole package of n grains weighs from c - d to c + d grams, inclusive (numbers c and d are known). The weight of the package is the sum of the weights of all n grains in it. Help Nastya understand if this information can be correct. In other words, check whether each grain can have such a mass that the i -th grain weighs some integer number x_i (a - b <= q x_i <= q a + b) , and in total they weigh from c - d to c + d , inclusive ( c - d <= q sum limits_{i=1}^{n}{x_i} <= q c + d ). The input consists of multiple test cases. The first line contains a single integer t (1 <= q t <= q 1000) -- the number of test cases. The next t lines contain descriptions of the test cases, each line contains 5 integers: n (1 <= q n <= q 1000) -- the number of grains that Nastya counted and a, b, c, d (0 <= q b < a <= q 1000, 0 <= q d < c <= q 1000) -- numbers that determine the possible weight of one grain of rice (from a - b to a + b ) and the possible total weight of the package (from c - d to c + d ). For each test case given in the input print "Yes", if the information about the weights is not inconsistent, and print "No" if n grains with masses from a - b to a + b cannot make a package with a total mass from c - d to c + d . In the first test case of the example, we can assume that each grain weighs 17 grams, and a pack 119 grams, then really Nastya could collect the whole pack. In the third test case of the example, we can assume that each grai'...

Tutorials

Codeforces Round #637 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77912259 vjudge4 A April 24, 2020, 12:56 p.m. OK Clang++17 Diagnostics TESTS 19 62 0
77887583 Tusher_CSE A April 24, 2020, 7:19 a.m. OK Clang++17 Diagnostics TESTS 19 62 0
77884665 Rajveer_100 A April 24, 2020, 6:45 a.m. OK Clang++17 Diagnostics TESTS 19 62 0
77866411 fpc_coder A April 24, 2020, 2:07 a.m. OK FPC TESTS 19 46 0
77832014 Omi074 A April 23, 2020, 4:23 p.m. OK GNU C11 TESTS 19 30 0
77823671 Shafiul_Haque A April 23, 2020, 4:04 p.m. OK GNU C11 TESTS 19 30 0
77866360 zhengfuzhe123 A April 24, 2020, 2:06 a.m. OK GNU C11 TESTS 19 30 0
77848103 RAKIB_2001 A April 23, 2020, 5:03 p.m. OK GNU C11 TESTS 19 30 0
78011617 BlackPanther36 A April 25, 2020, 10:11 a.m. OK GNU C11 TESTS 19 31 0
77957468 Arnab_Bhattacharjee A April 24, 2020, 9:02 p.m. OK GNU C11 TESTS 19 31 0
77952039 ARSLANNN A April 24, 2020, 7:43 p.m. OK GNU C11 TESTS 19 31 0
77950193 Akhirul_abir A April 24, 2020, 7:16 p.m. OK GNU C11 TESTS 19 31 0
77939526 Owafa_Rafa A April 24, 2020, 5:05 p.m. OK GNU C11 TESTS 19 31 0
77933441 AhsanulAnamSaboj A April 24, 2020, 4:01 p.m. OK GNU C11 TESTS 19 31 0
77890649 prakhar_jn A April 24, 2020, 7:56 a.m. OK GNU C++11 TESTS 19 15 0
77983636 vjudge2 A April 25, 2020, 6:34 a.m. OK GNU C++11 TESTS 19 15 0
77952198 Easha_396 A April 24, 2020, 7:45 p.m. OK GNU C++11 TESTS 19 15 0
77919285 Pyqe A April 24, 2020, 2 p.m. OK GNU C++11 TESTS 19 30 0
77895128 nur_riyad A April 24, 2020, 8:49 a.m. OK GNU C++11 TESTS 19 30 0
77889295 Swapnil.Das A April 24, 2020, 7:39 a.m. OK GNU C++11 TESTS 19 30 0
77887774 jujimeizuo A April 24, 2020, 7:21 a.m. OK GNU C++11 TESTS 19 30 0
77880435 MohamedSameh A April 24, 2020, 5:56 a.m. OK GNU C++11 TESTS 19 30 0
78011723 oCaixeiroViajante A April 25, 2020, 10:12 a.m. OK GNU C++11 TESTS 19 30 0
77946269 harivii A April 24, 2020, 6:24 p.m. OK GNU C++11 TESTS 19 30 0
77899633 coder_yash04g A April 24, 2020, 9:42 a.m. OK GNU C++14 TESTS 19 15 0
77920442 anant4999 A April 24, 2020, 2:09 p.m. OK GNU C++14 TESTS 19 15 0
77948950 dedoced A April 24, 2020, 6:59 p.m. OK GNU C++14 TESTS 19 15 0
77969849 heirarchy_1234 A April 25, 2020, 2:48 a.m. OK GNU C++14 TESTS 19 15 0
77970138 Spyder_ab A April 25, 2020, 2:55 a.m. OK GNU C++14 TESTS 19 15 0
77970253 white_knight24 A April 25, 2020, 2:59 a.m. OK GNU C++14 TESTS 19 15 0
77984044 jairadheyshyam A April 25, 2020, 6:39 a.m. OK GNU C++14 TESTS 19 15 0
77984088 vishal_17 A April 25, 2020, 6:39 a.m. OK GNU C++14 TESTS 19 15 0
77990446 ak_tech A April 25, 2020, 7:49 a.m. OK GNU C++14 TESTS 19 15 0
77913774 mohitm12 A April 24, 2020, 1:16 p.m. OK GNU C++14 TESTS 19 15 0
77969577 _Hosam A April 25, 2020, 2:40 a.m. OK GNU C++17 TESTS 19 15 0
77962572 QED A April 24, 2020, 10:56 p.m. OK GNU C++17 TESTS 19 15 0
77950669 _ninja. A April 24, 2020, 7:24 p.m. OK GNU C++17 TESTS 19 15 0
77948211 bourbon_5 A April 24, 2020, 6:50 p.m. OK GNU C++17 TESTS 19 15 0
77940033 IgorI A April 24, 2020, 5:10 p.m. OK GNU C++17 TESTS 19 15 0
77919964 rahanuma28 A April 24, 2020, 2:05 p.m. OK GNU C++17 TESTS 19 15 0
77906761 Zaak22 A April 24, 2020, 11:31 a.m. OK GNU C++17 TESTS 19 15 0
77906568 NikitosBandos A April 24, 2020, 11:28 a.m. OK GNU C++17 TESTS 19 15 0
77906168 Vax A April 24, 2020, 11:23 a.m. OK GNU C++17 TESTS 19 15 0
77905463 Harshil_Goti_2209 A April 24, 2020, 11:13 a.m. OK GNU C++17 TESTS 19 15 0
77874580 shimul_duet A April 24, 2020, 4:34 a.m. OK GNU C++17 (64) TESTS 19 15 0
77986103 vjudge3 A April 25, 2020, 7:01 a.m. OK GNU C++17 (64) TESTS 19 15 0
77972993 ir_1st_vil A April 25, 2020, 4:04 a.m. OK GNU C++17 (64) TESTS 19 15 0
77916750 Geothermal A April 24, 2020, 1:40 p.m. OK GNU C++17 (64) TESTS 19 15 0
77899636 emthrm A April 24, 2020, 9:42 a.m. OK GNU C++17 (64) TESTS 19 15 0
77890862 sharmajatin741 A April 24, 2020, 7:59 a.m. OK GNU C++17 (64) TESTS 19 15 0
77883260 Mmi_bd A April 24, 2020, 6:30 a.m. OK GNU C++17 (64) TESTS 19 15 0
77878509 StrawberryInsha2k A April 24, 2020, 5:31 a.m. OK GNU C++17 (64) TESTS 19 15 0
77878358 ILLLZKQF A April 24, 2020, 5:29 a.m. OK GNU C++17 (64) TESTS 19 15 0
77872249 bibibibi A April 24, 2020, 3:58 a.m. OK GNU C++17 (64) TESTS 19 15 0
77866917 synapse A April 24, 2020, 2:19 a.m. OK Go TESTS 19 31 102400
77822792 tnht95 A April 23, 2020, 4:02 p.m. OK Go TESTS 19 46 0
77861752 codelegend A April 23, 2020, 11:46 p.m. OK Haskell TESTS 19 31 102400
77891677 Piccadilly A April 24, 2020, 8:08 a.m. OK Java 11 TESTS 19 170 0
77962764 gaussianprimes A April 24, 2020, 11:01 p.m. OK Java 11 TESTS 19 171 0
77932972 sourav2999 A April 24, 2020, 3:56 p.m. OK Java 11 TESTS 19 171 0
77855483 ddhroov10 A April 23, 2020, 9:38 p.m. OK Java 11 TESTS 19 171 0
77876632 p_unit A April 24, 2020, 5:04 a.m. OK Java 11 TESTS 19 186 0
77861772 sunnyguan A April 23, 2020, 11:47 p.m. OK Java 11 TESTS 19 186 0
77838374 bckslsh03 A April 23, 2020, 4:38 p.m. OK Java 11 TESTS 19 186 0
78007240 Manjot1151 A April 25, 2020, 9:22 a.m. OK Java 11 TESTS 19 187 0
77881948 nickleoden299 A April 24, 2020, 6:14 a.m. OK Java 11 TESTS 19 187 0
77876436 mr___hacker____ A April 24, 2020, 5:02 a.m. OK Java 11 TESTS 19 187 0
77944068 prashanth21992 A April 24, 2020, 5:58 p.m. OK Java 8 TESTS 19 108 0
77962631 K.Mostafa A April 24, 2020, 10:57 p.m. OK Java 8 TESTS 19 109 0
77989730 sumedh.shenoy A April 25, 2020, 7:41 a.m. OK Java 8 TESTS 19 109 0
77959413 eng_hardik A April 24, 2020, 9:40 p.m. OK Java 8 TESTS 19 109 0
77945198 prashanth21992 A April 24, 2020, 6:11 p.m. OK Java 8 TESTS 19 109 0
77943520 prashanth21992 A April 24, 2020, 5:52 p.m. OK Java 8 TESTS 19 109 0
77943339 prashanth21992 A April 24, 2020, 5:49 p.m. OK Java 8 TESTS 19 109 0
77940065 sgt A April 24, 2020, 5:11 p.m. OK Java 8 TESTS 19 109 0
77933859 booleanfalse A April 24, 2020, 4:04 p.m. OK Java 8 TESTS 19 109 0
77887238 MiroO A April 24, 2020, 7:15 a.m. OK Java 8 TESTS 19 109 0
77965645 Gias_Uddin_Tahery A April 25, 2020, 12:36 a.m. OK JavaScript TESTS 19 46 102400
77889795 Luay A April 24, 2020, 7:46 a.m. OK JavaScript TESTS 19 61 0
77874527 koboshi A April 24, 2020, 4:33 a.m. OK Kotlin TESTS 19 124 0
77862989 Spheniscine A April 24, 2020, 12:24 a.m. OK Kotlin TESTS 19 140 0
77832970 slemus A April 23, 2020, 4:25 p.m. OK Kotlin TESTS 19 155 102400
77908706 forsenE A April 24, 2020, 11:57 a.m. OK Kotlin TESTS 19 155 102400
77893048 TadijaSebez A April 24, 2020, 8:25 a.m. OK Kotlin TESTS 19 155 102400
77861670 Hakiobo A April 23, 2020, 11:44 p.m. OK Kotlin TESTS 19 155 102400
77876562 Chef_17 A April 24, 2020, 5:03 a.m. OK Kotlin TESTS 19 171 102400
77859020 thetansquared A April 23, 2020, 10:33 p.m. OK Mono C# TESTS 19 46 307200
77877970 Peaky-Blinder A April 24, 2020, 5:24 a.m. OK Mono C# TESTS 19 62 307200
77888262 TRR A April 24, 2020, 7:27 a.m. OK Mono C# TESTS 19 62 307200
77845002 JamshedUrunov A April 23, 2020, 4:55 p.m. OK Mono C# TESTS 19 62 409600
77833603 ellip A April 23, 2020, 4:27 p.m. OK Mono C# TESTS 19 77 4096000
77905087 pacificus A April 24, 2020, 11:08 a.m. OK Mono C# TESTS 19 93 3993600
77988305 artworks A April 25, 2020, 7:24 a.m. OK Mono C# TESTS 19 109 5427200
77984301 vjudge4 A April 25, 2020, 6:42 a.m. OK MS C++ TESTS 19 30 0
77822056 CloudPure A April 23, 2020, 4:01 p.m. OK MS C++ TESTS 19 31 0
77832385 Wizard_bq A April 23, 2020, 4:24 p.m. OK MS C++ TESTS 19 31 0
77950374 __qwerty__ A April 24, 2020, 7:20 p.m. OK MS C++ 2017 TESTS 19 31 0
77996649 akibreza A April 25, 2020, 8:17 a.m. OK MS C++ 2017 TESTS 19 31 0
77986946 vjudge3 A April 25, 2020, 7:10 a.m. OK MS C++ 2017 TESTS 19 31 0
77981560 vjudge2 A April 25, 2020, 6:10 a.m. OK MS C++ 2017 TESTS 19 31 0
77940289 aliaksandr A April 24, 2020, 5:13 p.m. OK MS C++ 2017 TESTS 19 31 0
77917792 vjudge5 A April 24, 2020, 1:49 p.m. OK MS C++ 2017 TESTS 19 31 0
77917255 vjudge1 A April 24, 2020, 1:44 p.m. OK MS C++ 2017 TESTS 19 31 0
77916411 vjudge2 A April 24, 2020, 1:38 p.m. OK MS C++ 2017 TESTS 19 31 0
77912085 vjudge2 A April 24, 2020, 12:53 p.m. OK MS C++ 2017 TESTS 19 31 0
77884494 Imlevi A April 24, 2020, 6:43 a.m. OK MS C++ 2017 TESTS 19 31 0
77869920 arpit2438735 A April 24, 2020, 3:19 a.m. OK Node.js TESTS 19 186 1228800
77859527 c1729 A April 23, 2020, 10:45 p.m. OK PyPy 2 TESTS 19 155 102400
78009519 forifchen A April 25, 2020, 9:48 a.m. OK PyPy 2 TESTS 19 186 819200
77884566 kit.shiron A April 24, 2020, 6:44 a.m. OK PyPy 2 TESTS 19 217 307200
77933358 codefu A April 24, 2020, 4 p.m. OK PyPy 3 TESTS 19 155 1433600
77907831 apoorvwatsky A April 24, 2020, 11:46 a.m. OK PyPy 3 TESTS 19 155 1433600
77904869 Anuranjan_Pandey A April 24, 2020, 11:05 a.m. OK PyPy 3 TESTS 19 155 1638400
77884362 _viru_ A April 24, 2020, 6:42 a.m. OK PyPy 3 TESTS 19 156 1843200
77823510 suchet0825 A April 23, 2020, 4:04 p.m. OK PyPy 3 TESTS 19 170 2048000
77849544 thecodearrow A April 23, 2020, 5:06 p.m. OK PyPy 3 TESTS 19 170 2150400
77965813 roaris A April 25, 2020, 12:43 a.m. OK PyPy 3 TESTS 19 171 1843200
77938334 shantol A April 24, 2020, 4:50 p.m. OK PyPy 3 TESTS 19 171 1843200
77950375 bit_2 A April 24, 2020, 7:20 p.m. OK PyPy 3 TESTS 19 171 2150400
77949316 bit_2 A April 24, 2020, 7:04 p.m. OK PyPy 3 TESTS 19 171 2150400
77965286 sirjan13 A April 25, 2020, 12:24 a.m. OK Python 2 TESTS 19 171 0
77862800 i_m_Shakil A April 24, 2020, 12:18 a.m. OK Python 2 TESTS 19 171 0
77860869 ComptineDunAutreEte A April 23, 2020, 11:19 p.m. OK Python 2 TESTS 19 171 0
77909378 bhawani_pr0 A April 24, 2020, 12:07 p.m. OK Python 2 TESTS 19 186 0
77824188 s1997 A April 23, 2020, 4:05 p.m. OK Python 2 TESTS 19 187 0
77969300 Edward31 A April 25, 2020, 2:31 a.m. OK Python 3 TESTS 19 108 0
77887789 Mirali A April 24, 2020, 7:21 a.m. OK Python 3 TESTS 19 108 0
77976393 SAZZZO99 A April 25, 2020, 5:03 a.m. OK Python 3 TESTS 19 108 307200
77882045 kznil96 A April 24, 2020, 6:15 a.m. OK Python 3 TESTS 19 108 307200
77858149 gaha A April 23, 2020, 10:15 p.m. OK Python 3 TESTS 19 108 307200
77822709 Espad0 A April 23, 2020, 4:02 p.m. OK Python 3 TESTS 19 108 307200
78007888 bdomokos A April 25, 2020, 9:30 a.m. OK Python 3 TESTS 19 109 0
77986502 TeraFuffad A April 25, 2020, 7:05 a.m. OK Python 3 TESTS 19 109 0
77974694 Maverick29 A April 25, 2020, 4:33 a.m. OK Python 3 TESTS 19 109 0
77945450 rish_101 A April 24, 2020, 6:13 p.m. OK Python 3 TESTS 19 109 0
78008534 wasiq.bhamla A April 25, 2020, 9:37 a.m. OK Ruby TESTS 19 77 102400
77864657 sansen A April 24, 2020, 1:16 a.m. OK Rust TESTS 19 31 102400
77897384 xyqkoala A April 24, 2020, 9:16 a.m. OK Rust TESTS 19 31 307200

remove filters

Back to search problems