Codeforces Round 660 (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
1388 Codeforces Round 660 (Div. 2) FINISHED False 7200 141060263 July 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25091 ) A Captain Flint and Crew Recruitment PROGRAMMING brute force math number theory 800

B"Despite his bad reputation, Captain Flint is a friendly person (at least, friendly to animals). Now Captain Flint is searching worthy sailors to join his new crew (solely for peaceful purposes). A sailor is considered as worthy if he can solve Flint's task. Recently, out of blue Captain Flint has been interested in math and even defined a new class of integers. Let's define a positive integer x as nearly prime if it can be represented as p cdot q , where 1 < p < q and p and q are prime numbers. For example, integers 6 and 10 are nearly primes (since 2 cdot 3 = 6 and 2 cdot 5 = 10 ), but integers 1 , 3 , 4 , 16 , 17 or 44 are not. Captain Flint guessed an integer n and asked you: can you represent it as the sum of 4 different positive integers where at least 3 of them should be nearly prime. Uncle Bogdan easily solved the task and joined the crew. Can you do the same? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next t lines contain test cases -- one per line. The first and only line of each test case contains the single integer n (1 <= n <= 2 cdot 10^5) -- the number Flint guessed. For each test case print: In the first and second test cases, it can be proven that there are no four different positive integers such that at least three of them are nearly prime. In the third test case, n=31=2 cdot 7 + 2 cdot 5 + 2 cdot 3 + 1 : integers 14 , 10 , 6 are nearly prime. In the fourth test case, n=36=5 + 2 cdot 3 + 2 cdot 5 + 3 cdot 5 : integers 6 , 10 , 15 are nearly prime. In the fifth test case, n=44=2 cdot 3 + 7 + 2 cdot 5 + 3 cdot 7 : integers 6 , 10 , 21 are nearly prime. In the sixth test case, n=100=2 + 2 cdot 5 + 3 cdot 11 + 5 cdot 11 : integers 10 , 33 , 55 are nearly prime"...

Tutorials

Codeforces Round #660 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
90315566 KRISH99 A Aug. 18, 2020, 2:16 p.m. OK Clang++17 Diagnostics TESTS 8 62 0 800
90227485 SatouYami A Aug. 17, 2020, 12:29 p.m. OK FPC TESTS 8 31 0 800
88942737 Suyun514 A Aug. 5, 2020, 11:54 a.m. OK FPC TESTS 8 31 3379200 800
88924711 iam43 A Aug. 5, 2020, 7:23 a.m. OK FPC TESTS 8 31 3481600 800
89645993 HQT2003 A Aug. 12, 2020, 11:25 a.m. OK FPC TESTS 8 31 3686400 800
91590162 Faria218 A Sept. 1, 2020, 5:49 p.m. OK GNU C11 TESTS 8 15 0 800
90215746 kabir2018331125 A Aug. 17, 2020, 9:57 a.m. OK GNU C11 TESTS 8 15 0 800
88901428 get-rekt A Aug. 4, 2020, 8:08 p.m. OK GNU C11 TESTS 8 15 3686400 800
88953606 Neel7 A Aug. 5, 2020, 2:14 p.m. OK GNU C11 TESTS 8 15 3686400 800
88882564 UTKARSH_MAHESHWARI_16 A Aug. 4, 2020, 3:05 p.m. OK GNU C11 TESTS 8 15 3686400 800
90796639 mnrohk A Aug. 24, 2020, 5:15 a.m. OK GNU C11 TESTS 8 15 3993600 800
89129586 Amin.s A Aug. 6, 2020, 2:08 p.m. OK GNU C11 TESTS 8 30 3686400 800
89125189 Greninja_TMC A Aug. 6, 2020, 1:23 p.m. OK GNU C11 TESTS 8 30 3686400 800
88753992 farhanitrate A Aug. 2, 2020, 6:15 p.m. OK GNU C11 TESTS 8 30 3686400 800
89373145 rakibulhasan04002 A Aug. 9, 2020, 4:34 a.m. OK GNU C11 TESTS 8 30 3993600 800
90368681 Assasinss A Aug. 19, 2020, 7:50 a.m. OK GNU C++11 TESTS 8 15 0 800
90365402 bubble008 gaochangchang AnnaYang A Aug. 19, 2020, 7:02 a.m. OK GNU C++11 TESTS 8 15 0 800
90247418 luogu_bot3 A Aug. 17, 2020, 4:19 p.m. OK GNU C++11 TESTS 8 15 0 800
90187127 lyss990 A Aug. 17, 2020, 2:49 a.m. OK GNU C++11 TESTS 8 15 0 800
90019284 gehrychiang A Aug. 15, 2020, 12:48 p.m. OK GNU C++11 TESTS 8 15 0 800
91054966 hs_wfz_orz A Aug. 26, 2020, 1:14 p.m. OK GNU C++11 TESTS 8 15 0 800
91235120 whoisthat A Aug. 28, 2020, 6:04 p.m. OK GNU C++11 TESTS 8 15 0 800
91617948 Igor_Zielinski A Sept. 2, 2020, 6:43 a.m. OK GNU C++11 TESTS 8 15 0 800
91678548 vjudge3 A Sept. 2, 2020, 11:46 p.m. OK GNU C++11 TESTS 8 15 0 800
90393255 RTBlack A Aug. 19, 2020, 1:43 p.m. OK GNU C++11 TESTS 8 15 0 800
90472635 sigskar A Aug. 20, 2020, 2:46 p.m. OK GNU C++14 TESTS 8 15 0 800
91699441 tak_i_planirovalos A Sept. 3, 2020, 8:14 a.m. OK GNU C++14 TESTS 8 15 0 800
89065303 harshit_2300 A Aug. 5, 2020, 6:56 p.m. OK GNU C++14 TESTS 8 15 3686400 800
89375615 _greymatter A Aug. 9, 2020, 5:41 a.m. OK GNU C++14 TESTS 8 15 3686400 800
89332746 prettyboy1452001 A Aug. 8, 2020, 12:08 p.m. OK GNU C++14 TESTS 8 15 3686400 800
89187603 AhmadAlmograby A Aug. 7, 2020, 8:23 a.m. OK GNU C++14 TESTS 8 15 3686400 800
89168642 Ramprosad_049 A Aug. 7, 2020, 3:05 a.m. OK GNU C++14 TESTS 8 15 3686400 800
89111058 rishitag20 A Aug. 6, 2020, 10:35 a.m. OK GNU C++14 TESTS 8 15 3686400 800
89518396 _Cardinal A Aug. 10, 2020, 2:34 p.m. OK GNU C++14 TESTS 8 15 3686400 800
89549474 vasukalariya2 A Aug. 11, 2020, 5:13 a.m. OK GNU C++14 TESTS 8 15 3686400 800
90178891 gaurav_2000 A Aug. 16, 2020, 9:45 p.m. OK GNU C++17 TESTS 8 15 0 800
89841255 cf.69 A Aug. 14, 2020, 4:47 a.m. OK GNU C++17 TESTS 8 15 0 800
91138972 Bohoty A Aug. 27, 2020, 1:59 p.m. OK GNU C++17 TESTS 8 15 0 800
91527256 stephencurry396 A Aug. 31, 2020, 11:09 p.m. OK GNU C++17 TESTS 8 15 0 800
90456201 rohanblueboybaijal A Aug. 20, 2020, 11:02 a.m. OK GNU C++17 TESTS 8 15 0 800
89348410 timothyhorsc A Aug. 8, 2020, 3:52 p.m. OK GNU C++17 TESTS 8 15 3686400 800
90699267 Ronojoy_1903133 A Aug. 22, 2020, 3:25 p.m. OK GNU C++17 TESTS 8 15 3686400 800
90517813 just-kidding A Aug. 21, 2020, 9:06 a.m. OK GNU C++17 TESTS 8 15 3686400 800
89549839 osmanalisultan91 A Aug. 11, 2020, 5:20 a.m. OK GNU C++17 TESTS 8 15 3686400 800
89461874 lakshaymiddha A Aug. 9, 2020, 6:50 p.m. OK GNU C++17 TESTS 8 15 3686400 800
89989098 vjudge5 A Aug. 15, 2020, 5:44 a.m. OK GNU C++17 (64) TESTS 8 15 0 800
91525659 uruuru8888 A Aug. 31, 2020, 9:55 p.m. OK GNU C++17 (64) TESTS 8 15 0 800
91030239 hejifei A Aug. 26, 2020, 7:52 a.m. OK GNU C++17 (64) TESTS 8 15 0 800
89996535 elyutin159164 A Aug. 15, 2020, 7:25 a.m. OK GNU C++17 (64) TESTS 8 15 0 800
90471936 jetha_lal A Aug. 20, 2020, 2:37 p.m. OK GNU C++17 (64) TESTS 8 15 3993600 800
89513812 iaNTU A Aug. 10, 2020, 1:35 p.m. OK GNU C++17 (64) TESTS 8 15 4198400 800
89500968 Moen1578 A Aug. 10, 2020, 10:30 a.m. OK GNU C++17 (64) TESTS 8 15 4300800 800
91485537 sarthakkedia123 A Aug. 31, 2020, 11:25 a.m. OK GNU C++17 (64) TESTS 8 15 4300800 800
90820903 zuiyu A Aug. 24, 2020, 11:32 a.m. OK GNU C++17 (64) TESTS 8 15 4300800 800
89511639 Bazigar A Aug. 10, 2020, 1:06 p.m. OK GNU C++17 (64) TESTS 8 15 4300800 800
91572134 Trishan A Sept. 1, 2020, 2:05 p.m. OK Go TESTS 8 31 1331200 800
88805930 sonlh07 A Aug. 3, 2020, 2:10 p.m. OK Go TESTS 8 46 10649600 800
88788021 bnurgeldiyev514 A Aug. 3, 2020, 9:50 a.m. OK Go TESTS 8 46 10649600 800
89324610 swelf A Aug. 8, 2020, 9:57 a.m. OK Go TESTS 8 46 10854400 800
88829892 proba A Aug. 3, 2020, 9:38 p.m. OK Go TESTS 8 46 10854400 800
88767536 Riccccchard A Aug. 3, 2020, 2:31 a.m. OK Go TESTS 8 62 10854400 800
89764084 ramesh.baskaran A Aug. 13, 2020, 5:53 a.m. OK Haskell TESTS 8 15 0 800
89175215 Andrey_R A Aug. 7, 2020, 5:25 a.m. OK Haskell TESTS 8 15 11571200 800
90268127 nadaabdo588 A Aug. 18, 2020, 12:27 a.m. OK Java 11 TESTS 8 171 0 800
88830793 XsLel A Aug. 3, 2020, 10:17 p.m. OK Java 11 TESTS 8 171 23756800 800
89312983 In_The_Name_Of_Love A Aug. 8, 2020, 6:57 a.m. OK Java 11 TESTS 8 171 23961600 800
88927892 Witless_Deer A Aug. 5, 2020, 8:14 a.m. OK Java 11 TESTS 8 186 23961600 800
90794392 kartikeysemwal A Aug. 24, 2020, 4:21 a.m. OK Java 11 TESTS 8 186 24371200 800
90389299 OBrutus A Aug. 19, 2020, 12:50 p.m. OK Java 11 TESTS 8 202 0 800
89800214 yellow123321 A Aug. 13, 2020, 1:55 p.m. OK Java 11 TESTS 8 202 0 800
88919194 Vatsal53 A Aug. 5, 2020, 5:56 a.m. OK Java 11 TESTS 8 202 23961600 800
89068315 shivam_bang A Aug. 5, 2020, 7:44 p.m. OK Java 11 TESTS 8 202 23961600 800
90711155 watermalone A Aug. 22, 2020, 6:33 p.m. OK Java 11 TESTS 8 202 23961600 800
88917210 Akash_kunwar A Aug. 5, 2020, 5:21 a.m. OK Java 8 TESTS 8 93 20377600 800
91271469 Nirav412000 A Aug. 29, 2020, 9:13 a.m. OK Java 8 TESTS 8 108 0 800
88730459 dhruvi897 A Aug. 2, 2020, 12:25 p.m. OK Java 8 TESTS 8 108 20377600 800
91647135 jon_snow_1999 A Sept. 2, 2020, 2:01 p.m. OK Java 8 TESTS 8 109 0 800
89841128 Amazed A Aug. 14, 2020, 4:44 a.m. OK Java 8 TESTS 8 109 0 800
89358647 Samez A Aug. 8, 2020, 7:03 p.m. OK Java 8 TESTS 8 109 20377600 800
90820170 vjudge4 A Aug. 24, 2020, 11:22 a.m. OK Java 8 TESTS 8 109 20377600 800
89633014 Yubi A Aug. 12, 2020, 8:06 a.m. OK Java 8 TESTS 8 109 20377600 800
88878921 MubtasimShahriar A Aug. 4, 2020, 2:22 p.m. OK Java 8 TESTS 8 109 20377600 800
88808046 O_E A Aug. 3, 2020, 2:37 p.m. OK Java 8 TESTS 8 109 20480000 800
88808983 timurtibeyev A Aug. 3, 2020, 2:49 p.m. OK Kotlin TESTS 8 109 20480000 800
89780431 Ghasem A Aug. 13, 2020, 9:33 a.m. OK Kotlin TESTS 8 140 0 800
89531887 wbars A Aug. 10, 2020, 7:14 p.m. OK Kotlin TESTS 8 217 22732800 800
88736869 Mosyagin A Aug. 2, 2020, 2:05 p.m. OK Mono C# TESTS 8 46 8908800 800
89132542 Xtreemist A Aug. 6, 2020, 2:41 p.m. OK Mono C# TESTS 8 46 8908800 800
88762024 pycyu A Aug. 2, 2020, 10:01 p.m. OK Mono C# TESTS 8 46 8908800 800
89354199 Lordan A Aug. 8, 2020, 5:37 p.m. OK Mono C# TESTS 8 61 8704000 800
88799056 emhraca A Aug. 3, 2020, 12:43 p.m. OK Mono C# TESTS 8 61 8806400 800
89322437 AlurChop A Aug. 8, 2020, 9:23 a.m. OK Mono C# TESTS 8 62 8704000 800
88868279 75number A Aug. 4, 2020, 12:10 p.m. OK Mono C# TESTS 8 62 8806400 800
89840810 azukun A Aug. 14, 2020, 4:37 a.m. OK Mono C# TESTS 8 77 2150400 800
89398971 vjudge4 A Aug. 9, 2020, 12:28 p.m. OK MS C++ TESTS 8 30 3891200 800
89397110 vjudge3 A Aug. 9, 2020, 11:55 a.m. OK MS C++ TESTS 8 30 4096000 800
88954011 vjudge3 A Aug. 5, 2020, 2:20 p.m. OK MS C++ TESTS 8 31 3891200 800
89396667 vjudge3 A Aug. 9, 2020, 11:48 a.m. OK MS C++ TESTS 8 31 4096000 800
89159680 thomas_li A Aug. 6, 2020, 9:33 p.m. OK MS C++ 2017 TESTS 8 15 3686400 800
88863369 heartsker A Aug. 4, 2020, 10:44 a.m. OK MS C++ 2017 TESTS 8 30 3686400 800
88947581 Gadi A Aug. 5, 2020, 12:56 p.m. OK MS C++ 2017 TESTS 8 30 3686400 800
88953420 vjudge4 A Aug. 5, 2020, 2:11 p.m. OK MS C++ 2017 TESTS 8 30 3993600 800
89203879 yyeshell A Aug. 7, 2020, 12:32 p.m. OK MS C++ 2017 TESTS 8 30 3993600 800
90346213 Kirkon A Aug. 18, 2020, 10:10 p.m. OK MS C++ 2017 TESTS 8 31 0 800
90443044 exode4 A Aug. 20, 2020, 7:44 a.m. OK MS C++ 2017 TESTS 8 31 0 800
90099737 Mahdi_Adib A Aug. 16, 2020, 2:47 p.m. OK MS C++ 2017 TESTS 8 31 0 800
89849578 jatinkumarjk2001 A Aug. 14, 2020, 7:16 a.m. OK MS C++ 2017 TESTS 8 31 0 800
90285184 vjudge1 A Aug. 18, 2020, 7:18 a.m. OK MS C++ 2017 TESTS 8 31 307200 800
89386032 Andrey_R A Aug. 9, 2020, 8:45 a.m. OK Perl TESTS 8 140 6348800 800
89630505 yumtam A Aug. 12, 2020, 7:28 a.m. OK PyPy 2 TESTS 8 139 24166400 800
88879449 thuutin A Aug. 4, 2020, 2:28 p.m. OK PyPy 2 TESTS 8 233 24780800 800
91570284 Tomii9273 A Sept. 1, 2020, 1:41 p.m. OK PyPy 3 TESTS 8 155 3276800 800
88899190 jamerrq A Aug. 4, 2020, 7:14 p.m. OK PyPy 3 TESTS 8 155 22425600 800
91104717 AnimeshCPandey A Aug. 27, 2020, 5:24 a.m. OK PyPy 3 TESTS 8 171 3686400 800
88923463 chinmaym749 A Aug. 5, 2020, 7:03 a.m. OK PyPy 3 TESTS 8 171 23961600 800
90085118 odette0419 A Aug. 16, 2020, 1:30 p.m. OK PyPy 3 TESTS 8 186 3174400 800
89643655 koolkoder A Aug. 12, 2020, 10:51 a.m. OK PyPy 3 TESTS 8 186 23654400 800
91693654 bcc0830 A Sept. 3, 2020, 6:46 a.m. OK PyPy 3 TESTS 8 187 2764800 800
89767082 sbaldrich A Aug. 13, 2020, 6:37 a.m. OK PyPy 3 TESTS 8 187 3072000 800
89318613 Gauranshu A Aug. 8, 2020, 8:23 a.m. OK PyPy 3 TESTS 8 187 23347200 800
88887703 manda.sushanth.reddy A Aug. 4, 2020, 4:11 p.m. OK PyPy 3 TESTS 8 187 23347200 800
89327580 ShadhinAshraf A Aug. 8, 2020, 10:44 a.m. OK Python 2 TESTS 8 140 6553600 800
89828869 Bluefish2 A Aug. 13, 2020, 9:51 p.m. OK Python 2 TESTS 8 155 0 800
90870836 shravanti A Aug. 25, 2020, 5:41 a.m. OK Python 3 TESTS 8 93 0 800
89963303 MBHuman A Aug. 14, 2020, 5:53 p.m. OK Python 3 TESTS 8 93 0 800
89116102 dabdya A Aug. 6, 2020, 11:41 a.m. OK Python 3 TESTS 8 93 6656000 800
88739290 cs1g A Aug. 2, 2020, 2:40 p.m. OK Python 3 TESTS 8 93 6656000 800
89406253 tflave A Aug. 9, 2020, 2:25 p.m. OK Python 3 TESTS 8 93 6963200 800
89299639 nuratdinov.p A Aug. 8, 2020, 2:36 a.m. OK Python 3 TESTS 8 93 6963200 800
88875168 prematal2828 A Aug. 4, 2020, 1:36 p.m. OK Python 3 TESTS 8 93 6963200 800
88733722 Mad_Andrei A Aug. 2, 2020, 1:17 p.m. OK Python 3 TESTS 8 93 6963200 800
91264511 Mehrdad_ravenS A Aug. 29, 2020, 7:25 a.m. OK Python 3 TESTS 8 108 0 800
91005804 Liberator187 A Aug. 25, 2020, 10:47 p.m. OK Python 3 TESTS 8 108 0 800
88891922 Stevie_G A Aug. 4, 2020, 5:13 p.m. OK Ruby TESTS 8 468 48947200 800
88899513 Andrey_R A Aug. 4, 2020, 7:21 p.m. OK Ruby TESTS 8 514 48947200 800
89250552 dataisland A Aug. 7, 2020, 3:38 p.m. OK Rust TESTS 8 31 3788800 800
91650548 Ballu-Bhai A Sept. 2, 2020, 2:42 p.m. OK Rust TESTS 8 46 0 800
89587417 terraformer A Aug. 11, 2020, 2:50 p.m. OK Rust TESTS 8 46 3788800 800
88845029 Strorkis A Aug. 4, 2020, 6:10 a.m. OK Rust TESTS 8 46 3788800 800

remove filters

Back to search problems