Educational Codeforces Round 74 (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
1238 Educational Codeforces Round 74 (Rated for Div. 2) FINISHED False 8400 166893887 Oct. 8, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24876 ) A Prime Subtraction PROGRAMMING math number theory 900

B'You are given two integers x and y (it is guaranteed that x > y ). You may choose any prime integer p and subtract it any number of times from x . Is it possible to make x equal to y ? Recall that a prime number is a positive integer that has exactly two positive divisors: 1 and this integer itself. The sequence of prime numbers starts with 2 , 3 , 5 , 7 , 11 . Your program should solve t independent test cases. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then t lines follow, each describing a test case. Each line contains two integers x and y ( 1 <= y < x <= 10^{18} ). For each test case, print YES if it is possible to choose a prime number p and subtract it any number of times from x so that x becomes equal to y . Otherwise, print NO. You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes, and YES will all be recognized as positive answer). In the first test of the example you may choose p = 2 and subtract it once. In the second test of the example you may choose p = 5 and subtract it twice. Note that you cannot choose p = 7 , subtract it, then choose p = 3 and subtract it again. In the third test of the example you may choose p = 3 and subtract it 333333333333333333 times. '...

Tutorials

Educational Codeforces Round 74 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62126095 daut-dlang A Oct. 8, 2019, 2:44 p.m. OK D TESTS 42 31 0 900
62124768 ruban A Oct. 8, 2019, 2:42 p.m. OK Delphi TESTS 42 31 6553600 900
62135661 melery_kin A Oct. 8, 2019, 3:26 p.m. OK FPC TESTS 42 31 0 900
62145949 tranminhprvt01 A Oct. 8, 2019, 4:06 p.m. OK FPC TESTS 42 31 0 900
62122223 AlifSaddid A Oct. 8, 2019, 2:38 p.m. OK FPC TESTS 42 31 0 900
62120824 LaSWeeG A Oct. 8, 2019, 2:36 p.m. OK FPC TESTS 42 31 0 900
62126737 MaxDragonz A Oct. 8, 2019, 2:49 p.m. OK FPC TESTS 42 31 102400 900
62147535 duydec1 A Oct. 8, 2019, 4:14 p.m. OK FPC TESTS 42 46 0 900
62121966 Craspedacusta A Oct. 8, 2019, 2:38 p.m. OK FPC TESTS 42 46 0 900
62129014 avash A Oct. 8, 2019, 2:57 p.m. OK GNU C11 TESTS 42 30 0 900
62123009 pengin_2000 A Oct. 8, 2019, 2:39 p.m. OK GNU C11 TESTS 42 30 0 900
62132520 abhi5654 A Oct. 8, 2019, 3:12 p.m. OK GNU C11 TESTS 42 30 0 900
62152695 jschr A Oct. 8, 2019, 4:39 p.m. OK GNU C11 TESTS 42 31 0 900
62141731 TARIQ A Oct. 8, 2019, 3:49 p.m. OK GNU C11 TESTS 42 31 0 900
62147708 Admirer.secret A Oct. 8, 2019, 4:14 p.m. OK GNU C11 TESTS 42 31 0 900
62148148 Mad_proton A Oct. 8, 2019, 4:17 p.m. OK GNU C11 TESTS 42 31 0 900
62148589 DARK_HAT A Oct. 8, 2019, 4:19 p.m. OK GNU C11 TESTS 42 31 0 900
62150505 KoushikNewCoder A Oct. 8, 2019, 4:28 p.m. OK GNU C11 TESTS 42 31 0 900
62151831 vlad9i2 A Oct. 8, 2019, 4:34 p.m. OK GNU C11 TESTS 42 31 0 900
62122757 carcar A Oct. 8, 2019, 2:39 p.m. OK GNU C++11 TESTS 42 30 0 900
62130645 weerapat15 A Oct. 8, 2019, 3:02 p.m. OK GNU C++11 TESTS 42 30 0 900
62151926 wesam_alsohli A Oct. 8, 2019, 4:35 p.m. OK GNU C++11 TESTS 42 30 0 900
62126578 AbdulRahman_Nour A Oct. 8, 2019, 2:48 p.m. OK GNU C++11 TESTS 42 30 0 900
62125683 yordanlp A Oct. 8, 2019, 2:44 p.m. OK GNU C++11 TESTS 42 30 0 900
62124902 rmo A Oct. 8, 2019, 2:42 p.m. OK GNU C++11 TESTS 42 30 0 900
62124135 zengzk A Oct. 8, 2019, 2:40 p.m. OK GNU C++11 TESTS 42 30 0 900
62123449 cy1999 A Oct. 8, 2019, 2:39 p.m. OK GNU C++11 TESTS 42 30 0 900
62127490 Amadeus_System A Oct. 8, 2019, 2:54 p.m. OK GNU C++11 TESTS 42 30 0 900
62129540 lordofthunder A Oct. 8, 2019, 2:58 p.m. OK GNU C++11 TESTS 42 30 0 900
62125907 Best_Master_Yoda A Oct. 8, 2019, 2:44 p.m. OK GNU C++14 TESTS 42 15 0 900
62124022 SugA A Oct. 8, 2019, 2:40 p.m. OK GNU C++14 TESTS 42 15 0 900
62123498 __manish__ A Oct. 8, 2019, 2:39 p.m. OK GNU C++14 TESTS 42 15 0 900
62123130 mir003 A Oct. 8, 2019, 2:39 p.m. OK GNU C++14 TESTS 42 15 0 900
62121823 tajirhas9 A Oct. 8, 2019, 2:37 p.m. OK GNU C++14 TESTS 42 15 0 900
62121045 Mr_Programmer_98 A Oct. 8, 2019, 2:36 p.m. OK GNU C++14 TESTS 42 15 0 900
62129707 singla.sahil221 A Oct. 8, 2019, 2:59 p.m. OK GNU C++14 TESTS 42 15 0 900
62145586 rezcoder_ A Oct. 8, 2019, 4:05 p.m. OK GNU C++14 TESTS 42 30 0 900
62147249 LOlPop A Oct. 8, 2019, 4:12 p.m. OK GNU C++14 TESTS 42 30 0 900
62143223 ssinghal13 A Oct. 8, 2019, 3:55 p.m. OK GNU C++14 TESTS 42 30 0 900
62145276 Dk23 A Oct. 8, 2019, 4:03 p.m. OK GNU C++17 TESTS 42 15 0 900
62121024 achvanov A Oct. 8, 2019, 2:36 p.m. OK GNU C++17 TESTS 42 15 0 900
62121116 jjang36524 A Oct. 8, 2019, 2:37 p.m. OK GNU C++17 TESTS 42 15 0 900
62121422 shelby A Oct. 8, 2019, 2:37 p.m. OK GNU C++17 TESTS 42 15 0 900
62121567 4qqqq A Oct. 8, 2019, 2:37 p.m. OK GNU C++17 TESTS 42 15 0 900
62121713 Hasti_K A Oct. 8, 2019, 2:37 p.m. OK GNU C++17 TESTS 42 15 0 900
62124538 system1 A Oct. 8, 2019, 2:41 p.m. OK GNU C++17 TESTS 42 15 0 900
62124901 superslow A Oct. 8, 2019, 2:42 p.m. OK GNU C++17 TESTS 42 15 0 900
62125229 coder_h A Oct. 8, 2019, 2:43 p.m. OK GNU C++17 TESTS 42 15 0 900
62155260 Mahmud_Rifat A Oct. 8, 2019, 4:50 p.m. OK GNU C++17 TESTS 42 30 0 900
62125291 maguroguma A Oct. 8, 2019, 2:43 p.m. OK Go TESTS 42 31 0 900
62125363 torus711 A Oct. 8, 2019, 2:43 p.m. OK Haskell TESTS 42 46 102400 900
62134131 Mustafa__ A Oct. 8, 2019, 3:20 p.m. OK Java 8 TESTS 42 109 0 900
62129361 KingAdam A Oct. 8, 2019, 2:58 p.m. OK Java 8 TESTS 42 109 0 900
62128673 PassedPawn A Oct. 8, 2019, 2:56 p.m. OK Java 8 TESTS 42 109 0 900
62125703 elkadymohammed01 A Oct. 8, 2019, 2:44 p.m. OK Java 8 TESTS 42 109 0 900
62152688 Shubhanshuj22 A Oct. 8, 2019, 4:38 p.m. OK Java 8 TESTS 42 124 0 900
62152330 MubtasimShahriar A Oct. 8, 2019, 4:37 p.m. OK Java 8 TESTS 42 124 0 900
62149306 Musin A Oct. 8, 2019, 4:22 p.m. OK Java 8 TESTS 42 124 0 900
62145049 Java A Oct. 8, 2019, 4:02 p.m. OK Java 8 TESTS 42 124 0 900
62139725 Nutella3000 A Oct. 8, 2019, 3:40 p.m. OK Java 8 TESTS 42 124 0 900
62138369 sthfaceless A Oct. 8, 2019, 3:35 p.m. OK Java 8 TESTS 42 124 0 900
62122731 mirennn A Oct. 8, 2019, 2:38 p.m. OK Kotlin TESTS 42 171 0 900
62143480 sainageswar A Oct. 8, 2019, 3:56 p.m. OK Kotlin TESTS 42 171 204800 900
62126978 david_varela A Oct. 8, 2019, 2:51 p.m. OK Kotlin TESTS 42 171 1228800 900
62124895 fredboy A Oct. 8, 2019, 2:42 p.m. OK Kotlin TESTS 42 171 1331200 900
62142066 gpletnev A Oct. 8, 2019, 3:50 p.m. OK Kotlin TESTS 42 186 204800 900
62128855 david_varela A Oct. 8, 2019, 2:57 p.m. OK Kotlin TESTS 42 186 1228800 900
62131588 tadashiya A Oct. 8, 2019, 3:07 p.m. OK Kotlin TESTS 42 187 204800 900
62122468 Romansbobans A Oct. 8, 2019, 2:38 p.m. OK Kotlin TESTS 42 202 0 900
62125573 Ahmadjon A Oct. 8, 2019, 2:43 p.m. OK Kotlin TESTS 42 218 204800 900
62122662 eki A Oct. 8, 2019, 2:38 p.m. OK Mono C# TESTS 42 46 307200 900
62128676 vitaly_megabyte A Oct. 8, 2019, 2:56 p.m. OK Mono C# TESTS 42 61 307200 900
62132273 1champ10n A Oct. 8, 2019, 3:11 p.m. OK Mono C# TESTS 42 61 307200 900
62123396 Ruban_Denic A Oct. 8, 2019, 2:39 p.m. OK Mono C# TESTS 42 61 307200 900
62122408 Giangvp A Oct. 8, 2019, 2:38 p.m. OK Mono C# TESTS 42 62 307200 900
62125053 Tan42 A Oct. 8, 2019, 2:42 p.m. OK Mono C# TESTS 42 62 307200 900
62126096 gunfiighter A Oct. 8, 2019, 2:44 p.m. OK Mono C# TESTS 42 62 307200 900
62124488 mban259 A Oct. 8, 2019, 2:41 p.m. OK Mono C# TESTS 42 62 409600 900
62122053 omikad A Oct. 8, 2019, 2:38 p.m. OK Mono C# TESTS 42 62 409600 900
62123407 Yupiteru A Oct. 8, 2019, 2:39 p.m. OK Mono C# TESTS 42 62 136499200 900
62129681 yzhyzh A Oct. 8, 2019, 2:58 p.m. OK MS C++ TESTS 42 31 0 900
62126054 xyyshh A Oct. 8, 2019, 2:44 p.m. OK MS C++ TESTS 42 31 0 900
62125337 sakshi12 A Oct. 8, 2019, 2:43 p.m. OK MS C++ TESTS 42 31 0 900
62122155 platter A Oct. 8, 2019, 2:38 p.m. OK MS C++ TESTS 42 31 0 900
62139994 QaZEdCTgB A Oct. 8, 2019, 3:42 p.m. OK MS C++ TESTS 42 31 0 900
62137433 vladvladvladvladvlad A Oct. 8, 2019, 3:32 p.m. OK MS C++ TESTS 42 31 0 900
62147642 _Neuromancer_ A Oct. 8, 2019, 4:14 p.m. OK MS C++ TESTS 42 31 0 900
62138523 1anton1 A Oct. 8, 2019, 3:36 p.m. OK MS C++ TESTS 42 31 0 900
62124995 Stezok A Oct. 8, 2019, 2:42 p.m. OK MS C++ TESTS 42 31 102400 900
62135413 Flighter A Oct. 8, 2019, 3:25 p.m. OK MS C++ TESTS 42 46 0 900
62142466 zeroday343 A Oct. 8, 2019, 3:52 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62139277 sf_fuad_brur A Oct. 8, 2019, 3:39 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62151879 MikeAirone A Oct. 8, 2019, 4:34 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62153650 ViC_17 A Oct. 8, 2019, 4:43 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62153810 little_superhero A Oct. 8, 2019, 4:44 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62155097 jebinakter A Oct. 8, 2019, 4:50 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62151823 pecassok A Oct. 8, 2019, 4:34 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62146171 prateek3110 A Oct. 8, 2019, 4:07 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62145358 themohan A Oct. 8, 2019, 4:04 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62141564 dmitrii.krasnihin A Oct. 8, 2019, 3:48 p.m. OK MS C++ 2017 TESTS 42 31 0 900
62122607 mm944 A Oct. 8, 2019, 2:38 p.m. OK PascalABC.NET TESTS 42 202 0 900
62150855 PAG A Oct. 8, 2019, 4:29 p.m. OK PascalABC.NET TESTS 42 327 102400 900
62139481 StEpAn_123 A Oct. 8, 2019, 3:39 p.m. OK PascalABC.NET TESTS 42 358 102400 900
62121847 l-_-l A Oct. 8, 2019, 2:37 p.m. OK PascalABC.NET TESTS 42 373 102400 900
62147555 eeone_007 A Oct. 8, 2019, 4:14 p.m. OK PascalABC.NET TESTS 42 373 307200 900
62125510 rsFalse A Oct. 8, 2019, 2:43 p.m. OK Perl TESTS 42 62 0 900
62123739 Mukundan314 A Oct. 8, 2019, 2:40 p.m. OK PyPy 2 TESTS 42 140 102400 900
62126023 hritik3878 A Oct. 8, 2019, 2:44 p.m. OK PyPy 2 TESTS 42 155 204800 900
62123730 zaceleiseliakai A Oct. 8, 2019, 2:40 p.m. OK PyPy 2 TESTS 42 155 409600 900
62121355 bcollet A Oct. 8, 2019, 2:37 p.m. OK PyPy 2 TESTS 42 155 409600 900
62146668 boboniu A Oct. 8, 2019, 4:09 p.m. OK PyPy 2 TESTS 42 155 409600 900
62121763 _kawaii_neko_ A Oct. 8, 2019, 2:37 p.m. OK PyPy 2 TESTS 42 170 409600 900
62122849 pajenegod A Oct. 8, 2019, 2:39 p.m. OK PyPy 2 TESTS 42 186 921600 900
62121023 iamprayush A Oct. 8, 2019, 2:36 p.m. OK PyPy 2 TESTS 42 187 2560000 900
62121514 Jobless22 A Oct. 8, 2019, 2:37 p.m. OK PyPy 2 TESTS 42 202 1843200 900
62120907 astrom.lars A Oct. 8, 2019, 2:36 p.m. OK PyPy 2 TESTS 42 249 409600 900
62133559 pineriver A Oct. 8, 2019, 3:17 p.m. OK PyPy 3 TESTS 42 140 102400 900
62123775 -ilja- A Oct. 8, 2019, 2:40 p.m. OK PyPy 3 TESTS 42 140 1536000 900
62124374 nagitaosu A Oct. 8, 2019, 2:41 p.m. OK PyPy 3 TESTS 42 155 1536000 900
62122775 ngsm A Oct. 8, 2019, 2:39 p.m. OK PyPy 3 TESTS 42 155 1536000 900
62122656 titia A Oct. 8, 2019, 2:38 p.m. OK PyPy 3 TESTS 42 155 1536000 900
62121513 Stephan A Oct. 8, 2019, 2:37 p.m. OK PyPy 3 TESTS 42 155 1536000 900
62122425 sm1ley A Oct. 8, 2019, 2:38 p.m. OK PyPy 3 TESTS 42 155 1740800 900
62125906 _Kee A Oct. 8, 2019, 2:44 p.m. OK PyPy 3 TESTS 42 155 1945600 900
62121980 vinuthegr8 A Oct. 8, 2019, 2:38 p.m. OK PyPy 3 TESTS 42 156 1536000 900
62124357 Mr.Inconsistent A Oct. 8, 2019, 2:41 p.m. OK PyPy 3 TESTS 42 156 1945600 900
62154486 madmonl A Oct. 8, 2019, 4:47 p.m. OK Python 2 TESTS 42 187 0 900
62140020 chai_peelo A Oct. 8, 2019, 3:42 p.m. OK Python 2 TESTS 42 187 0 900
62133039 coderbd A Oct. 8, 2019, 3:15 p.m. OK Python 2 TESTS 42 187 0 900
62122454 timaktimak A Oct. 8, 2019, 2:38 p.m. OK Python 2 TESTS 42 187 409600 900
62129511 1252187392 A Oct. 8, 2019, 2:58 p.m. OK Python 2 TESTS 42 202 0 900
62152874 Raselroky A Oct. 8, 2019, 4:39 p.m. OK Python 3 TESTS 42 109 0 900
62152713 Hack-me A Oct. 8, 2019, 4:39 p.m. OK Python 3 TESTS 42 109 0 900
62149987 Jeet982112 A Oct. 8, 2019, 4:25 p.m. OK Python 3 TESTS 42 109 0 900
62145515 PJdan A Oct. 8, 2019, 4:04 p.m. OK Python 3 TESTS 42 109 0 900
62141689 hibro_123 A Oct. 8, 2019, 3:48 p.m. OK Python 3 TESTS 42 109 0 900
62140685 carol_vers A Oct. 8, 2019, 3:44 p.m. OK Python 3 TESTS 42 109 0 900
62138288 Yogesh77777 A Oct. 8, 2019, 3:35 p.m. OK Python 3 TESTS 42 109 0 900
62137338 Prakriti28 A Oct. 8, 2019, 3:31 p.m. OK Python 3 TESTS 42 109 0 900
62131735 sainipradeep195 A Oct. 8, 2019, 3:08 p.m. OK Python 3 TESTS 42 109 0 900
62131350 nauman78 A Oct. 8, 2019, 3:05 p.m. OK Python 3 TESTS 42 109 0 900
62123461 koikotya A Oct. 8, 2019, 2:39 p.m. OK Ruby TESTS 42 77 102400 900
62123654 yoshrc A Oct. 8, 2019, 2:40 p.m. OK Rust TESTS 42 31 0 900
62121526 sansen A Oct. 8, 2019, 2:37 p.m. OK Rust TESTS 42 31 102400 900
62132286 cptrodgers A Oct. 8, 2019, 3:11 p.m. OK Rust TESTS 42 46 0 900
62127030 Areredify A Oct. 8, 2019, 2:51 p.m. OK Rust TESTS 42 46 0 900
62124693 bor.is A Oct. 8, 2019, 2:41 p.m. OK Rust TESTS 42 46 0 900
62133115 bqn A Oct. 8, 2019, 3:15 p.m. OK Rust TESTS 42 46 102400 900

remove filters

Back to search problems