Codeforces Round 654 (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
1371 Codeforces Round 654 (Div. 2) FINISHED False 7200 143655863 July 1, 2020, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19254 ) B Magical Calendar PROGRAMMING constructive algorithms math

B"A competitive eater, Alice is scheduling some practices for an eating contest on a magical calendar. The calendar is unusual because a week contains not necessarily 7 days! In detail, she can choose any integer k which satisfies 1 <= q k <= q r , and set k days as the number of days in a week. Alice is going to paint some n consecutive days on this calendar. On this calendar, dates are written from the left cell to the right cell in a week. If a date reaches the last day of a week, the next day's cell is the leftmost cell in the next (under) row. She wants to make all of the painted cells to be connected by side. It means, that for any two painted cells there should exist at least one sequence of painted cells, started in one of these cells, and ended in another, such that any two consecutive cells in this sequence are connected by side. Alice is considering the shape of the painted cells. Two shapes are the same if there exists a way to make them exactly overlapped using only parallel moves, parallel to the calendar's sides. For example, in the picture, a week has 4 days and Alice paints 5 consecutive days. [1] and [2] are different shapes, but [1] and [3] are equal shapes. Alice wants to know how many possible shapes exists if she set how many days a week has and choose consecutive n days and paints them in calendar started in one of the days of the week. As was said before, she considers only shapes, there all cells are connected by side. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next t lines contain descriptions of test cases. For each test case, the only line contains two integers n , r ( 1 <= n <= 10^9, 1 <= r <= 10^9 ). For each test case, print a single integer -- the answer to the problem. Please note, that the answer for some test cases won't fit into 32 -bit inte"...

Tutorials

Codeforces Round #654 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
85695114 aviral_tandon B July 1, 2020, 3:33 p.m. OK GNU C11 TESTS 21 30 0
85699884 physics0523 B July 1, 2020, 4:48 p.m. OK GNU C11 TESTS 21 31 0
85703525 pritesh19singh B July 1, 2020, 5:10 p.m. OK GNU C11 TESTS 21 31 0
85704356 avidex180899 B July 1, 2020, 5:18 p.m. OK GNU C11 TESTS 21 31 0
85727401 _Zoe_ B July 2, 2020, 1:43 a.m. OK GNU C11 TESTS 21 31 0
85728529 Mayeesha30 B July 2, 2020, 2:12 a.m. OK GNU C11 TESTS 21 31 0
85738167 ShattereDarkness B July 2, 2020, 5:22 a.m. OK GNU C11 TESTS 21 31 0
85740499 Samee_Sevas B July 2, 2020, 5:57 a.m. OK GNU C11 TESTS 21 31 0
85692590 Sau_rav B July 1, 2020, 3:29 p.m. OK GNU C11 TESTS 21 31 0
85691027 unlaxedneurotic B July 1, 2020, 3:26 p.m. OK GNU C11 TESTS 21 31 0
85702096 Drimitiv B July 1, 2020, 5 p.m. OK GNU C++11 TESTS 21 15 0
85673229 LKPl B July 1, 2020, 2:49 p.m. OK GNU C++11 TESTS 21 15 0
85668292 agctXY B July 1, 2020, 2:40 p.m. OK GNU C++11 TESTS 21 15 0
85665929 dungeon__master B July 1, 2020, 2:35 p.m. OK GNU C++11 TESTS 21 15 0
85664857 xyyshh B July 1, 2020, 2:33 p.m. OK GNU C++11 TESTS 21 15 0
85731465 vjudge4 B July 2, 2020, 3:19 a.m. OK GNU C++11 TESTS 21 30 0
85739263 hunter19491001 B July 2, 2020, 5:40 a.m. OK GNU C++11 TESTS 21 30 0
85737156 saiful_alam41 B July 2, 2020, 5:06 a.m. OK GNU C++11 TESTS 21 30 0
85733096 NguyenBaHa B July 2, 2020, 3:52 a.m. OK GNU C++11 TESTS 21 30 0
85704350 knightxerons B July 1, 2020, 5:18 p.m. OK GNU C++11 TESTS 21 30 0
85735908 mishrashivanshu B July 2, 2020, 4:46 a.m. OK GNU C++14 TESTS 21 30 0
85734941 Wrj B July 2, 2020, 4:29 a.m. OK GNU C++14 TESTS 21 30 0
85734303 mohitsethia B July 2, 2020, 4:16 a.m. OK GNU C++14 TESTS 21 30 0
85734167 praveenpathak B July 2, 2020, 4:14 a.m. OK GNU C++14 TESTS 21 30 0
85733030 leaf19299 B July 2, 2020, 3:51 a.m. OK GNU C++14 TESTS 21 30 0
85729920 skull1999 B July 2, 2020, 2:44 a.m. OK GNU C++14 TESTS 21 30 0
85716910 amitray1608 B July 1, 2020, 8:06 p.m. OK GNU C++14 TESTS 21 30 0
85710147 ad02 B July 1, 2020, 6:21 p.m. OK GNU C++14 TESTS 21 30 0
85704140 DB__COOPER B July 1, 2020, 5:16 p.m. OK GNU C++14 TESTS 21 30 0
85702618 mtnshh B July 1, 2020, 5:04 p.m. OK GNU C++14 TESTS 21 30 0
85709371 Saksham-Sharma B July 1, 2020, 6:11 p.m. OK GNU C++17 TESTS 21 15 0
85710392 sourav.cse B July 1, 2020, 6:24 p.m. OK GNU C++17 TESTS 21 30 0
85728090 lojic B July 2, 2020, 2 a.m. OK GNU C++17 TESTS 21 30 0
85719483 Bakkar- B July 1, 2020, 9:10 p.m. OK GNU C++17 TESTS 21 30 0
85712432 Whistler27 B July 1, 2020, 6:52 p.m. OK GNU C++17 TESTS 21 30 0
85711314 linesekarenge B July 1, 2020, 6:36 p.m. OK GNU C++17 TESTS 21 30 0
85709673 tav B July 1, 2020, 6:15 p.m. OK GNU C++17 TESTS 21 30 0
85709201 CoDeHuNtEr B July 1, 2020, 6:09 p.m. OK GNU C++17 TESTS 21 30 0
85708198 viji9810 B July 1, 2020, 5:56 p.m. OK GNU C++17 TESTS 21 30 0
85707611 husain_froz B July 1, 2020, 5:50 p.m. OK GNU C++17 TESTS 21 30 0
85668377 msz301005 B July 1, 2020, 2:40 p.m. OK GNU C++17 (64) TESTS 21 15 204800
85668006 kritin19 B July 1, 2020, 2:39 p.m. OK GNU C++17 (64) TESTS 21 15 204800
85679416 Maruf. B July 1, 2020, 3:02 p.m. OK GNU C++17 (64) TESTS 21 30 0
85704223 fial1 B July 1, 2020, 5:16 p.m. OK GNU C++17 (64) TESTS 21 30 0
85706656 KDZHR B July 1, 2020, 5:40 p.m. OK GNU C++17 (64) TESTS 21 30 0
85724166 Bekh B July 1, 2020, 11:53 p.m. OK GNU C++17 (64) TESTS 21 30 0
85726365 iaNTU B July 2, 2020, 1:13 a.m. OK GNU C++17 (64) TESTS 21 30 0
85733324 KevinWan B July 2, 2020, 3:56 a.m. OK GNU C++17 (64) TESTS 21 30 0
85675116 tareq578 B July 1, 2020, 2:53 p.m. OK GNU C++17 (64) TESTS 21 30 0
85709731 saarthak_1607 B July 1, 2020, 6:16 p.m. OK GNU C++17 (64) TESTS 21 30 204800
85666190 yuki2006 B July 1, 2020, 2:36 p.m. OK Go TESTS 21 46 0
85662029 ktateish B July 1, 2020, 2:28 p.m. OK Go TESTS 21 46 102400
85718481 Russell_Emerine B July 1, 2020, 8:44 p.m. OK Haskell TESTS 21 31 102400
85673102 voidy B July 1, 2020, 2:49 p.m. OK Haskell TESTS 21 46 102400
85693047 typewriter999 B July 1, 2020, 3:30 p.m. OK Java 11 TESTS 21 186 0
85690309 Barnot B July 1, 2020, 3:24 p.m. OK Java 11 TESTS 21 186 0
85677746 Raj9400 B July 1, 2020, 2:58 p.m. OK Java 11 TESTS 21 186 0
85673834 gargvibhor2012 B July 1, 2020, 2:50 p.m. OK Java 11 TESTS 21 186 0
85723888 Oopsimbad B July 1, 2020, 11:41 p.m. OK Java 11 TESTS 21 187 0
85711507 litesam B July 1, 2020, 6:39 p.m. OK Java 11 TESTS 21 187 0
85691972 anhtaihsgs B July 1, 2020, 3:28 p.m. OK Java 11 TESTS 21 187 0
85685933 ImFish B July 1, 2020, 3:15 p.m. OK Java 11 TESTS 21 187 0
85668043 Richard727 B July 1, 2020, 2:39 p.m. OK Java 11 TESTS 21 187 0
85662201 aryankhatri B July 1, 2020, 2:28 p.m. OK Java 11 TESTS 21 187 0
85738044 ragnarok001 B July 2, 2020, 5:21 a.m. OK Java 8 TESTS 21 108 0
85732829 akshith1997 B July 2, 2020, 3:47 a.m. OK Java 8 TESTS 21 108 0
85707556 hassanU B July 1, 2020, 5:49 p.m. OK Java 8 TESTS 21 108 0
85739261 labdhi B July 2, 2020, 5:40 a.m. OK Java 8 TESTS 21 109 0
85733128 ISSAM_LAKOUAM B July 2, 2020, 3:53 a.m. OK Java 8 TESTS 21 109 0
85716219 ay_08 B July 1, 2020, 7:53 p.m. OK Java 8 TESTS 21 109 0
85715891 Naman_123 B July 1, 2020, 7:47 p.m. OK Java 8 TESTS 21 109 0
85713268 Akash_kunwar B July 1, 2020, 7:04 p.m. OK Java 8 TESTS 21 109 0
85709177 AnandOza B July 1, 2020, 6:09 p.m. OK Java 8 TESTS 21 109 0
85702326 ineffablekenobi B July 1, 2020, 5:01 p.m. OK Java 8 TESTS 21 109 0
85725590 Spheniscine B July 2, 2020, 12:48 a.m. OK Kotlin TESTS 21 109 0
85713437 Hakiobo B July 1, 2020, 7:07 p.m. OK Kotlin TESTS 21 109 0
85717641 timurtibeyev B July 1, 2020, 8:23 p.m. OK Kotlin TESTS 21 124 0
85683451 CepGamer B July 1, 2020, 3:10 p.m. OK Kotlin TESTS 21 170 0
85680391 dessaber B July 1, 2020, 3:04 p.m. OK Kotlin TESTS 21 171 0
85689085 udjee B July 1, 2020, 3:22 p.m. OK Kotlin TESTS 21 171 1228800
85675325 Akaiyo B July 1, 2020, 2:53 p.m. OK Kotlin TESTS 21 187 0
85674386 G00FY4NT B July 1, 2020, 2:51 p.m. OK Mono C# TESTS 21 62 204800
85683804 Dock290 B July 1, 2020, 3:11 p.m. OK Mono C# TESTS 21 62 307200
85689187 saleelpk95 B July 1, 2020, 3:22 p.m. OK Mono C# TESTS 21 62 307200
85675063 riantkb B July 1, 2020, 2:53 p.m. OK Mono C# TESTS 21 62 409600
85686901 ilelikv B July 1, 2020, 3:17 p.m. OK Mono C# TESTS 21 77 204800
85676235 osthir B July 1, 2020, 2:55 p.m. OK Mono C# TESTS 21 77 307200
85670671 eSeF_ B July 1, 2020, 2:44 p.m. OK Mono C# TESTS 21 77 71680000
85725414 Biang-Biang B July 2, 2020, 12:42 a.m. OK MS C++ TESTS 21 31 307200
85684633 felix.lwg B July 1, 2020, 3:13 p.m. OK MS C++ 2017 TESTS 21 31 0
85733541 rhksdn6227 B July 2, 2020, 4:01 a.m. OK MS C++ 2017 TESTS 21 31 0
85730323 skymin B July 2, 2020, 2:53 a.m. OK MS C++ 2017 TESTS 21 31 0
85702416 HelloWorld101 B July 1, 2020, 5:02 p.m. OK MS C++ 2017 TESTS 21 31 0
85702339 Ingibitor B July 1, 2020, 5:01 p.m. OK MS C++ 2017 TESTS 21 31 0
85692528 Rouzhs B July 1, 2020, 3:29 p.m. OK MS C++ 2017 TESTS 21 31 0
85686945 tumpling B July 1, 2020, 3:17 p.m. OK MS C++ 2017 TESTS 21 31 0
85685620 jingzi523 B July 1, 2020, 3:15 p.m. OK MS C++ 2017 TESTS 21 31 0
85676583 Kshetragya B July 1, 2020, 2:56 p.m. OK MS C++ 2017 TESTS 21 31 0
85674463 pandoomanda B July 1, 2020, 2:52 p.m. OK MS C++ 2017 TESTS 21 31 0
85730160 OmniSliver B July 2, 2020, 2:50 a.m. OK Node.js TESTS 21 92 1228800
85678052 EgorStar B July 1, 2020, 2:59 p.m. OK PascalABC.NET TESTS 21 342 307200
85665388 c1729 B July 1, 2020, 2:34 p.m. OK PyPy 2 TESTS 21 140 102400
85721507 lebron87 B July 1, 2020, 10:09 p.m. OK PyPy 2 TESTS 21 155 512000
85664847 realnimish B July 1, 2020, 2:33 p.m. OK PyPy 2 TESTS 21 170 409600
85721399 lebron87 B July 1, 2020, 10:06 p.m. OK PyPy 2 TESTS 21 171 512000
85670856 guptakhushi345 B July 1, 2020, 2:45 p.m. OK PyPy 2 TESTS 21 171 512000
85664175 mo-hit B July 1, 2020, 2:32 p.m. OK PyPy 2 TESTS 21 233 9318400
85678250 Satwik_Tiwari B July 1, 2020, 2:59 p.m. OK PyPy 2 TESTS 21 280 8294400
85667286 YashShah B July 1, 2020, 2:38 p.m. OK PyPy 3 TESTS 21 140 102400
85729286 LethalPuppy B July 2, 2020, 2:29 a.m. OK PyPy 3 TESTS 21 155 1843200
85716823 otterPurva B July 1, 2020, 8:04 p.m. OK PyPy 3 TESTS 21 155 1843200
85707132 xicarik B July 1, 2020, 5:45 p.m. OK PyPy 3 TESTS 21 155 1843200
85699029 UTMoonlight B July 1, 2020, 4:45 p.m. OK PyPy 3 TESTS 21 155 1843200
85739720 manhar B July 2, 2020, 5:46 a.m. OK PyPy 3 TESTS 21 155 1945600
85708248 AggarwalRaghav B July 1, 2020, 5:57 p.m. OK PyPy 3 TESTS 21 155 1945600
85662915 zimpZamp B July 1, 2020, 2:30 p.m. OK PyPy 3 TESTS 21 155 2252800
85668240 apoorvwatsky B July 1, 2020, 2:40 p.m. OK PyPy 3 TESTS 21 156 1536000
85710467 Venom_007 B July 1, 2020, 6:25 p.m. OK PyPy 3 TESTS 21 156 1843200
85713490 ap1008 B July 1, 2020, 7:08 p.m. OK Python 2 TESTS 21 186 0
85670245 junmiao B July 1, 2020, 2:43 p.m. OK Python 2 TESTS 21 187 0
85712371 Dreamer07 B July 1, 2020, 6:51 p.m. OK Python 3 TESTS 21 108 0
85668301 kobratooth B July 1, 2020, 2:40 p.m. OK Python 3 TESTS 21 108 0
85666271 Lummy B July 1, 2020, 2:36 p.m. OK Python 3 TESTS 21 108 0
85664842 hlp2599 B July 1, 2020, 2:33 p.m. OK Python 3 TESTS 21 108 0
85710664 subhajitdas B July 1, 2020, 6:27 p.m. OK Python 3 TESTS 21 108 102400
85709896 Gausstein B July 1, 2020, 6:18 p.m. OK Python 3 TESTS 21 108 307200
85740265 0xc0dey0da B July 2, 2020, 5:54 a.m. OK Python 3 TESTS 21 109 0
85737559 longroads B July 2, 2020, 5:13 a.m. OK Python 3 TESTS 21 109 0
85736999 nishx B July 2, 2020, 5:04 a.m. OK Python 3 TESTS 21 109 0
85734874 shubhamsanjaystw B July 2, 2020, 4:27 a.m. OK Python 3 TESTS 21 109 0
85704290 arounderstands B July 1, 2020, 5:17 p.m. OK Ruby TESTS 21 920 307200
85719222 masa0216masa0216masa0216 B July 1, 2020, 9:03 p.m. OK Ruby TESTS 21 967 921600
85702224 shirakia B July 1, 2020, 5 p.m. OK Ruby TESTS 21 998 1331200
85671754 BridgeBurner B July 1, 2020, 2:46 p.m. OK Scala TESTS 21 468 0
85703946 smas B July 1, 2020, 5:14 p.m. OK Scala TESTS 21 530 0

remove filters

Back to search problems