Codeforces Round 532 (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
1100 Codeforces Round 532 (Div. 2) FINISHED False 7200 184433099 Jan. 13, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10177 ) A Roman and Browser PROGRAMMING implementation 1000

B"This morning, Roman woke up and opened the browser with n opened tabs numbered from 1 to n . There are two kinds of tabs: those with the information required for the test and those with social network sites. Roman decided that there are too many tabs open so he wants to close some of them. He decided to accomplish this by closing every k -th ( 2 <= q k <= q n - 1 ) tab. Only then he will decide whether he wants to study for the test or to chat on the social networks. Formally, Roman will choose one tab (let its number be b ) and then close all tabs with numbers c = b + i cdot k that satisfy the following condition: 1 <= q c <= q n and i is an integer (it may be positive, negative or zero). For example, if k = 3 , n = 14 and Roman chooses b = 8 , then he will close tabs with numbers 2 , 5 , 8 , 11 and 14 . After closing the tabs Roman will calculate the amount of remaining tabs with the information for the test (let's denote it e ) and the amount of remaining social network tabs ( s ). Help Roman to calculate the maximal absolute value of the difference of those values |e - s| so that it would be easy to decide what to do next. The first line contains two integers n and k ( 2 <= q k < n <= q 100 ) -- the amount of tabs opened currently and the distance between the tabs closed. The second line consists of n integers, each of them equal either to 1 or to -1 . The i -th integer denotes the type of the i -th tab: if it is equal to 1 , this tab contains information for the test, and if it is equal to -1 , it's a social network tab. Output a single integer -- the maximum absolute difference between the amounts of remaining tabs of different types |e - s| . In the first example we can choose b = 1 or b = 3 . We will delete then one tab of each type and the remaining tabs are then all conta"...

Tutorials

Unofficial Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48529298 jeong000307 A Jan. 18, 2019, 10:52 a.m. OK Clang++17 Diagnostics TESTS 85 46 0 1000
48365117 srijan_de A Jan. 13, 2019, 9:09 p.m. OK Clang++17 Diagnostics TESTS 85 46 0 1000
48364472 srijan_de A Jan. 13, 2019, 8:32 p.m. OK Clang++17 Diagnostics TESTS 85 46 0 1000
48670312 lazymonster A Jan. 21, 2019, 10:30 a.m. OK Clang++17 Diagnostics TESTS 85 46 1024000 1000
48406584 huma17 A Jan. 15, 2019, 4:24 a.m. OK Clang++17 Diagnostics TESTS 85 46 2150400 1000
48393396 taxi1729 A Jan. 14, 2019, 4:27 p.m. OK Clang++17 Diagnostics TESTS 85 46 4300800 1000
62967126 sash0 A Oct. 20, 2019, 5:16 a.m. OK D TESTS 85 46 0 1000
49862540 nastya_ka A Feb. 13, 2019, 10:20 a.m. OK Delphi TESTS 85 46 102400 1000
48508309 binarmo A Jan. 17, 2019, 6:54 p.m. OK FPC TESTS 85 31 0 1000
48629192 Kostin2020 A Jan. 20, 2019, 1:18 p.m. OK FPC TESTS 85 31 0 1000
48369561 Kecapgiacmo A Jan. 14, 2019, 2:52 a.m. OK FPC TESTS 85 31 0 1000
48355489 phanson03vt A Jan. 13, 2019, 4:25 p.m. OK FPC TESTS 85 31 0 1000
48347107 vvvnnn911 A Jan. 13, 2019, 3:33 p.m. OK FPC TESTS 85 31 0 1000
48343216 PA1109 A Jan. 13, 2019, 3:14 p.m. OK FPC TESTS 85 31 0 1000
48342617 i9code A Jan. 13, 2019, 3:12 p.m. OK FPC TESTS 85 31 0 1000
48341492 xXXCoderBoiXXx A Jan. 13, 2019, 3:08 p.m. OK FPC TESTS 85 31 0 1000
48353946 samau07012005 A Jan. 13, 2019, 4:15 p.m. OK FPC TESTS 85 31 102400 1000
48404213 PhuongPeu A Jan. 15, 2019, 1:47 a.m. OK FPC TESTS 85 31 512000 1000
52261275 Jhalok A April 3, 2019, 8:56 a.m. OK GNU C11 TESTS 85 31 0 1000
55415094 kaiboy A June 11, 2019, 1:12 a.m. OK GNU C11 TESTS 85 31 0 1000
56880028 You_Know_Who A July 12, 2019, 9:59 a.m. OK GNU C11 TESTS 85 31 0 1000
56953108 vjudge1 A July 13, 2019, 3:08 a.m. OK GNU C11 TESTS 85 31 0 1000
62493764 DevJewel A Oct. 13, 2019, 10:40 a.m. OK GNU C11 TESTS 85 31 0 1000
66265531 friedrich_hayek A Dec. 4, 2019, 10:18 a.m. OK GNU C11 TESTS 85 31 0 1000
67196876 yigezhe A Dec. 19, 2019, 9:25 a.m. OK GNU C11 TESTS 85 31 0 1000
51262387 A1phaZ3r0 A March 13, 2019, 1:53 p.m. OK GNU C11 TESTS 85 31 0 1000
52142346 sansen A April 1, 2019, 7:30 a.m. OK GNU C11 TESTS 85 31 0 1000
52261019 tieulac305 A April 3, 2019, 8:48 a.m. OK GNU C11 TESTS 85 31 0 1000
49073066 Fazd A Jan. 27, 2019, 11 p.m. OK GNU C++11 TESTS 85 30 0 1000
48463430 vaibhavvasant1705 A Jan. 16, 2019, 3:56 p.m. OK GNU C++11 TESTS 85 30 0 1000
68670670 vjudge2 A Jan. 12, 2020, 4:44 p.m. OK GNU C++11 TESTS 85 31 0 1000
69606951 M.Alijon A Jan. 27, 2020, 10:05 a.m. OK GNU C++11 TESTS 85 31 0 1000
69733244 NotaKoala A Jan. 29, 2020, 2 p.m. OK GNU C++11 TESTS 85 31 0 1000
68101989 wayalhrushi A Jan. 3, 2020, 4:05 a.m. OK GNU C++11 TESTS 85 31 0 1000
68012409 moaliborna1383 A Dec. 31, 2019, 4:31 p.m. OK GNU C++11 TESTS 85 31 0 1000
68581525 vjudge4 A Jan. 11, 2020, 10:13 a.m. OK GNU C++11 TESTS 85 31 0 1000
67412007 sanchit_div2 A Dec. 22, 2019, 8:40 a.m. OK GNU C++11 TESTS 85 31 0 1000
68669429 vjudge5 A Jan. 12, 2020, 4:19 p.m. OK GNU C++11 TESTS 85 31 0 1000
48371715 tobeaccepted A Jan. 14, 2019, 4:53 a.m. OK GNU C++14 TESTS 85 15 0 1000
49766573 AP_222 A Feb. 11, 2019, 11:56 a.m. OK GNU C++14 TESTS 85 15 0 1000
49240549 suyash.ag09 A Jan. 31, 2019, 10:05 a.m. OK GNU C++14 TESTS 85 15 0 1000
48464622 code_bleeder A Jan. 16, 2019, 4:35 p.m. OK GNU C++14 TESTS 85 15 0 1000
48458735 code_bleeder A Jan. 16, 2019, 1:41 p.m. OK GNU C++14 TESTS 85 15 0 1000
48374096 nreshtpushpan A Jan. 14, 2019, 6:36 a.m. OK GNU C++14 TESTS 85 15 0 1000
48370687 Fayaz A Jan. 14, 2019, 4:01 a.m. OK GNU C++14 TESTS 85 15 0 1000
59863360 rohan_force07 A Sept. 1, 2019, 4:09 p.m. OK GNU C++14 TESTS 85 30 0 1000
64903353 sunny_leone A Nov. 14, 2019, 8:05 p.m. OK GNU C++14 TESTS 85 30 0 1000
66975644 vjudge1 A Dec. 15, 2019, 2:36 p.m. OK GNU C++14 TESTS 85 30 0 1000
53568833 drade0 A April 30, 2019, 1:59 p.m. OK GNU C++17 TESTS 85 30 0 1000
54886910 Ash28ish A May 31, 2019, 5:52 p.m. OK GNU C++17 TESTS 85 30 0 1000
58695987 negar_a A Aug. 13, 2019, 6:01 a.m. OK GNU C++17 TESTS 85 30 0 1000
59121570 vjudge5 A Aug. 20, 2019, 5:52 a.m. OK GNU C++17 TESTS 85 30 0 1000
60164736 OnlyLatinLetters A Sept. 6, 2019, 10:27 a.m. OK GNU C++17 TESTS 85 30 0 1000
60385189 jassus A Sept. 11, 2019, 11:11 a.m. OK GNU C++17 TESTS 85 30 0 1000
64587587 secretlearner.68 A Nov. 9, 2019, 1:45 p.m. OK GNU C++17 TESTS 85 30 0 1000
49963802 William_Yue A Feb. 15, 2019, 7:35 p.m. OK GNU C++17 TESTS 85 30 0 1000
50345230 _____JONTRONA_____ A Feb. 23, 2019, 5:57 a.m. OK GNU C++17 TESTS 85 30 0 1000
49927965 vjudge5 A Feb. 15, 2019, 1:26 a.m. OK GNU C++17 TESTS 85 30 0 1000
60077534 Icceey A Sept. 5, 2019, 1 p.m. OK Go TESTS 85 31 0 1000
48577328 life_is_not_bed_of_roses A Jan. 19, 2019, 2:45 p.m. OK Go TESTS 85 31 0 1000
48477996 maldonadokevin11 A Jan. 17, 2019, 4:22 a.m. OK Go TESTS 85 31 0 1000
48595000 pdah A Jan. 20, 2019, 5:44 a.m. OK Go TESTS 85 46 0 1000
48528762 Meternal A Jan. 18, 2019, 10:30 a.m. OK Go TESTS 85 46 0 1000
48346067 mishagam A Jan. 13, 2019, 3:28 p.m. OK Go TESTS 85 46 0 1000
48344720 Flaker A Jan. 13, 2019, 3:21 p.m. OK Go TESTS 85 46 0 1000
48348391 gksato A Jan. 13, 2019, 3:40 p.m. OK Haskell TESTS 85 31 8499200 1000
48508939 codemania A Jan. 17, 2019, 7:21 p.m. OK Haskell TESTS 85 31 8499200 1000
52749204 jedikni A April 14, 2019, 1:11 p.m. OK Haskell TESTS 85 46 102400 1000
67398734 CodAR A Dec. 22, 2019, 2:02 a.m. OK Java 11 TESTS 85 202 0 1000
67316339 adzi A Dec. 21, 2019, 6:12 a.m. OK Java 8 TESTS 85 109 0 1000
65272195 BerserkVl A Nov. 17, 2019, 8:33 p.m. OK Java 8 TESTS 85 109 0 1000
59592574 arun319 A Aug. 27, 2019, 9:44 p.m. OK Java 8 TESTS 85 109 0 1000
57962330 7dan A July 30, 2019, 12:22 a.m. OK Java 8 TESTS 85 109 0 1000
57163069 procrastinate7 A July 16, 2019, 8:19 p.m. OK Java 8 TESTS 85 109 0 1000
55112231 bencebosko A June 5, 2019, 6:53 a.m. OK Java 8 TESTS 85 109 0 1000
49956227 Ziax A Feb. 15, 2019, 4:09 p.m. OK Java 8 TESTS 85 109 0 1000
48706283 CharlesDai A Jan. 22, 2019, 6:02 a.m. OK Java 8 TESTS 85 109 0 1000
48694609 mrmarsh A Jan. 21, 2019, 8:04 p.m. OK Java 8 TESTS 85 109 0 1000
48644718 Ahmed_Diab A Jan. 20, 2019, 4:52 p.m. OK Java 8 TESTS 85 109 0 1000
48508485 BlackLunx A Jan. 17, 2019, 7:01 p.m. OK Kotlin TESTS 85 155 102400 1000
48397845 Shellak A Jan. 14, 2019, 6:43 p.m. OK Kotlin TESTS 85 155 102400 1000
48344661 Olegan777 A Jan. 13, 2019, 3:21 p.m. OK Kotlin TESTS 85 156 102400 1000
48341788 List_412 A Jan. 13, 2019, 3:09 p.m. OK Kotlin TESTS 85 156 102400 1000
48473111 Quaternion A Jan. 16, 2019, 11:09 p.m. OK Kotlin TESTS 85 171 204800 1000
48375281 spookywooky A Jan. 14, 2019, 7:14 a.m. OK Kotlin TESTS 85 171 1228800 1000
48464701 mitzaku A Jan. 16, 2019, 4:38 p.m. OK Mono C# TESTS 85 46 0 1000
48414049 TRR A Jan. 15, 2019, 9:22 a.m. OK Mono C# TESTS 85 46 0 1000
48352190 jeanstefanovich A Jan. 13, 2019, 4:04 p.m. OK Mono C# TESTS 85 61 0 1000
49116440 nemars A Jan. 28, 2019, 5:10 p.m. OK Mono C# TESTS 85 62 3584000 1000
48467186 Illedan A Jan. 16, 2019, 5:53 p.m. OK Mono C# TESTS 85 62 3584000 1000
48688689 selpo A Jan. 21, 2019, 4:32 p.m. OK Mono C# TESTS 85 62 3686400 1000
54651903 og.kostya A May 26, 2019, 5:58 a.m. OK Mono C# TESTS 85 62 3686400 1000
49342495 zday294 A Feb. 2, 2019, 1:34 a.m. OK Mono C# TESTS 85 77 0 1000
53121049 yerzh A April 22, 2019, 11:20 a.m. OK Mono C# TESTS 85 77 3584000 1000
48409607 swamicoder A Jan. 15, 2019, 6:52 a.m. OK Mono C# TESTS 85 77 3686400 1000
56872109 vjudge1 A July 12, 2019, 6:51 a.m. OK MS C++ TESTS 85 31 0 1000
56864975 vjudge1 A July 12, 2019, 2:26 a.m. OK MS C++ TESTS 85 31 0 1000
56864345 vjudge2 A July 12, 2019, 2 a.m. OK MS C++ TESTS 85 31 0 1000
56864324 vjudge2 A July 12, 2019, 1:59 a.m. OK MS C++ TESTS 85 31 0 1000
68581753 vjudge1 A Jan. 11, 2020, 10:16 a.m. OK MS C++ TESTS 85 31 0 1000
68601046 vjudge2 A Jan. 11, 2020, 2:07 p.m. OK MS C++ TESTS 85 31 0 1000
68660118 vjudge2 A Jan. 12, 2020, 1:23 p.m. OK MS C++ TESTS 85 31 0 1000
68575549 vjudge1 A Jan. 11, 2020, 9:55 a.m. OK MS C++ TESTS 85 31 0 1000
68576129 vjudge1 A Jan. 11, 2020, 10:04 a.m. OK MS C++ TESTS 85 31 0 1000
56865729 vjudge3 A July 12, 2019, 2:55 a.m. OK MS C++ TESTS 85 31 0 1000
56040758 petko_mitkov A June 25, 2019, 2:13 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
56037153 petko_mitkov A June 25, 2019, 12:37 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
52745108 Veasky A April 14, 2019, 11:14 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
58526870 ZSTU-2018329621261 A Aug. 10, 2019, 7:33 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
61180046 ArsMFad A Sept. 23, 2019, 7:28 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
61353632 parisa.mqdm A Sept. 27, 2019, 9:31 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
68581533 vjudge1 A Jan. 11, 2020, 10:13 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
50628914 SomarDahdal A March 1, 2019, 7:54 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
52377258 lechinhin A April 6, 2019, 8:43 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
52471679 leaps A April 7, 2019, 6:59 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
48340293 sk0 A Jan. 13, 2019, 3:04 p.m. OK Ocaml TESTS 85 30 0 1000
48371488 thevirtual A Jan. 14, 2019, 4:42 a.m. OK Ocaml TESTS 85 31 0 1000
48359445 mateuszdanowski A Jan. 13, 2019, 6:04 p.m. OK Ocaml TESTS 85 31 0 1000
48359005 sk0 A Jan. 13, 2019, 5:58 p.m. OK Ocaml TESTS 85 31 0 1000
56505101 Gimber A July 4, 2019, 8:07 a.m. OK PascalABC.NET TESTS 85 187 0 1000
48418922 Ilya_Pavlov A Jan. 15, 2019, 11:59 a.m. OK PascalABC.NET TESTS 85 202 0 1000
48375557 gmusya A Jan. 14, 2019, 7:22 a.m. OK PascalABC.NET TESTS 85 311 102400 1000
64799986 licey43u A Nov. 13, 2019, 2:15 p.m. OK PascalABC.NET TESTS 85 312 102400 1000
48342537 MaxWood A Jan. 13, 2019, 3:12 p.m. OK PascalABC.NET TESTS 85 312 102400 1000
48530064 Dispersion A Jan. 18, 2019, 11:19 a.m. OK PascalABC.NET TESTS 85 312 102400 1000
48351303 seeguy A Jan. 13, 2019, 3:58 p.m. OK PascalABC.NET TESTS 85 326 0 1000
50446459 Houy3 A Feb. 24, 2019, 4:15 p.m. OK PascalABC.NET TESTS 85 327 204800 1000
48450291 hexboy A Jan. 16, 2019, 9:54 a.m. OK PHP TESTS 85 46 512000 1000
49337618 Dry7 A Feb. 1, 2019, 7:28 p.m. OK PHP TESTS 85 46 512000 1000
48427672 PavelSmirnov A Jan. 15, 2019, 3:42 p.m. OK PHP TESTS 85 46 512000 1000
48360778 mayakin A Jan. 13, 2019, 6:31 p.m. OK PHP TESTS 85 46 512000 1000
48445112 soumyasarkar1998 A Jan. 16, 2019, 7 a.m. OK PyPy 2 TESTS 85 109 0 1000
53947856 codeseeker A May 10, 2019, 7:49 a.m. OK PyPy 2 TESTS 85 139 307200 1000
48368373 masonsbro A Jan. 14, 2019, 1:29 a.m. OK PyPy 2 TESTS 85 155 0 1000
48366669 akifpatel A Jan. 13, 2019, 11:02 p.m. OK PyPy 2 TESTS 85 155 0 1000
49880852 gatsko A Feb. 13, 2019, 6:05 p.m. OK PyPy 2 TESTS 85 186 2355200 1000
48479685 vjudge4 A Jan. 17, 2019, 5:26 a.m. OK PyPy 2 TESTS 85 217 0 1000
59397078 snape_here A Aug. 24, 2019, 10:44 a.m. OK PyPy 2 TESTS 85 233 0 1000
50415142 vik678 A Feb. 24, 2019, 6:06 a.m. OK PyPy 3 TESTS 85 124 0 1000
49078462 bandi.enkh A Jan. 28, 2019, 5:05 a.m. OK PyPy 3 TESTS 85 124 0 1000
48607245 nostalin A Jan. 20, 2019, 11:39 a.m. OK PyPy 3 TESTS 85 124 0 1000
51945676 Z8N A March 28, 2019, 4:48 p.m. OK PyPy 3 TESTS 85 139 0 1000
48395931 Naman_Tyagi A Jan. 14, 2019, 5:40 p.m. OK PyPy 3 TESTS 85 139 102400 1000
48686653 strint A Jan. 21, 2019, 3:37 p.m. OK PyPy 3 TESTS 85 140 0 1000
48431806 ArthurT A Jan. 15, 2019, 5:52 p.m. OK PyPy 3 TESTS 85 140 0 1000
48400630 a.holodov A Jan. 14, 2019, 8:48 p.m. OK PyPy 3 TESTS 85 140 0 1000
48360725 bkalra92 A Jan. 13, 2019, 6:30 p.m. OK PyPy 3 TESTS 85 140 0 1000
48348819 twoeight A Jan. 13, 2019, 3:43 p.m. OK PyPy 3 TESTS 85 140 0 1000
52810854 franckmy A April 16, 2019, 8:35 a.m. OK Python 2 TESTS 85 171 0 1000
48612711 Mamta A Jan. 20, 2019, 12:18 p.m. OK Python 2 TESTS 85 171 0 1000
48583947 flash_back A Jan. 19, 2019, 6:19 p.m. OK Python 2 TESTS 85 171 0 1000
48449149 Mohammed_52 A Jan. 16, 2019, 9:11 a.m. OK Python 2 TESTS 85 171 0 1000
48382324 SoSooding A Jan. 14, 2019, 11:07 a.m. OK Python 2 TESTS 85 171 0 1000
48379683 pr0han A Jan. 14, 2019, 9:48 a.m. OK Python 2 TESTS 85 171 0 1000
48378292 hoangbao minhdv02011993 A Jan. 14, 2019, 8:55 a.m. OK Python 2 TESTS 85 171 0 1000
48342751 manjeet1999 A Jan. 13, 2019, 3:13 p.m. OK Python 2 TESTS 85 171 0 1000
48587861 claramm A Jan. 19, 2019, 9:23 p.m. OK Python 2 TESTS 85 171 102400 1000
48586743 jooj A Jan. 19, 2019, 8:16 p.m. OK Python 2 TESTS 85 186 0 1000
48601173 eg322 A Jan. 20, 2019, 8:28 a.m. OK Python 3 TESTS 85 108 0 1000
48424101 gorov2323 A Jan. 15, 2019, 2:05 p.m. OK Python 3 TESTS 85 108 0 1000
48360050 kabeer27 A Jan. 13, 2019, 6:15 p.m. OK Python 3 TESTS 85 108 0 1000
58510651 user_0001 A Aug. 9, 2019, 6:48 p.m. OK Python 3 TESTS 85 109 0 1000
58252432 ziddi A Aug. 4, 2019, 8:29 a.m. OK Python 3 TESTS 85 109 0 1000
58108612 brett1479 A Aug. 1, 2019, 5:56 a.m. OK Python 3 TESTS 85 109 0 1000
56523669 Vasiliy_48 A July 4, 2019, 4:08 p.m. OK Python 3 TESTS 85 109 0 1000
54830639 tchr A May 30, 2019, 8:46 a.m. OK Python 3 TESTS 85 109 0 1000
54407560 vnbelyanin A May 20, 2019, 7:26 a.m. OK Python 3 TESTS 85 109 0 1000
54276155 sonya123 A May 17, 2019, 11:15 a.m. OK Python 3 TESTS 85 109 0 1000
48358807 cielavenir A Jan. 13, 2019, 5:56 p.m. OK Ruby TESTS 85 77 0 1000
49610158 arraychild A Feb. 7, 2019, 11:05 p.m. OK Ruby TESTS 85 78 0 1000
48466659 Shasfin A Jan. 16, 2019, 5:36 p.m. OK Scala TESTS 85 467 0 1000
48344504 nafeezabrar A Jan. 13, 2019, 3:20 p.m. OK Scala TESTS 85 483 0 1000

remove filters

Back to search problems