Codeforces Round 353 (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
675 Codeforces Round 353 (Div. 2) FINISHED False 7200 268406699 May 16, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7411 ) B Restoring Painting PROGRAMMING brute force constructive algorithms math 1400

B"Vasya works as a watchman in the gallery. Unfortunately, one of the most expensive paintings was stolen while he was on duty. He doesn't want to be fired, so he has to quickly restore the painting. He remembers some facts about it. Help Vasya find out the number of distinct squares the satisfy all the conditions above. Note, that this number may be equal to 0, meaning Vasya remembers something wrong. Two squares are considered to be different, if there exists a cell that contains two different integers in different squares. The first line of the input contains five integers n, a, b, c and d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b, xe2 x80 x89c, xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- maximum possible value of an integer in the cell and four integers that Vasya remembers. Print one integer -- the number of distinct valid squares. Below are all the possible paintings for the first sample. In the second sample, only paintings displayed below satisfy all the rules. "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
22661849 lukomskiy B Dec. 2, 2016, 4:46 p.m. OK FPC TESTS 58 15 0 1400
18546193 Quatax B June 17, 2016, 3:38 p.m. OK FPC TESTS 58 15 0 1400
35784203 vjudge2 B Feb. 28, 2018, 12:30 p.m. OK FPC TESTS 58 15 1638400 1400
17992089 hvcuong98 B May 19, 2016, 1:52 p.m. OK FPC TESTS 58 15 1740800 1400
18018085 garde B May 21, 2016, 11:58 a.m. OK FPC TESTS 58 15 1740800 1400
18018165 Pavel-svinticki B May 21, 2016, 12:04 p.m. OK FPC TESTS 58 15 1740800 1400
18004782 FlyingSpyder B May 20, 2016, 12:41 p.m. OK FPC TESTS 58 15 1843200 1400
18038939 LossABike B May 23, 2016, 4:31 a.m. OK FPC TESTS 58 15 1945600 1400
21176622 unnamed_04 B Oct. 4, 2016, 2:12 a.m. OK FPC TESTS 58 30 0 1400
21176825 unnamed_04 B Oct. 4, 2016, 2:27 a.m. OK FPC TESTS 58 30 0 1400
20680213 jayammodi B Sept. 17, 2016, 11:06 a.m. OK GNU C TESTS 58 15 0 1400
27627971 vjudge5 B June 7, 2017, 7:53 a.m. OK GNU C TESTS 58 15 0 1400
22177507 flying_turtle B Nov. 12, 2016, 12:13 p.m. OK GNU C TESTS 58 15 0 1400
19422345 soleil B July 26, 2016, 12:21 p.m. OK GNU C TESTS 58 15 0 1400
19387591 rainboy B July 24, 2016, 4:59 p.m. OK GNU C TESTS 58 15 0 1400
35264898 MYNAMEISSHARIFUL B Feb. 14, 2018, 2:54 p.m. OK GNU C TESTS 58 15 1843200 1400
35239172 Sakib7614 B Feb. 14, 2018, 12:29 p.m. OK GNU C TESTS 58 15 1843200 1400
25396195 monggo1995 B March 11, 2017, 7:19 a.m. OK GNU C TESTS 58 15 1843200 1400
24273183 vjudge2 B Jan. 30, 2017, 5:15 p.m. OK GNU C TESTS 58 15 1843200 1400
21347939 Koshlendra7 B Oct. 10, 2016, 10:30 p.m. OK GNU C TESTS 58 15 1843200 1400
32552965 vjudge1 B Nov. 22, 2017, 2:08 p.m. OK GNU C++ TESTS 58 15 0 1400
32552561 vjudge3 B Nov. 22, 2017, 1:55 p.m. OK GNU C++ TESTS 58 15 0 1400
32551913 vjudge2 B Nov. 22, 2017, 1:33 p.m. OK GNU C++ TESTS 58 15 0 1400
32028796 rafi201505061 B Nov. 3, 2017, 5:36 p.m. OK GNU C++ TESTS 58 15 0 1400
30796893 qyf123 B Sept. 28, 2017, 6:54 a.m. OK GNU C++ TESTS 58 15 0 1400
29688729 vjudge2 B Aug. 22, 2017, 4:45 p.m. OK GNU C++ TESTS 58 15 0 1400
29672095 vjudge4 B Aug. 22, 2017, 2:39 a.m. OK GNU C++ TESTS 58 15 0 1400
29521492 xsen B Aug. 17, 2017, 8:06 a.m. OK GNU C++ TESTS 58 15 0 1400
27719238 priyanka_1998 B June 11, 2017, 10:29 a.m. OK GNU C++ TESTS 58 15 0 1400
27694155 aditya10 B June 9, 2017, 6 p.m. OK GNU C++ TESTS 58 15 0 1400
19223801 johnnyapu15 B July 19, 2016, 4:10 a.m. OK GNU C11 TESTS 58 15 0 1400
18584463 JoshuaCNF B June 18, 2016, 5:40 p.m. OK GNU C11 TESTS 58 15 0 1400
20911798 sk.sayakkundurdx B Sept. 25, 2016, 4:36 p.m. OK GNU C11 TESTS 58 15 0 1400
17992050 Farhan007 B May 19, 2016, 1:49 p.m. OK GNU C11 TESTS 58 15 2048000 1400
18206922 ZukaN B June 1, 2016, 10:49 p.m. OK GNU C11 TESTS 58 15 2048000 1400
18001711 zihad898 B May 20, 2016, 8:27 a.m. OK GNU C11 TESTS 58 30 2048000 1400
18129502 hj1105 B May 28, 2016, 9:33 a.m. OK GNU C11 TESTS 58 30 2048000 1400
57748329 vjudge1 B July 25, 2019, 1:51 p.m. OK GNU C11 TESTS 58 31 0 1400
62538391 kaiboy B Oct. 14, 2019, 1:11 a.m. OK GNU C11 TESTS 58 31 0 1400
29604794 birbala B Aug. 19, 2017, 5:22 p.m. OK GNU C++11 TESTS 58 15 0 1400
30185054 hihihihihihi B Sept. 7, 2017, 3:36 p.m. OK GNU C++11 TESTS 58 15 0 1400
30378983 Egoist_ B Sept. 16, 2017, 8:18 a.m. OK GNU C++11 TESTS 58 15 0 1400
30660399 minson123 B Sept. 24, 2017, 8:38 a.m. OK GNU C++11 TESTS 58 15 0 1400
30797086 xc01 B Sept. 28, 2017, 7:04 a.m. OK GNU C++11 TESTS 58 15 0 1400
30802026 VinayakaB B Sept. 28, 2017, 11:03 a.m. OK GNU C++11 TESTS 58 15 0 1400
32338579 Flying_streaky_pork B Nov. 15, 2017, 5:23 p.m. OK GNU C++11 TESTS 58 15 0 1400
32552711 vjudge2 B Nov. 22, 2017, 2 p.m. OK GNU C++11 TESTS 58 15 0 1400
32554591 wangcwc B Nov. 22, 2017, 3:06 p.m. OK GNU C++11 TESTS 58 15 0 1400
29817136 Malomalomalomalo B Aug. 27, 2017, 1:10 a.m. OK GNU C++11 TESTS 58 15 0 1400
60739820 jgarciag8274 B Sept. 17, 2019, 7:21 p.m. OK GNU C++14 TESTS 58 15 0 1400
67874404 vipinmahan B Dec. 29, 2019, 12:44 p.m. OK GNU C++14 TESTS 58 15 0 1400
32426610 a_kk B Nov. 18, 2017, 9:49 a.m. OK GNU C++14 TESTS 58 15 0 1400
32240793 UnstoppableChillMachine B Nov. 12, 2017, 10:37 a.m. OK GNU C++14 TESTS 58 15 0 1400
32234580 rigzsingh B Nov. 12, 2017, 4:45 a.m. OK GNU C++14 TESTS 58 15 0 1400
31897602 PraneyR B Oct. 30, 2017, 3:08 p.m. OK GNU C++14 TESTS 58 15 0 1400
31869764 nqbinh17 B Oct. 29, 2017, 2:41 p.m. OK GNU C++14 TESTS 58 15 0 1400
31828418 dooms_day B Oct. 28, 2017, 8:03 a.m. OK GNU C++14 TESTS 58 15 0 1400
31821054 loayakram B Oct. 27, 2017, 11:38 p.m. OK GNU C++14 TESTS 58 15 0 1400
31289440 tech123 B Oct. 14, 2017, 4:50 a.m. OK GNU C++14 TESTS 58 15 0 1400
39289834 Photon_ B June 16, 2018, 2:26 p.m. OK GNU C++17 TESTS 58 15 0 1400
49461010 tanya9 B Feb. 4, 2019, 12:58 p.m. OK GNU C++17 TESTS 58 15 204800 1400
36123271 vjudge4 B March 9, 2018, 4:16 p.m. OK GNU C++17 TESTS 58 15 1945600 1400
36126069 roronoa_zorro B March 9, 2018, 6:03 p.m. OK GNU C++17 TESTS 58 15 1945600 1400
55222015 CiriloMorax17 B June 6, 2019, 8:19 p.m. OK GNU C++17 TESTS 58 30 0 1400
67400554 tjrac6017203257 B Dec. 22, 2019, 3:25 a.m. OK GNU C++17 TESTS 58 30 0 1400
66438933 almazov.03 B Dec. 7, 2019, 7:16 a.m. OK GNU C++17 TESTS 58 30 0 1400
57076718 vjudge3 B July 15, 2019, 5:33 a.m. OK GNU C++17 TESTS 58 30 0 1400
61918987 gazebo B Oct. 5, 2019, 12:52 p.m. OK GNU C++17 TESTS 58 30 0 1400
62164222 BLACKHAT9 B Oct. 8, 2019, 7:29 p.m. OK GNU C++17 TESTS 58 30 0 1400
36767233 vjudge1 B March 31, 2018, 7:53 a.m. OK GNU C++17 Diagnostics TESTS 58 967 99430400 1400
18028502 zhaojkun B May 22, 2016, 8:44 a.m. OK Go TESTS 58 30 6041600 1400
20523900 guzhoudiaoke B Sept. 11, 2016, 8:52 a.m. OK Go TESTS 58 31 0 1400
18634098 MVesterli B June 21, 2016, 5:29 p.m. OK Haskell TESTS 58 15 8396800 1400
18618025 Capture_A_Lag B June 20, 2016, 5:01 p.m. OK Haskell TESTS 58 15 8396800 1400
18618112 Capture_A_Lag B June 20, 2016, 5:07 p.m. OK Haskell TESTS 58 15 8499200 1400
18749235 jrc1215 B June 27, 2016, 9:08 a.m. OK Haskell TESTS 58 31 8499200 1400
17981785 yoshibo- B May 18, 2016, 3:11 p.m. OK Haskell TESTS 58 31 53248000 1400
60700840 edsomjr B Sept. 17, 2019, 12:09 a.m. OK Haskell TESTS 58 46 102400 1400
17982292 HarshGaglani B May 18, 2016, 3:54 p.m. OK Java 7 TESTS 58 108 39014400 1400
18236679 bufistov B June 3, 2016, 7:55 p.m. OK Java 7 TESTS 58 109 39116800 1400
18025056 siddv B May 22, 2016, 1:08 a.m. OK Java 7 TESTS 58 109 39116800 1400
18006530 dgdinkar B May 20, 2016, 2:52 p.m. OK Java 7 TESTS 58 109 39321600 1400
18858713 228 B July 2, 2016, 7:18 p.m. OK Java 7 TESTS 58 124 0 1400
19562037 esso B Aug. 1, 2016, 1:45 p.m. OK Java 7 TESTS 58 124 0 1400
19413996 parth015 B July 26, 2016, 3:34 a.m. OK Java 7 TESTS 58 124 0 1400
18964677 Dhruv_Sachdev B July 8, 2016, 8:02 a.m. OK Java 7 TESTS 58 124 0 1400
18889955 calvin.wunderkind B July 4, 2016, 10:03 p.m. OK Java 7 TESTS 58 124 0 1400
18727967 anasibrahim B June 26, 2016, 1:17 a.m. OK Java 7 TESTS 58 124 0 1400
59072824 pink_codes B Aug. 19, 2019, 5:43 a.m. OK Java 8 TESTS 58 109 0 1400
51237181 Amr_Geneidy B March 12, 2019, 7:08 p.m. OK Java 8 TESTS 58 109 0 1400
45564015 catforce B Nov. 11, 2018, 1:19 p.m. OK Java 8 TESTS 58 109 0 1400
30405962 zodiacleo B Sept. 16, 2017, 9:32 p.m. OK Java 8 TESTS 58 109 0 1400
27119020 zodiacleo B May 15, 2017, 10:01 a.m. OK Java 8 TESTS 58 109 0 1400
19198887 hama-du B July 18, 2016, 2:18 a.m. OK Java 8 TESTS 58 109 0 1400
17981590 c4cheats B May 18, 2016, 2:56 p.m. OK Java 8 TESTS 58 109 20275200 1400
18045733 integer_overflow B May 23, 2016, 3:51 p.m. OK Java 8 TESTS 58 109 20377600 1400
25401327 HemraJumaev B March 11, 2017, 10:21 a.m. OK Java 8 TESTS 58 109 20480000 1400
29210140 Bibhuti B Aug. 5, 2017, 5:29 a.m. OK Java 8 TESTS 58 109 20582400 1400
18530755 leonidvasilyev B June 16, 2016, 8:10 p.m. OK JavaScript TESTS 58 31 1024000 1400
18051108 JS_Lighter B May 24, 2016, 6:02 a.m. OK JavaScript TESTS 58 31 6348800 1400
18275426 reka B June 6, 2016, 8:22 p.m. OK JavaScript TESTS 58 31 7065600 1400
48716117 Skndr801 B Jan. 22, 2019, 11:21 a.m. OK Mono C# TESTS 58 61 0 1400
51035049 nemars B March 8, 2019, 2:46 p.m. OK Mono C# TESTS 58 62 3584000 1400
18336110 Hepic_Antony_Skarlatos B June 9, 2016, 6:16 a.m. OK Mono C# TESTS 58 62 9216000 1400
17984254 TRR B May 18, 2016, 6:59 p.m. OK Mono C# TESTS 58 77 9318400 1400
21378311 pomjuice B Oct. 12, 2016, 10:04 a.m. OK Mono C# TESTS 58 77 14233600 1400
19424281 Arcey B July 26, 2016, 2:11 p.m. OK MS C# TESTS 58 46 102400 1400
29146977 Skndr B Aug. 3, 2017, 6:06 a.m. OK MS C# TESTS 58 61 9318400 1400
18093392 kuzAnatoliy B May 25, 2016, 8:06 p.m. OK MS C# TESTS 58 62 9113600 1400
18007485 og.kostya B May 20, 2016, 4 p.m. OK MS C# TESTS 58 62 9216000 1400
18123037 LarryLurex B May 27, 2016, 7:45 p.m. OK MS C# TESTS 58 62 9216000 1400
18285090 AnatolyTolstobrov B June 7, 2016, 1:40 p.m. OK MS C# TESTS 58 62 11673600 1400
20397340 Chubcheg B Sept. 5, 2016, 10:23 a.m. OK MS C# TESTS 58 77 2560000 1400
24088483 OmniLRenegadE B Jan. 24, 2017, 9:20 a.m. OK MS C# TESTS 58 77 9113600 1400
18010787 sochix B May 20, 2016, 8:35 p.m. OK MS C# TESTS 58 77 11571200 1400
22921132 SmallSir B Dec. 13, 2016, 7:10 a.m. OK MS C++ TESTS 58 15 0 1400
32181607 msu_PaCman B Nov. 9, 2017, 9:05 p.m. OK MS C++ TESTS 58 15 0 1400
39077702 Gleb_Dubosarskii B June 9, 2018, 7:53 p.m. OK MS C++ TESTS 58 15 0 1400
20546979 siscos B Sept. 12, 2016, 10:31 a.m. OK MS C++ TESTS 58 15 0 1400
20482606 m.fawzy B Sept. 9, 2016, 4:43 p.m. OK MS C++ TESTS 58 15 0 1400
21872191 vjudge1 B Oct. 29, 2016, 1:02 p.m. OK MS C++ TESTS 58 15 0 1400
20922835 DamnItsRated B Sept. 26, 2016, 10:12 a.m. OK MS C++ TESTS 58 15 0 1400
22126195 irain B Nov. 9, 2016, 8:41 a.m. OK MS C++ TESTS 58 15 0 1400
22464816 vjudge2 B Nov. 24, 2016, 11:34 a.m. OK MS C++ TESTS 58 15 0 1400
22483667 vjudge2 B Nov. 25, 2016, 6:54 a.m. OK MS C++ TESTS 58 15 0 1400
54814634 VladKozin B May 29, 2019, 6:59 p.m. OK MS C++ 2017 TESTS 58 31 0 1400
59192068 khld-al tareksamy bahaaEldeen B Aug. 20, 2019, 10:01 p.m. OK MS C++ 2017 TESTS 58 31 0 1400
58857595 felix412441 B Aug. 15, 2019, 10:04 a.m. OK MS C++ 2017 TESTS 58 31 0 1400
18233664 pylol B June 3, 2016, 3:45 p.m. OK Perl TESTS 58 77 2355200 1400
24594713 har_vi B Feb. 11, 2017, 5:51 p.m. OK PyPy 2 TESTS 58 77 22016000 1400
25302746 Unlenin B March 6, 2017, 8:27 p.m. OK PyPy 2 TESTS 58 77 22220800 1400
18016009 yt5wt2c B May 21, 2016, 9:09 a.m. OK PyPy 2 TESTS 58 77 22630400 1400
17988054 vbshah B May 19, 2016, 8:40 a.m. OK PyPy 2 TESTS 58 93 22630400 1400
18049846 WillM B May 24, 2016, 2:57 a.m. OK PyPy 2 TESTS 58 108 22937600 1400
24765370 Trunks B Feb. 18, 2017, 10:13 a.m. OK PyPy 2 TESTS 58 109 22425600 1400
19039493 tastymath75025 B July 12, 2016, 2:19 a.m. OK PyPy 2 TESTS 58 140 0 1400
23026074 cugel B Dec. 16, 2016, 9:39 a.m. OK PyPy 3 TESTS 58 109 0 1400
32982460 nonis B Dec. 6, 2017, 4:56 p.m. OK PyPy 3 TESTS 58 109 23244800 1400
18034037 josdas B May 22, 2016, 4:33 p.m. OK PyPy 3 TESTS 58 124 24166400 1400
69925459 beethoven97 B Jan. 31, 2020, 8:09 p.m. OK PyPy 3 TESTS 58 140 0 1400
60380914 kopok2 B Sept. 11, 2019, 9:07 a.m. OK PyPy 3 TESTS 58 140 1843200 1400
18063967 mihaild B May 24, 2016, 8:42 p.m. OK PyPy 3 TESTS 58 140 23244800 1400
18036463 Amores B May 22, 2016, 11:10 p.m. OK PyPy 3 TESTS 58 140 23756800 1400
60525191 HazemEssawi B Sept. 14, 2019, 10:04 a.m. OK PyPy 3 TESTS 58 155 0 1400
54726271 Aidos B May 27, 2019, 8:47 p.m. OK PyPy 3 TESTS 58 156 614400 1400
57644042 vjudge1 B July 24, 2019, 1:37 p.m. OK PyPy 3 TESTS 58 156 1740800 1400
23845501 BlueHazard_rony B Jan. 15, 2017, 3:42 p.m. OK Python 2 TESTS 58 46 4710400 1400
18963851 mshaghi B July 8, 2016, 7:22 a.m. OK Python 2 TESTS 58 61 0 1400
18049850 m7mdkamal B May 24, 2016, 2:57 a.m. OK Python 2 TESTS 58 61 4710400 1400
19157002 milan B July 15, 2016, 3:53 p.m. OK Python 2 TESTS 58 62 0 1400
33372322 ytz123 B Dec. 18, 2017, 8:18 a.m. OK Python 2 TESTS 58 62 4608000 1400
21556554 vjudge2 B Oct. 18, 2016, 3:53 a.m. OK Python 2 TESTS 58 62 4608000 1400
18066198 sys7emshock B May 25, 2016, 4:54 a.m. OK Python 2 TESTS 58 62 4710400 1400
18066025 polarfool B May 25, 2016, 4:18 a.m. OK Python 2 TESTS 58 62 4710400 1400
18052304 mihassan B May 24, 2016, 7:53 a.m. OK Python 2 TESTS 58 62 4710400 1400
18021881 nealzane B May 21, 2016, 4:55 p.m. OK Python 2 TESTS 58 62 4710400 1400
18024679 Givemetips B May 21, 2016, 11:16 p.m. OK Python 3 TESTS 58 61 5120000 1400
21828173 sbagan B Oct. 27, 2016, 3:50 p.m. OK Python 3 TESTS 58 62 0 1400
20918552 tskhada B Sept. 26, 2016, 2:47 a.m. OK Python 3 TESTS 58 62 0 1400
19614910 yinxiaoyu B Aug. 4, 2016, 12:25 p.m. OK Python 3 TESTS 58 62 0 1400
18522681 UnusedFever B June 16, 2016, 2:40 p.m. OK Python 3 TESTS 58 62 0 1400
29247460 Qumeric B Aug. 6, 2017, 6:53 p.m. OK Python 3 TESTS 58 62 4608000 1400
28679383 Christopher-Perkins B July 18, 2017, 10:34 p.m. OK Python 3 TESTS 58 62 4608000 1400
24563749 tony3918 B Feb. 10, 2017, 6:35 a.m. OK Python 3 TESTS 58 62 4608000 1400
20182157 patrikos B Aug. 26, 2016, 7 p.m. OK Python 3 TESTS 58 62 4608000 1400
19924097 ScanNorOne B Aug. 17, 2016, 9:48 a.m. OK Python 3 TESTS 58 62 4608000 1400
18404830 MoOfMo B June 13, 2016, 3:09 a.m. OK Ruby TESTS 58 77 6553600 1400
18026523 cielavenir B May 22, 2016, 5:55 a.m. OK Ruby TESTS 58 77 6553600 1400
19963986 SakurakoujiRuna B Aug. 19, 2016, 12:41 p.m. OK Ruby TESTS 58 140 6451200 1400
21634122 reldan B Oct. 21, 2016, 6:29 a.m. OK Scala TESTS 58 280 0 1400
18049020 dr.ikros B May 24, 2016, 12:14 a.m. OK Scala TESTS 58 311 39731200 1400
18049895 WeAthFolD B May 24, 2016, 3:05 a.m. OK Scala TESTS 58 342 39731200 1400

remove filters

Back to search problems