Codeforces Round 587 (Div. 3)

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
1216 Codeforces Round 587 (Div. 3) FINISHED False 7200 162773699 Sept. 21, 2019, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11175 ) D Swords PROGRAMMING math 1300

B"There were n types of swords in the theater basement which had been used during the plays. Moreover there were exactly x swords of each type. y people have broken into the theater basement and each of them has taken exactly z swords of some single type. Note that different people might have taken different types of swords. Note that the values x, y and z are unknown for you. The next morning the director of the theater discovers the loss. He counts all swords -- exactly a_i swords of the i -th type are left untouched. The director has no clue about the initial number of swords of each type in the basement, the number of people who have broken into the basement and how many swords each of them have taken. For example, if n=3 , a = [3, 12, 6] then one of the possible situations is x=12 , y=5 and z=3 . Then the first three people took swords of the first type and the other two people took swords of the third type. Note that you don't know values x, y and z beforehand but know values of n and a . Thus he seeks for your help. Determine the minimum number of people y , which could have broken into the theater basement, and the number of swords z each of them has taken. The first line of the input contains one integer n (2 <= n <= 2 cdot 10^{5}) -- the number of types of swords. The second line of the input contains the sequence a_1, a_2, ... , a_n (0 <= a_i <= 10^{9}) , where a_i equals to the number of swords of the i -th type, which have remained in the basement after the theft. It is guaranteed that there exists at least one such pair of indices (j, k) that a_j neq a_k . Print two integers y and z -- the minimum number of people which could have broken into the basement and the number of swords each of them has taken. In the first example the minimum value of y equals to 5 , i"...

Tutorials

Codeforces Round #587 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
61360419 Rockn70 D Sept. 27, 2019, 11:59 a.m. OK Clang++17 Diagnostics TESTS 19 249 3174400 1300
61084021 ruban D Sept. 22, 2019, 5:34 p.m. OK Delphi TESTS 19 265 129433600 1300
62196600 optykl D Oct. 9, 2019, 11:03 a.m. OK FPC TESTS 19 62 819200 1300
61048782 lanphuonglqd D Sept. 22, 2019, 5:41 a.m. OK FPC TESTS 19 62 819200 1300
60993013 SangTin D Sept. 21, 2019, 8:37 a.m. OK FPC TESTS 19 77 3993600 1300
61028058 bjnboo833626 D Sept. 21, 2019, 4:40 p.m. OK FPC TESTS 19 93 7987200 1300
60992530 chinaxjh D Sept. 21, 2019, 8:35 a.m. OK FPC TESTS 19 93 7987200 1300
61117155 XLeVi_AcKeRmAnX D Sept. 23, 2019, 1:14 p.m. OK GNU C11 TESTS 19 46 819200 1300
66676844 RajMaheshwari D Dec. 12, 2019, 11:39 a.m. OK GNU C11 TESTS 19 46 1638400 1300
61096791 Rintarou_Okabe D Sept. 23, 2019, 3:49 a.m. OK GNU C11 TESTS 19 46 1638400 1300
61070275 tkumar777 D Sept. 22, 2019, 12:29 p.m. OK GNU C11 TESTS 19 46 3174400 1300
62448362 anaksoleh D Oct. 13, 2019, 1:58 a.m. OK GNU C11 TESTS 19 46 3993600 1300
61260865 MOHIR_MBSTU D Sept. 25, 2019, 11:33 a.m. OK GNU C11 TESTS 19 46 40038400 1300
60989155 jgh99 D Sept. 21, 2019, 8:20 a.m. OK GNU C11 TESTS 19 61 1638400 1300
60994235 weastur D Sept. 21, 2019, 8:43 a.m. OK GNU C11 TESTS 19 62 819200 1300
63081742 nNguyeNn D Oct. 21, 2019, 3:19 p.m. OK GNU C11 TESTS 19 62 1638400 1300
68941211 vjudge1 D Jan. 16, 2020, 2:29 p.m. OK GNU C11 TESTS 19 62 1638400 1300
60994271 function_of_zero D Sept. 21, 2019, 8:43 a.m. OK GNU C++11 TESTS 19 31 614400 1300
61826501 ReaLNero1 D Oct. 4, 2019, 4:59 a.m. OK GNU C++11 TESTS 19 31 819200 1300
62568255 shuashuawan D Oct. 14, 2019, 1:46 p.m. OK GNU C++11 TESTS 19 31 819200 1300
60996411 Hank2019 D Sept. 21, 2019, 8:53 a.m. OK GNU C++11 TESTS 19 31 819200 1300
61071504 zyddd915 D Sept. 22, 2019, 12:56 p.m. OK GNU C++11 TESTS 19 31 1638400 1300
61023841 AIRBOYONE D Sept. 21, 2019, 3:23 p.m. OK GNU C++11 TESTS 19 31 1638400 1300
60997085 fantasy_show D Sept. 21, 2019, 8:56 a.m. OK GNU C++11 TESTS 19 31 1638400 1300
60993041 victor_12369 D Sept. 21, 2019, 8:37 a.m. OK GNU C++11 TESTS 19 31 1638400 1300
61025626 oduesp D Sept. 21, 2019, 3:54 p.m. OK GNU C++11 TESTS 19 31 1638400 1300
69549804 cornivores D Jan. 26, 2020, 5:50 a.m. OK GNU C++11 TESTS 19 31 1638400 1300
61732957 HipHop D Oct. 2, 2019, 5:17 p.m. OK GNU C++14 TESTS 19 46 819200 1300
61336514 tokitsukaze D Sept. 26, 2019, 4:38 p.m. OK GNU C++14 TESTS 19 46 921600 1300
61331615 elitedj D Sept. 26, 2019, 3:10 p.m. OK GNU C++14 TESTS 19 61 819200 1300
61540873 Bencq D Sept. 30, 2019, 8:43 a.m. OK GNU C++14 TESTS 19 61 1638400 1300
61099802 sumit083 D Sept. 23, 2019, 6:05 a.m. OK GNU C++14 TESTS 19 61 3174400 1300
62623772 Acker_man D Oct. 15, 2019, 1:32 p.m. OK GNU C++14 TESTS 19 62 819200 1300
68243168 Luzivanlt D Jan. 5, 2020, 1:33 p.m. OK GNU C++14 TESTS 19 62 819200 1300
63986026 2683331518 D Nov. 1, 2019, 11:45 a.m. OK GNU C++14 TESTS 19 62 819200 1300
63351869 div24ever D Oct. 24, 2019, 10:34 p.m. OK GNU C++14 TESTS 19 62 819200 1300
62650254 ljupche98 D Oct. 15, 2019, 9:18 p.m. OK GNU C++14 TESTS 19 62 819200 1300
61734258 lesskreker D Oct. 2, 2019, 5:40 p.m. OK GNU C++17 TESTS 19 31 819200 1300
61103503 nickluo D Sept. 23, 2019, 8:02 a.m. OK GNU C++17 TESTS 19 31 1331200 1300
61055807 Benboby0523 D Sept. 22, 2019, 8:01 a.m. OK GNU C++17 TESTS 19 46 1536000 1300
61258514 Meteoriii D Sept. 25, 2019, 10:56 a.m. OK GNU C++17 TESTS 19 46 3174400 1300
61896178 Rrtheonlyone D Oct. 5, 2019, 7:19 a.m. OK GNU C++17 TESTS 19 61 819200 1300
61318497 wappes D Sept. 26, 2019, 11:51 a.m. OK GNU C++17 TESTS 19 61 819200 1300
60995325 aj_598 D Sept. 21, 2019, 8:48 a.m. OK GNU C++17 TESTS 19 61 819200 1300
63652346 Jame___boy D Oct. 28, 2019, 11:46 a.m. OK GNU C++17 TESTS 19 61 819200 1300
61321094 lovecc D Sept. 26, 2019, 12:36 p.m. OK GNU C++17 TESTS 19 61 819200 1300
61922592 fdironia D Oct. 5, 2019, 1:45 p.m. OK GNU C++17 TESTS 19 62 0 1300
61043392 NewIdea D Sept. 22, 2019, 2:37 a.m. OK Go TESTS 19 46 6860800 1300
61103984 maguroguma D Sept. 23, 2019, 8:16 a.m. OK Go TESTS 19 77 4608000 1300
61955258 chanbakjsd D Oct. 6, 2019, 5:38 a.m. OK Go TESTS 19 78 4505600 1300
61324777 ancv1990 D Sept. 26, 2019, 1:32 p.m. OK Go TESTS 19 171 4505600 1300
64508215 brosucks D Nov. 8, 2019, 7:48 a.m. OK Go TESTS 19 218 4505600 1300
66577606 satya_p54 D Dec. 10, 2019, 8:02 a.m. OK Java 11 TESTS 19 233 0 1300
69248886 CodAR D Jan. 21, 2020, 1:42 p.m. OK Java 11 TESTS 19 483 0 1300
61093358 wabadabakalakaboo D Sept. 23, 2019, 12:17 a.m. OK Java 8 TESTS 19 109 0 1300
62644854 In_The_Name_Of_Love D Oct. 15, 2019, 7:13 p.m. OK Java 8 TESTS 19 124 0 1300
62487478 Shivam_72 D Oct. 13, 2019, 10:17 a.m. OK Java 8 TESTS 19 124 0 1300
62486702 Shivam_72 D Oct. 13, 2019, 10:14 a.m. OK Java 8 TESTS 19 124 0 1300
61694973 gahou D Oct. 2, 2019, 6:45 a.m. OK Java 8 TESTS 19 124 0 1300
61163838 housni D Sept. 23, 2019, 3:57 p.m. OK Java 8 TESTS 19 124 0 1300
61052509 applemelon D Sept. 22, 2019, 7 a.m. OK Java 8 TESTS 19 124 0 1300
60991306 kukreja-vlk D Sept. 21, 2019, 8:30 a.m. OK Java 8 TESTS 19 124 0 1300
60989868 chojh1222 D Sept. 21, 2019, 8:23 a.m. OK Java 8 TESTS 19 124 0 1300
64906078 MahmoudJobeel D Nov. 14, 2019, 9:59 p.m. OK Java 8 TESTS 19 139 0 1300
61360990 walborn D Sept. 27, 2019, 12:09 p.m. OK JavaScript TESTS 19 280 45158400 1300
61028820 Spheniscine D Sept. 21, 2019, 4:57 p.m. OK Kotlin TESTS 19 187 6553600 1300
60997368 SlavaG D Sept. 21, 2019, 8:57 a.m. OK Kotlin TESTS 19 202 7168000 1300
61084869 Ahmadjon D Sept. 22, 2019, 5:55 p.m. OK Kotlin TESTS 19 374 16691200 1300
60996942 viktorx D Sept. 21, 2019, 8:55 a.m. OK Kotlin TESTS 19 389 17817600 1300
60991360 Black_Fregat D Sept. 21, 2019, 8:30 a.m. OK Kotlin TESTS 19 420 17408000 1300
66273875 Andreeha D Dec. 4, 2019, 1:28 p.m. OK Kotlin TESTS 19 436 16793600 1300
60988827 david_varela D Sept. 21, 2019, 8:18 a.m. OK Kotlin TESTS 19 436 17510400 1300
60991784 wbars D Sept. 21, 2019, 8:32 a.m. OK Kotlin TESTS 19 919 61644800 1300
61050252 BIT D Sept. 22, 2019, 6:14 a.m. OK Mono C# TESTS 19 109 19763200 1300
61216263 OUERAOYE D Sept. 24, 2019, 12:48 p.m. OK Mono C# TESTS 19 109 20480000 1300
63113106 treasuryonly D Oct. 22, 2019, 8:19 a.m. OK Mono C# TESTS 19 124 20480000 1300
63302739 Tan42 D Oct. 24, 2019, 2:45 p.m. OK Mono C# TESTS 19 124 24268800 1300
61010050 _DKS_ D Sept. 21, 2019, 12:02 p.m. OK Mono C# TESTS 19 139 20480000 1300
60989344 IlyaCk D Sept. 21, 2019, 8:21 a.m. OK Mono C# TESTS 19 140 23347200 1300
62435016 og.kostya D Oct. 12, 2019, 5:05 p.m. OK Mono C# TESTS 19 155 16486400 1300
60997084 hloya D Sept. 21, 2019, 8:56 a.m. OK Mono C# TESTS 19 155 29081600 1300
61049587 faxse D Sept. 22, 2019, 6 a.m. OK Mono C# TESTS 19 342 35635200 1300
63079485 scorpiowf D Oct. 21, 2019, 2:40 p.m. OK MS C++ TESTS 19 46 819200 1300
61365505 Yunker D Sept. 27, 2019, 1:23 p.m. OK MS C++ TESTS 19 46 1638400 1300
61259020 vjudge4 D Sept. 25, 2019, 11:05 a.m. OK MS C++ TESTS 19 46 1638400 1300
61248230 vjudge3 D Sept. 25, 2019, 7:04 a.m. OK MS C++ TESTS 19 46 1638400 1300
61042436 vjudge4 D Sept. 22, 2019, 1:50 a.m. OK MS C++ TESTS 19 61 819200 1300
61210864 vjudge4 D Sept. 24, 2019, 11:26 a.m. OK MS C++ TESTS 19 61 819200 1300
60996129 LZDQ D Sept. 21, 2019, 8:52 a.m. OK MS C++ TESTS 19 61 819200 1300
68686935 vjudge5 D Jan. 13, 2020, 4:03 a.m. OK MS C++ TESTS 19 61 1638400 1300
61542880 vjudge4 D Sept. 30, 2019, 9:20 a.m. OK MS C++ TESTS 19 61 1638400 1300
67273268 vjudge5 D Dec. 20, 2019, 9:11 a.m. OK MS C++ TESTS 19 61 3174400 1300
61048870 IndignantHydra D Sept. 22, 2019, 5:43 a.m. OK MS C++ 2017 TESTS 19 77 1638400 1300
61107381 AleksanderBalobanov D Sept. 23, 2019, 9:47 a.m. OK MS C++ 2017 TESTS 19 77 12083200 1300
61071826 2018030402002 D Sept. 22, 2019, 1:02 p.m. OK MS C++ 2017 TESTS 19 78 819200 1300
61076128 cursed D Sept. 22, 2019, 2:32 p.m. OK MS C++ 2017 TESTS 19 78 1638400 1300
65799269 vjudge1 D Nov. 27, 2019, 6:41 a.m. OK MS C++ 2017 TESTS 19 78 1638400 1300
61111670 risa243 D Sept. 23, 2019, 11:30 a.m. OK MS C++ 2017 TESTS 19 78 2252800 1300
60996934 LinkyHoungla D Sept. 21, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 19 78 3174400 1300
60991040 2018030401051 D Sept. 21, 2019, 8:28 a.m. OK MS C++ 2017 TESTS 19 78 7987200 1300
60992189 ggi4111 D Sept. 21, 2019, 8:33 a.m. OK MS C++ 2017 TESTS 19 93 819200 1300
60997613 quyunhao D Sept. 21, 2019, 8:58 a.m. OK MS C++ 2017 TESTS 19 93 819200 1300
60989759 iamprayush D Sept. 21, 2019, 8:22 a.m. OK PyPy 2 TESTS 19 265 22323200 1300
61779581 fortmax120 D Oct. 3, 2019, 12:47 p.m. OK PyPy 2 TESTS 19 280 15360000 1300
62910711 thenewguy39 D Oct. 19, 2019, 7:13 a.m. OK PyPy 2 TESTS 19 296 20684800 1300
61038703 alexwice D Sept. 21, 2019, 9:39 p.m. OK PyPy 2 TESTS 19 311 14643200 1300
61046479 your_Daddy___ D Sept. 22, 2019, 4:44 a.m. OK PyPy 2 TESTS 19 311 14848000 1300
60994839 Ceicei D Sept. 21, 2019, 8:46 a.m. OK PyPy 2 TESTS 19 327 17715200 1300
61111440 Leendertz D Sept. 23, 2019, 11:25 a.m. OK PyPy 3 TESTS 19 202 18432000 1300
61019507 H4Wk3ye D Sept. 21, 2019, 2:13 p.m. OK PyPy 3 TESTS 19 249 19456000 1300
64496659 conjecture_xyz D Nov. 8, 2019, 12:29 a.m. OK PyPy 3 TESTS 19 311 18841600 1300
68322863 vyom_goel D Jan. 6, 2020, 3:39 p.m. OK PyPy 3 TESTS 19 327 18534400 1300
68215140 nealzane D Jan. 4, 2020, 10:16 p.m. OK PyPy 3 TESTS 19 327 19046400 1300
64793372 jyf111 D Nov. 13, 2019, 12:01 p.m. OK PyPy 3 TESTS 19 327 19046400 1300
66645621 Aloha D Dec. 11, 2019, 4:36 p.m. OK PyPy 3 TESTS 19 342 19046400 1300
64498038 juppy D Nov. 8, 2019, 1:55 a.m. OK PyPy 3 TESTS 19 342 19046400 1300
66304786 shivammishra D Dec. 5, 2019, 8:52 a.m. OK PyPy 3 TESTS 19 342 19148800 1300
67650266 vaibhav0320 D Dec. 26, 2019, 11:51 a.m. OK PyPy 3 TESTS 19 343 18534400 1300
61079159 pktyagi1 D Sept. 22, 2019, 3:39 p.m. OK Python 2 TESTS 19 421 11059200 1300
61235212 SoSooding D Sept. 24, 2019, 5:49 p.m. OK Python 2 TESTS 19 467 12492800 1300
61068451 Madhur1906 D Sept. 22, 2019, 11:52 a.m. OK Python 2 TESTS 19 577 13209600 1300
61091557 IngaleAnkur10 D Sept. 22, 2019, 9:57 p.m. OK Python 3 TESTS 19 202 16588800 1300
61012662 dohduh D Sept. 21, 2019, 12:37 p.m. OK Python 3 TESTS 19 233 16588800 1300
61374989 n000 D Sept. 27, 2019, 4:01 p.m. OK Python 3 TESTS 19 234 16588800 1300
60993879 spellstaker D Sept. 21, 2019, 8:41 a.m. OK Python 3 TESTS 19 248 16793600 1300
61797235 darkshadow07 D Oct. 3, 2019, 5:40 p.m. OK Python 3 TESTS 19 249 16588800 1300
61007981 eugalt D Sept. 21, 2019, 11:35 a.m. OK Python 3 TESTS 19 249 16588800 1300
61007735 eugalt D Sept. 21, 2019, 11:32 a.m. OK Python 3 TESTS 19 249 16588800 1300
61711084 azhukov D Oct. 2, 2019, 11:27 a.m. OK Python 3 TESTS 19 264 15564800 1300
61064075 KanhuKeNanu D Sept. 22, 2019, 10:26 a.m. OK Python 3 TESTS 19 264 15564800 1300
60996285 essi D Sept. 21, 2019, 8:52 a.m. OK Python 3 TESTS 19 264 16588800 1300
60990402 nemi_zzz D Sept. 21, 2019, 8:25 a.m. OK Ruby TESTS 19 577 34816000 1300
61040473 akiradeveloper D Sept. 21, 2019, 11:35 p.m. OK Rust TESTS 19 46 5734400 1300
61036515 ValenKof D Sept. 21, 2019, 8:10 p.m. OK Rust TESTS 19 61 11776000 1300
61955414 lopol D Oct. 6, 2019, 5:42 a.m. OK Rust TESTS 19 109 1638400 1300
61204613 chinmaykousik1 D Sept. 24, 2019, 9:09 a.m. OK Rust TESTS 19 1169 14233600 1300

remove filters

Back to search problems